diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/app/models/team_invitation.rb b/app/models/team_invitation.rb index abc1234..def5678 100644 --- a/app/models/team_invitation.rb +++ b/app/models/team_invitation.rb @@ -10,7 +10,7 @@ scope :requests_to_join, -> { where(type: INVITATION_REQUEST) } scope :invitations, -> { where(type: INVITED_BY_TEAM) } - validates_uniqueness_of [:type, :user_id, :team_id] + validates_uniqueness_of :user_id, scope: [:type, :team_id] def approve destroy
Fix uniqueness of team invitations
diff --git a/app/models/search_crossref.rb b/app/models/search_crossref.rb index abc1234..def5678 100644 --- a/app/models/search_crossref.rb +++ b/app/models/search_crossref.rb @@ -1,11 +1,15 @@ class SearchCrossref def initialize(query, opts = {}) @query = query[:everything] + @page = query[:current_page] || 1 + @rows = APP_CONFIG["results_per_page"] end def run response = conn.get "/works", { query: @query, + rows: @rows, + offset: offset, } results = response.body["message"]["items"].map do |result| @@ -17,6 +21,10 @@ return results, total_results end + def offset + @rows * (@page.to_i - 1) + end + def conn @conn ||= Faraday.new(url: "http://api.crossref.org") do |faraday| faraday.request :url_encoded
Add pagination support to CrossRef's API wrapper.
diff --git a/spec/support/custom_matchers.rb b/spec/support/custom_matchers.rb index abc1234..def5678 100644 --- a/spec/support/custom_matchers.rb +++ b/spec/support/custom_matchers.rb @@ -5,12 +5,12 @@ failure_message_for_should do |actual| actual = 'nil' unless actual - "expected that #{actual} would be now (#{Time.zone.now})" + "expected that #{actual} (#{actual.to_i}) would be now (#{Time.zone.now}, #{Time.zone.now.to_i})" end failure_message_for_should_not do |actual| actual = 'nil' unless actual - "expected that #{actual} would not be now (#{Time.zone.now})" + "expected that #{actual} (#{actual.to_i}) would not be now (#{Time.zone.now}, #{Time.zone.now.to_i})" end end @@ -21,11 +21,11 @@ failure_message_for_should do |actual| actual = 'nil' unless actual - "expected that #{actual} would be #{expected}" + "expected that #{actual} (#{actual.to_i}) would be #{expected} (#{expected.to_i})" end failure_message_for_should_not do |actual| actual = 'nil' unless actual - "expected that #{actual} would not be #{expected}" + "expected that #{actual} (#{actual.to_i}) would not be #{expected} (#{expected.to_i})" end end
Improve failure messages for be_now and be_at
diff --git a/lib/adhearsion/xmpp/connection.rb b/lib/adhearsion/xmpp/connection.rb index abc1234..def5678 100644 --- a/lib/adhearsion/xmpp/connection.rb +++ b/lib/adhearsion/xmpp/connection.rb @@ -1,4 +1,5 @@-require 'blather/client' +require 'blather/client/client' +require 'blather/client/dsl' module Adhearsion class XMPP
[BUGFIX] Fix require of blather/client stuff, blather/client.rb is an executable script now?
diff --git a/spec/models/round_spec.rb b/spec/models/round_spec.rb index abc1234..def5678 100644 --- a/spec/models/round_spec.rb +++ b/spec/models/round_spec.rb @@ -14,4 +14,10 @@ round.turns << old_turn expect(round.last_turn).to eq new_turn end + + it 'marks itself as finished' do + expect(round.is_over?).to be false + round.finish + expect(round.is_over?).to be true + end end
Add round model specs for finish and is_over method
diff --git a/spec/outbox/rails_spec.rb b/spec/outbox/rails_spec.rb index abc1234..def5678 100644 --- a/spec/outbox/rails_spec.rb +++ b/spec/outbox/rails_spec.rb @@ -2,6 +2,6 @@ describe Outbox::Rails do it 'has a version number' do - Outbox::Rails::VERSION.should_not be_nil + expect(Outbox::Rails::VERSION).to_not be_nil end end
Use newer version of rspec syntax
diff --git a/lib/discourse_api/client.rb b/lib/discourse_api/client.rb index abc1234..def5678 100644 --- a/lib/discourse_api/client.rb +++ b/lib/discourse_api/client.rb @@ -12,4 +12,5 @@ get :topics_hot => "/hot.json" get :categories => "/categories.json" + get :topic => "/t/:topic_id.json" end
Add the "get a single topic" endpoint to the API
diff --git a/lib/editor_configuration.rb b/lib/editor_configuration.rb index abc1234..def5678 100644 --- a/lib/editor_configuration.rb +++ b/lib/editor_configuration.rb @@ -1,5 +1,5 @@ class EditorConfiguration < Configuration preference :enabled, :boolean, :default => true - preference :current_editor, :string, :default => 'TinyMCE' + preference :current_editor, :string, :default => 'WYMEditor' preference :ids, :text, :default => 'product_description page_body' end
Switch default editor ofr WYMEditor
diff --git a/app/models/node.rb b/app/models/node.rb index abc1234..def5678 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -1,6 +1,6 @@ class Node < ActiveRecord::Base - has_many :documents - has_many :settings, :class_name => 'NodeSetting' + has_many :documents, :dependent => :destroy + has_many :settings, :class_name => 'NodeSetting', :dependent => :destroy acts_as_nested_set acts_as_list :scope => :parent_id
Destroy dependent document and settings
diff --git a/app/models/rule.rb b/app/models/rule.rb index abc1234..def5678 100644 --- a/app/models/rule.rb +++ b/app/models/rule.rb @@ -1,5 +1,2 @@ class Rule < ActiveRecord::Base - # strange naming b/c :transaction is a reserved method in AR::B - belongs_to :transact, class_name: 'Transaction', foreign_key: 'transaction_id' - has_many :applied_changes, class_name: 'Change', foreign_key: 'rule_id' end
Remove junk from Rule model
diff --git a/app/models/user.rb b/app/models/user.rb index abc1234..def5678 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -12,4 +12,6 @@ # class User < ActiveRecord::Base + def self.find_or_create_from_auth_hash(auth_hash) + end end
Add Method in User Model
diff --git a/app/models/user.rb b/app/models/user.rb index abc1234..def5678 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,4 +1,6 @@ class User < ActiveRecord::Base include ActiveModel::Validations validates :name, :city, :email, presence: true + validates :email, uniqueness: { case_sensitive: false }, on: :create + validates :email, uniqueness: { case_sensitive: false }, on: :update end
Add uniqueness validation for email on create & update
diff --git a/app/models/user.rb b/app/models/user.rb index abc1234..def5678 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,5 +1,13 @@ class User < ApplicationRecord has_many :documents + before_save :set_civic_json + validates :address, :first_name, :last_name, :zip_code, :city, :state, presence: true + private + def set_civic_json() + request = "https://www.googleapis.com/civicinfo/v2/representatives?key=#{ENV['GOOGLE_CIVIC_API_KEY']} &address=#{self.address}" + response = HTTParty.get(request) + @user.update(civic_json: response) + end - validates :address, :first_name, :last_name, :zip_code, :city, :state, presence: true end +
Add set_civic_json method to User
diff --git a/Casks/zero-xed.rb b/Casks/zero-xed.rb index abc1234..def5678 100644 --- a/Casks/zero-xed.rb +++ b/Casks/zero-xed.rb @@ -0,0 +1,7 @@+class ZeroXed < Cask + url 'http://www.suavetech.com/cgi-bin/download.cgi?0xED.tar.bz2' + homepage 'http://www.suavetech.com/0xed/' + version '1.1.3' + sha1 'b3dac8ac993860e4390bd7cc652126ea543fd364' + link '0xED.app' +end
Add 0xed to homebrew cask. 0xED is a native OS X hex editor based on the Cocoa framework.
diff --git a/backend/app/controllers/comable/admin/user_sessions_controller.rb b/backend/app/controllers/comable/admin/user_sessions_controller.rb index abc1234..def5678 100644 --- a/backend/app/controllers/comable/admin/user_sessions_controller.rb +++ b/backend/app/controllers/comable/admin/user_sessions_controller.rb @@ -1,6 +1,7 @@ module Comable module Admin class UserSessionsController < Devise::SessionsController + helper Comable::Admin::ApplicationHelper layout 'comable/admin/application' end end
Fix the problem that cannot call `page_name` method
diff --git a/lib/middleman-disqus/extension.rb b/lib/middleman-disqus/extension.rb index abc1234..def5678 100644 --- a/lib/middleman-disqus/extension.rb +++ b/lib/middleman-disqus/extension.rb @@ -11,7 +11,7 @@ end def self.options(options = {}) - options = options.to_h.map do |k,obj| + options = options.to_hash.map do |k,obj| k =~ /^disqus_(.*)$/ ? [$1, obj] : nil end options = Hash[options.compact]
Fix issues with Ruby 1.9.3. `#to_h` does exist on `Middleman::Configuration::ConfigurationManager`. `#to_h` is known as `#to_hash` on Hash.
diff --git a/lib/timetable/downloader.rb b/lib/timetable/downloader.rb index abc1234..def5678 100644 --- a/lib/timetable/downloader.rb +++ b/lib/timetable/downloader.rb @@ -2,7 +2,7 @@ module Timetable REMOTE_HOST = "www.doc.ic.ac.uk" - REMOTE_PATH = "internal/timetables/timetable/:season/class" + REMOTE_PATH = "internal/timetables/:season/class" REMOTE_FILE = ":course_:start_:end.htm" class Downloader
Change the source URL for the HTML timetables to no longer use drafts
diff --git a/phil.gemspec b/phil.gemspec index abc1234..def5678 100644 --- a/phil.gemspec +++ b/phil.gemspec @@ -11,11 +11,11 @@ s.authors = ["Cameron Daigle"] s.email = ["cameron@hashrocket.com"] - s.description = "Phil makes it easy to generate content for your UI mockups." + s.description = "Phil is a collection of markup generation and iteration methods to ease creation of UI mockups. It uses Faker for standard content generation and adds a number of convenience methods and ways to build consistently varied markup for layout testing." s.homepage = "https://github.com/camerond/phil" s.require_paths = ["lib"] - s.summary = "Phil brings the content." + s.summary = "Quickly and easily generate varied markup and content." s.required_ruby_version = '>= 1.9.3'
Update gemspec description and summary
diff --git a/app/workers/gamedev_worker.rb b/app/workers/gamedev_worker.rb index abc1234..def5678 100644 --- a/app/workers/gamedev_worker.rb +++ b/app/workers/gamedev_worker.rb @@ -21,7 +21,8 @@ user_display_name: question.owner[:display_name], body_html: question.body, source_url: question.link, - external_id: question.question_id) + external_id: question.question_id, + tags_string: 'question') end Sidekiq::Cron::Job.create(
Tag GameDev external posts with a tag of "question"
diff --git a/graphql-batch.gemspec b/graphql-batch.gemspec index abc1234..def5678 100644 --- a/graphql-batch.gemspec +++ b/graphql-batch.gemspec @@ -18,6 +18,8 @@ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] + spec.metadata['allowed_push_host'] = "https://rubygems.org" + spec.add_runtime_dependency "graphql", ">= 1.3", "< 2" spec.add_runtime_dependency "promise.rb", "~> 0.7.2"
Add allowed_push_host to gemspec to fix release script
diff --git a/app/validators/renalware/patients/blood_pressure_validator.rb b/app/validators/renalware/patients/blood_pressure_validator.rb index abc1234..def5678 100644 --- a/app/validators/renalware/patients/blood_pressure_validator.rb +++ b/app/validators/renalware/patients/blood_pressure_validator.rb @@ -22,7 +22,7 @@ def validate_diastolic_less_than_systolic(bp) errors = bp.errors return if errors.any? - unless bp.diastolic < bp.systolic + unless bp.diastolic.to_f < bp.systolic.to_f errors.add(:diastolic, :must_be_less_than_systolic) end end
Fix BP diastolic < systolic comparison where one is a string Previously if diastolic was “100 “ and systolic “80” the former was interpretted as a string and the comparison raised `comparison of Integer with String failed`
diff --git a/engines/standard_tasks/spec/features/assign_reviewer_task_spec.rb b/engines/standard_tasks/spec/features/assign_reviewer_task_spec.rb index abc1234..def5678 100644 --- a/engines/standard_tasks/spec/features/assign_reviewer_task_spec.rb +++ b/engines/standard_tasks/spec/features/assign_reviewer_task_spec.rb @@ -25,6 +25,7 @@ manuscript_page = dashboard_page.view_submitted_paper paper manuscript_page.view_card task.title do |overlay| overlay.paper_reviewers = [albert.full_name, neil.full_name] + expect(overlay).to have_no_application_error expect(overlay).to have_reviewers(albert, neil) # the debounce in the reviewers overlay is causing a race condition between the # delayed save and the database truncation during test cleanup. This will fix it for now.
Add another check around assigning reviewers just in case.
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index abc1234..def5678 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -26,8 +26,6 @@ :conditions => ['(created_at > ? OR updated_at > ?) and article_category_id = ?', cutoff, cutoff, @news_category], :order => 'created_at desc' ) - #@discipline_names = Discipline.find_all_names - #@article_categories = ArticleCategory.all( :conditions => ["parent_id = 0"], :order => "position") expires_in 1.hour, :public => true
Remove commented code from home controller.
diff --git a/app/controllers/pets_controller.rb b/app/controllers/pets_controller.rb index abc1234..def5678 100644 --- a/app/controllers/pets_controller.rb +++ b/app/controllers/pets_controller.rb @@ -20,20 +20,6 @@ # POST /pets # POST /pets.json def create - @pet = Pet.new(pet_params) - - respond_to do |format| - if @pet.save - format.html { redirect_to @pet, notice: 'Pet was successfully created.' } - format.json { render action: 'show', status: :created, location: @pet } - else - format.html { render action: 'new' } - format.json { render json: @pet.errors, status: :unprocessable_entity } - end - end - end - - # PATCH/PUT /pets/1 @pet = Pet.new @pet.save(validate: false) redirect_to pet_step_path(@pet, Pet.form_steps.first)
Implement create action for PetsController
diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index abc1234..def5678 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -1,17 +1,4 @@ class NotificationMailer < ApplicationMailer - - def validation_result(user, aru, validation_report, validation_report_csv_file) - @user = user - @aru = aru - @status = validation_report[:CITESReportResult][:Status] - @message = validation_report[:CITESReportResult][:Message] - @has_errors = @aru.validation_report.present? - if @has_errors - attachments["validation_report_#{@aru.id}.csv"] = File.read(validation_report_csv_file.path) -u - end - mail(to: @user.email, subject: 'CITES Report validation result') - end def changelog(user, aru, csv_file) @user = user
Remove obsolete method in mailer
diff --git a/app/serializers/root_serializer.rb b/app/serializers/root_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/root_serializer.rb +++ b/app/serializers/root_serializer.rb @@ -2,14 +2,17 @@ adapter Oat::Adapters::HAL schema do - link :accounts, + link :account, href: "/accounts/{address}", templated: true + link :account_transactions, + href: "/accounts/{address}/transactions{?after}{?limit}{?order}", + templated: true + link :transaction, + href: "/transactions/{hash}", + templated: true link :transactions, - href: "/transactions{?order}{?limit}{?after}{?before}", - templated: true - link :account_transactions, - href: "/accounts/{address}/transactions{?order}{?limit}{?after}{?before}", + href: "/transactions{?after}{?limit}{?order}", templated: true link :metrics, href: "/metrics",
Update root links, notably rename `accounts` to `account`
diff --git a/spec/helpers/application_helper/buttons/iso_datastore_new_spec.rb b/spec/helpers/application_helper/buttons/iso_datastore_new_spec.rb index abc1234..def5678 100644 --- a/spec/helpers/application_helper/buttons/iso_datastore_new_spec.rb +++ b/spec/helpers/application_helper/buttons/iso_datastore_new_spec.rb @@ -2,28 +2,22 @@ let(:view_context) { setup_view_context_with_sandbox({}) } let(:button) { described_class.new(view_context, {}, {}, {}) } - before(:all) { clean_up } + describe '#calculate_properties' do + context 'when there is a RedHat InfraManager without iso datastores' do + before do + FactoryGirl.create(:ems_redhat) + button.calculate_properties + end - def clean_up - ManageIQ::Providers::Redhat::InfraManager.delete_all - end - - describe '#calculate_properties' do - before(:each) do - setup - button.calculate_properties - end - after(:each) { clean_up } - - context 'when there is a RedHat InfraManager without iso datastores' do - let(:setup) { FactoryGirl.create(:ems_redhat) } it_behaves_like 'an enabled button' end + context 'when all RedHat InfraManagers have iso datastores' do - let(:setup) do - ems = FactoryGirl.create(:ems_redhat) - FactoryGirl.create(:iso_datastore, :ems_id => ems.id) + before do + FactoryGirl.create(:iso_datastore, :ems_id => FactoryGirl.create(:ems_redhat).id) + button.calculate_properties end + it_behaves_like 'a disabled button', 'No Providers are available to create an ISO Datastore on' end end
Remove unnecessary before(:all) call from a button spec
diff --git a/core/db/migrate/20130213191427_create_default_stock.rb b/core/db/migrate/20130213191427_create_default_stock.rb index abc1234..def5678 100644 --- a/core/db/migrate/20130213191427_create_default_stock.rb +++ b/core/db/migrate/20130213191427_create_default_stock.rb @@ -5,17 +5,12 @@ location = Spree::StockLocation.new(name: 'default') location.save(validate: false) - Spree::StockItem.class_eval do - # Column name check here for #3805 - unless column_names.include?("deleted_at") - def self.acts_as_paranoid; end - end - end - Spree::Variant.all.each do |variant| - stock_item = location.stock_items.build(variant: variant) + stock_item = Spree::StockItem.unscoped.build(stock_location: location, variant: variant) stock_item.send(:count_on_hand=, variant.count_on_hand) - stock_item.save! + # Avoid running default_scope defined by acts_as_paranoid, related to #3805, + # validations would run a query with a delete_at column tha might not be present yet + stock_item.save! validate: false end remove_column :spree_variants, :count_on_hand
Use `unscoped` when create stock items in migration By the time the migration runs the default scope with deleted_at was already defined so mocking acts_as_paranoid doesn't make any difference related to #3805
diff --git a/app/controllers/ajo_register/passwords_controller.rb b/app/controllers/ajo_register/passwords_controller.rb index abc1234..def5678 100644 --- a/app/controllers/ajo_register/passwords_controller.rb +++ b/app/controllers/ajo_register/passwords_controller.rb @@ -6,7 +6,13 @@ end def create - super + self.resource = resource_class.send_reset_password_instructions(resource_params) + + if successfully_sent?(resource) + respond_with({}, :location => after_sending_reset_password_instructions_path_for(resource_name)) + else + redirect_to request.fullpath + end end def destroy
Add after sign up path
diff --git a/test/integration/search_test.rb b/test/integration/search_test.rb index abc1234..def5678 100644 --- a/test/integration/search_test.rb +++ b/test/integration/search_test.rb @@ -30,4 +30,13 @@ assert_selector '.ad_excerpt_list', count: 0 assert_text 'No hay anuncios que coincidan con la búsqueda espejo' end + + it 'shows a no results message when nothing found in current section' do + click_link 'peticiones' + fill_in 'q', with: 'muebles' + click_button 'buscar' + + assert_selector '.ad_excerpt_list', count: 0 + assert_text 'No hay anuncios que coincidan con la búsqueda muebles' + end end
Add a test for searching in the wrong section
diff --git a/spec/lib/oauth/invalid_token_response_spec.rb b/spec/lib/oauth/invalid_token_response_spec.rb index abc1234..def5678 100644 --- a/spec/lib/oauth/invalid_token_response_spec.rb +++ b/spec/lib/oauth/invalid_token_response_spec.rb @@ -5,49 +5,49 @@ module Doorkeeper::OAuth describe InvalidTokenResponse do - describe '#name' do + describe "#name" do it { expect(subject.name).to eq(:invalid_token) } end - describe '#status' do + describe "#status" do it { expect(subject.status).to eq(:unauthorized) } end describe :from_access_token do let(:response) { InvalidTokenResponse.from_access_token(access_token) } - context 'revoked' do + context "revoked" do let(:access_token) { double(revoked?: true, expired?: true) } - it 'sets a description' do - expect(response.description).to include('revoked') + it "sets a description" do + expect(response.description).to include("revoked") end - it 'sets the reason' do + it "sets the reason" do expect(response.reason).to eq(:revoked) end end - context 'expired' do + context "expired" do let(:access_token) { double(revoked?: false, expired?: true) } - it 'sets a description' do - expect(response.description).to include('expired') + it "sets a description" do + expect(response.description).to include("expired") end - it 'sets the reason' do + it "sets the reason" do expect(response.reason).to eq(:expired) end end - context 'unkown' do + context "unkown" do let(:access_token) { double(revoked?: false, expired?: false) } - it 'sets a description' do - expect(response.description).to include('invalid') + it "sets a description" do + expect(response.description).to include("invalid") end - it 'sets the reason' do + it "sets the reason" do expect(response.reason).to eq(:unknown) end end
Fix hound ci style violation. :cop:
diff --git a/lib/cars_api/in_memory/car_store.rb b/lib/cars_api/in_memory/car_store.rb index abc1234..def5678 100644 --- a/lib/cars_api/in_memory/car_store.rb +++ b/lib/cars_api/in_memory/car_store.rb @@ -39,7 +39,7 @@ def car_markers data.map do |car| - CarMarker.from(location, car, units) + CarMarkerFactory.from(location, car, units) end end end
Fix typo: CarMarker -> CarMarkerFactory
diff --git a/lib/generators/spree_i18n/install/install_generator.rb b/lib/generators/spree_i18n/install/install_generator.rb index abc1234..def5678 100644 --- a/lib/generators/spree_i18n/install/install_generator.rb +++ b/lib/generators/spree_i18n/install/install_generator.rb @@ -4,8 +4,8 @@ class_option :auto_run_migrations, :type => :boolean, :default => true def add_javascripts - append_file "app/assets/javascripts/admin/all.js", "//= require admin/spree_i18n" - append_file "app/assets/javascripts/store/all.js", "//= require store/spree_i18n" + append_file "app/assets/javascripts/admin/all.js", "//= require admin/spree_i18n\n" + append_file "app/assets/javascripts/store/all.js", "//= require store/spree_i18n\n" end def add_stylesheets
Add newline for append_file arguments in add_javascripts (install) Using append_file without a new line in add_javascripts() causes the file `all.js' to be saved without a new line at the end and making the next (different) plugin install fail to write valid data to this file. For example after installing spree_reviews which appends jquery.rating to all.js the diff looks like: -//= require store/spree_i18n \ No newline at end of file +//= require store/spree_i18n//= require jquery.rating Added '\n' suffix for the string arguments of append_file to fix. Signed-off-by: Ali Polatel <0f146d6181d0bc316e9106f837f865c4cdfe1dea@ozguryazilim.com.tr>
diff --git a/lib/devise_password_filter/model.rb b/lib/devise_password_filter/model.rb index abc1234..def5678 100644 --- a/lib/devise_password_filter/model.rb +++ b/lib/devise_password_filter/model.rb @@ -7,7 +7,7 @@ def password_not_common if Rails.application.config.filter_passwords.include?(password) - self.errors.add_to_base("This password is on a list of commonly used ones. Please choose another password.") + self.errors.add(:password, "This password is on a list of commonly used ones. Please choose another password.") end end end
Fix use of add_to_base when adding error
diff --git a/lib/nehm/commands/search_command.rb b/lib/nehm/commands/search_command.rb index abc1234..def5678 100644 --- a/lib/nehm/commands/search_command.rb +++ b/lib/nehm/commands/search_command.rb @@ -14,7 +14,7 @@ 'Add track(s) to iTunes playlist with PLAYLIST name') add_option(:"-lim", '-lim NUMBER', - 'Show NUMBER tracks on each page') + 'Show NUMBER+1 tracks on each page') end
Edit help in 'search' command
diff --git a/config/initializers/rakwik.rb b/config/initializers/rakwik.rb index abc1234..def5678 100644 --- a/config/initializers/rakwik.rb +++ b/config/initializers/rakwik.rb @@ -1,4 +1,4 @@-if Rails.env.production? +if Rails.env.production? or ENV['RAKWIK'] Rails.application.config.middleware.use Rakwik::Tracker, piwik_url: 'http://dev.altimos.de/piwik/piwik.php', site_id: '4', token_auth: ENV['RAKWIK_AUTH_TOKEN'], track_404: false, path: '/api'
Allow to start Rakwik in dev mode by enabling RAKWIK evn var.
diff --git a/SwiftSafe.podspec b/SwiftSafe.podspec index abc1234..def5678 100644 --- a/SwiftSafe.podspec +++ b/SwiftSafe.podspec @@ -2,10 +2,10 @@ Pod::Spec.new do |s| s.name = "SwiftSafe" - s.version = "0.1" + s.version = "2.0.0" s.summary = "Thread synchronization made easy." - s.homepage = "https://github.com/czechboy0/SwiftSafe" + s.homepage = "https://github.com/nodes-ios/SwiftSafe" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Honza Dvorsky" => "https://honzadvorsky.com" } @@ -16,7 +16,7 @@ s.watchos.deployment_target = "2.0" s.tvos.deployment_target = "9.0" - s.source = { :git => "https://github.com/czechboy0/SwiftSafe.git", :tag => "v#{s.version}" } + s.source = { :git => "https://github.com/nodes-ios/SwiftSafe.git", :tag => "#{s.version}" } s.source_files = "Safe/*.swift"
Fix error in .podspec file
diff --git a/test/integration/rails/nip_test.rb b/test/integration/rails/nip_test.rb index abc1234..def5678 100644 --- a/test/integration/rails/nip_test.rb +++ b/test/integration/rails/nip_test.rb @@ -2,22 +2,31 @@ require 'supermodel' require "nip_pesel_regon/integration/rails" -class Company < SuperModel::Base - extend ActiveModel::Validations::HelperMethods - validates_nip_of :nip + +module Test + module Integration + module Rails + module Nip + class Company < SuperModel::Base + extend ActiveModel::Validations::HelperMethods + validates_nip_of :nip + end + + class NipTest < Minitest::Test + + def test_that_nip_validates_properly_in_model + c = Company.new(nip: '5882247715') + assert c.valid? + end + + def test_that_improper_nip_do_not_validate_in_model + c = Company.new(nip: '5882247716') + refute c.valid? + end + + end + end + end + end end -# @todo - check if add namespace here -class NipTest < Minitest::Test - - def test_that_nip_validates_properly_in_model - c = Company.new(nip: '5882247715') - assert c.valid? - end - - def test_that_improper_nip_do_not_validate_in_model - c = Company.new(nip: '5882247716') - refute c.valid? - end - -end
Add namespace for nip tests
diff --git a/ajw2.gemspec b/ajw2.gemspec index abc1234..def5678 100644 --- a/ajw2.gemspec +++ b/ajw2.gemspec @@ -6,8 +6,8 @@ Gem::Specification.new do |spec| spec.name = "ajw2" spec.version = Ajw2::VERSION - spec.authors = ["dtan4"] - spec.email = ["dtanshi45@gmail.com"] + spec.authors = ["fujita"] + spec.email = ["fujita@tt.cs.titech.ac.jp"] spec.summary = %q{TODO: Write a short summary. Required.} spec.description = %q{TODO: Write a longer description. Optional.} spec.homepage = ""
Fix author information to use ttlab account
diff --git a/dm-cassanda-adapter.gemspec b/dm-cassanda-adapter.gemspec index abc1234..def5678 100644 --- a/dm-cassanda-adapter.gemspec +++ b/dm-cassanda-adapter.gemspec @@ -15,6 +15,8 @@ gem.test_files = `git ls-files -- spec/{unit,integration}`.split($/) gem.extra_rdoc_files = %w[LICENSE README.md CONTRIBUTING.md TODO] + gem.required_ruby_version = '>= 1.9.3' + gem.add_runtime_dependency('dm-core', '~> 1.2.1') gem.add_runtime_dependency('ciql', '~> 0.2') gem.add_runtime_dependency('simple_uuid', '~> 0.3')
Add minimum required ruby version as 1.9.3 * This is mostly to trigger the build on travis, but the code has not been tested with anything below 1.9.3.
diff --git a/app/controllers/site_posts_controller.rb b/app/controllers/site_posts_controller.rb index abc1234..def5678 100644 --- a/app/controllers/site_posts_controller.rb +++ b/app/controllers/site_posts_controller.rb @@ -16,6 +16,12 @@ end def site_id + # NOTE: env['SERVER_NAME'] よりも、 request.domain や + # request.subdomain のほうがいいかもしれない。 + # 例: http://site1.lvh.me/ の場合 + # * env['SERVER_NAME'] #=> site1.lvh.me + # * request.domain #=> lvh.me + # * request.subdomain #=> site1 case env['SERVER_NAME'] when /\Asite1\./ 1
Add a note for request.domain and request.subdomain
diff --git a/DeclarativeLayout.podspec b/DeclarativeLayout.podspec index abc1234..def5678 100644 --- a/DeclarativeLayout.podspec +++ b/DeclarativeLayout.podspec @@ -1,10 +1,14 @@ Pod::Spec.new do |s| s.name = 'DeclarativeLayout' s.version = '0.2.0' - s.summary = 'This library is a wrapper around UIKit/Autolayout that allows you to declaratively define the layout of your views' + s.summary = 'A declarative, expressive and efficient way to lay out your views.' s.description = <<-DESC -This library is a wrapper around UIKit/Autolayout that allows you to declaratively define the layout of your views. Redefine the layout of your views and the library will handle adding/removing subviews as well as activating and deactivating constraints as needed. +* Declarative - Tell the framework what the layout of your views should be and let the framework intelligently add/modify/remove constraints and views for you. +* Expressive - Let your code visually express the hierarchy of your views. +* Fast - The example below, running on an iPhone X will update the layout in under 3 milliseconds. +* Flexible - Write the same constraints you already do, using whatever autolayout constraint DSL you prefer. +* Small - Small and readable Swift 4 codebase. DESC s.homepage = 'https://github.com/HotCocoaTouch/DeclarativeLayout'
Update Podspec with new descriptions
diff --git a/app/presenters/edition_diff_presenter.rb b/app/presenters/edition_diff_presenter.rb index abc1234..def5678 100644 --- a/app/presenters/edition_diff_presenter.rb +++ b/app/presenters/edition_diff_presenter.rb @@ -5,17 +5,18 @@ return attributes unless edition.present? Edition::TOP_LEVEL_FIELDS.each do |field| - attributes[field.to_s] = edition.public_send(field) + attributes[field.to_sym] = edition.public_send(field) end - attributes["links"] = {} + attributes[:links] = {} edition.links.each do |link| - attributes["links"][link.link_type] ||= [] - attributes["links"][link.link_type] << link.target_content_id + link_type = link.link_type.to_sym + attributes[:links][link_type] ||= [] + attributes[:links][link_type] << link.target_content_id end - attributes["change_note"] = edition.change_note&.note || {} + attributes[:change_note] = edition.change_note&.note || {} attributes end
Use symbols rather than strings for edition diff This is more consistent with the contents of the editions - eg routes and details have symbol keys within them.
diff --git a/app/services/firebase_cloud_messaging.rb b/app/services/firebase_cloud_messaging.rb index abc1234..def5678 100644 --- a/app/services/firebase_cloud_messaging.rb +++ b/app/services/firebase_cloud_messaging.rb @@ -11,7 +11,8 @@ event: 'report_created', report: report.id, title: report.title, - location_name: report.location_name + location_name: report.location_name, + author_name: report.author.name }) end
Add author name to notifications.
diff --git a/spec/bsf/scraper/command_spec.rb b/spec/bsf/scraper/command_spec.rb index abc1234..def5678 100644 --- a/spec/bsf/scraper/command_spec.rb +++ b/spec/bsf/scraper/command_spec.rb @@ -3,10 +3,73 @@ describe Bsf::Scraper::Command do describe '.initialize' do + it { expect { described_class.new }. to raise_error(ArgumentError, /0 for 1/) } it { expect { described_class.new("test") }. to raise_error(ArgumentError, /must be an Array/) } + + describe "argument validation" do + + let(:error_message) {@error_message.string} + + before(:each) do + @error_message = StringIO.new + $stderr = @error_message + end + + after(:all) do + $stderr = STDERR + end + + it "validates presence of --csv-path argument" do + create_class [] + error_message.should match /--csv-path must be specified/ + end + + it "validates presence of --database-name argument" do + create_class ['--csv-path'] + error_message.should match /--database-name must be specified/ + end + + it "validates presence of --database-user argument" do + create_class ['--csv-path', '--database-name'] + error_message.should match /--database-user must be specified/ + end + + it "validates presence of --database-password argument" do + create_class ['--csv-path', '--database-name', '--database-user'] + error_message.should match /--database-password must be specified/ + end + + it "validates presence of --csv-path argument parameter" do + create_class ['--csv-path', '--database-name', '--database-user', + '--database-password'] + error_message.should match /--csv-path' needs a parameter/ + end + + it "validates presence of --database-name argument parameter" do + create_class ['--csv-path', '/tmp/example.csv', '--database-name', + '--database-user', '--database-password'] + error_message.should match /--database-name' needs a parameter/ + end + + it "validates presence of --database-user argument parameter" do + create_class ['--csv-path', '/tmp/example.csv', '--database-name', + 'bsf', '--database-user', '--database-password'] + error_message.should match /--database-user' needs a parameter/ + end + + it "validates presence of --database-password argument parameter" do + create_class ['--csv-path', '/tmp/example.csv', '--database-name', + 'bsf', '--database-user', 'user', '--database-password'] + error_message.should match /--database-password' needs a parameter/ + end + + end end + def create_class(arguments) + lambda { described_class.new(arguments)}.should raise_error SystemExit + end end
Add tests for command-line argument validation Add tests for the command-line validation done using the Trollop library.
diff --git a/spec/factories/prover_factory.rb b/spec/factories/prover_factory.rb index abc1234..def5678 100644 --- a/spec/factories/prover_factory.rb +++ b/spec/factories/prover_factory.rb @@ -7,6 +7,10 @@ name { 'SPASS' } display_name { 'SPASS Prover' } + initialize_with do + Prover.find_by_name(name) || Prover.new(name: name) + end + trait :with_sequenced_name do after(:build) do |prover| prover.name = generate :prover_name
Fix prover factory trying to create duplicate.
diff --git a/spec/python-requirements_spec.rb b/spec/python-requirements_spec.rb index abc1234..def5678 100644 --- a/spec/python-requirements_spec.rb +++ b/spec/python-requirements_spec.rb @@ -11,3 +11,7 @@ describe package('build-essential'), :if => os[:family] == 'debian' do it { should be_installed } end + +describe command('which python') do + its(:exit_status) { should eq 0 } +end
Add spec to confirm Python command exist on PATH.
diff --git a/spec/read_time_estimator_spec.rb b/spec/read_time_estimator_spec.rb index abc1234..def5678 100644 --- a/spec/read_time_estimator_spec.rb +++ b/spec/read_time_estimator_spec.rb @@ -9,15 +9,15 @@ end end - describe "read_time" do + describe "read_time_words" do it "returns the reading time in phrase form when there is an even number of minutes" do text = "word " * 500 - expect(text.read_time).to eql "2 minutes to read" + expect(text.read_time_words).to eql "2 minutes to read" end it "returns the reading time in phrase form when there are seconds" do - text = "word" * 625 - expect(text.read_time).to eql "2 minutes and 30 seconds" + text = "word " * 625 + expect(text.read_time_words).to eql "2 minutes and 30 seconds" end end end
Change read_time method name to read_time_words. Add missing space to spec. PA-2182
diff --git a/lib/has_timestamps.rb b/lib/has_timestamps.rb index abc1234..def5678 100644 --- a/lib/has_timestamps.rb +++ b/lib/has_timestamps.rb @@ -20,6 +20,7 @@ after_save :save_or_destroy_timestamps def timestamp!(key) + #timestamps[key.to_s] = Time.zone.nil? ? Time.now : Time.zone.now timestamps[key.to_s] = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.now end
Use any time zone instead of just :utc.
diff --git a/lib/hotdog/sources.rb b/lib/hotdog/sources.rb index abc1234..def5678 100644 --- a/lib/hotdog/sources.rb +++ b/lib/hotdog/sources.rb @@ -61,6 +61,7 @@ end def update_tags(*args) + raise(NotImplementedError) end end end
Raise error if `update_tags` is not overridden
diff --git a/plugins/wordpress/check-wpscan.rb b/plugins/wordpress/check-wpscan.rb index abc1234..def5678 100644 --- a/plugins/wordpress/check-wpscan.rb +++ b/plugins/wordpress/check-wpscan.rb @@ -0,0 +1,94 @@+#! /usr/bin/env ruby +# +# wpscan check +# +# DESCRIPTION: +# Runs wpscan against a Wordpress site +# +# OUTPUT: +# plain-text +# +# PLATFORMS: +# Linux +# +# DEPENDENCIES: +# gem: sensu-plugin +# +# USAGE: +# check-wpscan.rb --url <url> +# +# NOTES: +# wpscan must be installed +# +# LICENSE: +# Copyright 2015 Eric Heydrick <eheydrick@gmail.com> +# Released under the same terms as Sensu (the MIT license); see LICENSE +# for details. +# + +require 'sensu-plugin/check/cli' +require 'open3' + +class WPScan < Sensu::Plugin::Check::CLI + option :url, + description: 'Scan target URL', + short: '-u URL', + long: '--url URL', + required: true + + option :wpscan, + description: 'Path to wpscan', + short: '-p PATH', + long: '--path PATH', + default: '/opt/wpscan/wpscan.rb' + + option :crit, + description: 'Critical threshold', + short: '-c CRITICAL', + long: '--critical CRITICAL', + proc: proc(&:to_i), + default: 1 + + option :warn_only, + description: 'Warn instead of critical on finding vulnerabilities', + short: '-w', + long: '--warn-only', + default: false + + def update_wpscan + `#{config[:wpscan]} --update` + end + + def run_wpscan + vulnerabilities = [] + + stdout, result = Open3.capture2("echo Y | #{config[:wpscan]} --url #{config[:url]} --follow-redirection --no-color") + + unknown stdout.split("\n").last unless result.success? + + stdout.each_line do |line| + line.scan(/\[(.)\](.*)/).each do |match| + if match[0] == '!' + vulnerabilities << match[1].strip + end + end + end + vulnerabilities + end + + def run + update_wpscan + + vulnerabilities = run_wpscan + + if vulnerabilities.size >= config[:crit] + if config[:warn_only] + warning vulnerabilities.join("\n") + else + critical vulnerabilities.join("\n") + end + elsif vulnerabilities.size.zero? + ok 'No vulnerabilities found' + end + end +end
Add check that runs wpscan against a Wordpress site and alerts when vulnerabilities are found
diff --git a/lib/type_validator.rb b/lib/type_validator.rb index abc1234..def5678 100644 --- a/lib/type_validator.rb +++ b/lib/type_validator.rb @@ -6,8 +6,9 @@ end def validate_each(record, attribute, value) - unless value.is_a?(options[:with]) - record.errors.add(attribute, "must be a #{options[:with]}, not #{value.class}") + classes = options[:in] || [options[:with]] + if classes.all? { |klass| !value.is_a?(klass) } + record.errors.add(attribute, "must be a #{classes.join(' or ')}, not a #{value.class}") end end end
Support multi types in TypeValidator
diff --git a/lib/udp2sqs_client.rb b/lib/udp2sqs_client.rb index abc1234..def5678 100644 --- a/lib/udp2sqs_client.rb +++ b/lib/udp2sqs_client.rb @@ -1,6 +1,2 @@ require_relative "udp2sqs_client/version" require_relative "udp2sqs_client/client" - -module Udp2sqsClient - # Your code goes here... -end
Delete the generated place-holder code.
diff --git a/lib/wordpress/dump.rb b/lib/wordpress/dump.rb index abc1234..def5678 100644 --- a/lib/wordpress/dump.rb +++ b/lib/wordpress/dump.rb @@ -4,7 +4,7 @@ attr_reader :doc def initialize(file_name) - file_name = File.absolute_path(file_name) + file_name = File.expand_path(file_name) raise "Given file '#{file_name}' no file or not readable." \ unless File.file?(file_name) && File.readable?(file_name)
Use File.expand_path instead of File.absolute_path to work with Ruby 1.8.7
diff --git a/lib/wright/dry_run.rb b/lib/wright/dry_run.rb index abc1234..def5678 100644 --- a/lib/wright/dry_run.rb +++ b/lib/wright/dry_run.rb @@ -1,10 +1,28 @@ module Wright @dry_run = false + # Public: Checks if dry-run mode is currently active. + # + # Examples + # + # puts 'Just a dry-run...' if Wright.dry_run? + # + # Returns true if dry-run mode is currently active and false otherwise. def self.dry_run? @dry_run end + # Public: Runs a block in dry-run mode. + # + # Examples + # + # Wright.dry_run do + # symlink '/tmp/fstab' do |s| + # s.to = '/etc/fstab' + # end + # end + # + # Returns the block's return value. def self.dry_run saved_dry_run = @dry_run @dry_run = true
Add documentation for dry-run mode
diff --git a/libraries/resolver.rb b/libraries/resolver.rb index abc1234..def5678 100644 --- a/libraries/resolver.rb +++ b/libraries/resolver.rb @@ -1,4 +1,4 @@-require 'Resolv' +require 'resolv' class Chef::Recipe::Resolver # We can call this with ISP.vhosts
Fix typo: 'Resolv' => 'resolv'
diff --git a/sms_broker.gemspec b/sms_broker.gemspec index abc1234..def5678 100644 --- a/sms_broker.gemspec +++ b/sms_broker.gemspec @@ -7,6 +7,7 @@ Gem::Specification.new do |s| s.name = "sms_broker" s.version = SmsBroker::VERSION + s.required_ruby_version = '>= 2.2.5' s.authors = ["Roger Kind Kristiansen"] s.email = ["roger@legelisten.no"] s.homepage = "http://www.legelisten.no"
Add required ruby version to gemspec
diff --git a/config/authorization_rules.rb b/config/authorization_rules.rb index abc1234..def5678 100644 --- a/config/authorization_rules.rb +++ b/config/authorization_rules.rb @@ -23,7 +23,7 @@ role :guest do has_permission_on :devise_sessions, :devise_registrations, :devise_confirmations, - :devise_invitations, to: :manage + :devise_invitations, :devise_passwords, to: :manage has_permission_on :home, to: :show has_permission_on :issues, to: [:show, :index, :geometry, :all_geometries] has_permission_on :message_threads, :messages, to: :view
Add devise passwords controller to auth rules. For "forgotten password" action, and others?
diff --git a/test/lib/typus/i18n_test.rb b/test/lib/typus/i18n_test.rb index abc1234..def5678 100644 --- a/test/lib/typus/i18n_test.rb +++ b/test/lib/typus/i18n_test.rb @@ -10,4 +10,8 @@ assert_equal :en, Typus::I18n.default_locale end + test "available_locales" do + assert Typus::I18n.available_locales.is_a?(Hash) + end + end
Make sure Typus::I18n.available_locales returns a Hash
diff --git a/test/test_lknovel_series.rb b/test/test_lknovel_series.rb index abc1234..def5678 100644 --- a/test/test_lknovel_series.rb +++ b/test/test_lknovel_series.rb @@ -7,8 +7,8 @@ series = Lknovel::Series.new('http://lknovel.lightnovel.cn/main/vollist/615.html') series.parse - it 'volume[0]' do - volume = series.volumes[0] + it 'volume[1]' do + volume = series.volumes[1] volume.url.must_equal 'http://lknovel.lightnovel.cn/main/book/2123.html' end
Fix lknovel series test case
diff --git a/builder/test-integration/spec/hypriotos-image/hypriot-list_spec.rb b/builder/test-integration/spec/hypriotos-image/hypriot-list_spec.rb index abc1234..def5678 100644 --- a/builder/test-integration/spec/hypriotos-image/hypriot-list_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/hypriot-list_spec.rb @@ -1,11 +1,11 @@ require 'spec_helper' -describe file('/etc/apt/sources.list.d/hypriot.list') do - it { should be_file } - it { should be_mode 644 } - it { should be_owned_by 'root' } - it { should contain 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ jessie main' } -end +# describe file('/etc/apt/sources.list.d/hypriot.list') do +# it { should be_file } +# it { should be_mode 644 } +# it { should be_owned_by 'root' } +# it { should contain 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ jessie main' } +# end describe package('apt-transport-https') do it { should be_installed }
Fix integrations tests for hypriot apt repo Signed-off-by: Dieter Reuter <554783fc552b5b2a46dd3d7d7b9b2cce9a82c122@me.com>
diff --git a/spec/color_spec.rb b/spec/color_spec.rb index abc1234..def5678 100644 --- a/spec/color_spec.rb +++ b/spec/color_spec.rb @@ -0,0 +1,10 @@+require 'color' + +RSpec.describe RandomColor, "#init" do + it "initializes a rgb color with values between 0 and 255" do + color = RandomColor.new + expect(color.r).to be_within(128).of 128 + expect(color.g).to be_within(128).of 128 + expect(color.b).to be_within(128).of 128 + end +end
Add tests for color, which will be factored out from bitmap.
diff --git a/spec/parse_spec.rb b/spec/parse_spec.rb index abc1234..def5678 100644 --- a/spec/parse_spec.rb +++ b/spec/parse_spec.rb @@ -29,5 +29,9 @@ it "should raise an exception for non-data URLs" do expect { DataURL.parse('http://google.com/some,thing') }.to raise_error DataURL::InvalidURLError end + + it "should ignore invalid crap in base64'd data" do + DataURL.parse('data:;base64,YWJj!YWJj').first.should == 'abcabc' + end end end
Test that we ignore gibberish in base64 strings
diff --git a/db/migrate/20170328110106_fix_expression_in_tenant_quota_report.rb b/db/migrate/20170328110106_fix_expression_in_tenant_quota_report.rb index abc1234..def5678 100644 --- a/db/migrate/20170328110106_fix_expression_in_tenant_quota_report.rb +++ b/db/migrate/20170328110106_fix_expression_in_tenant_quota_report.rb @@ -0,0 +1,24 @@+class FixExpressionInTenantQuotaReport < ActiveRecord::Migration[5.0] + class MiqReport < ActiveRecord::Base + def self.with_tenant_custom_report_and_condition(value) + where(:db => 'Tenant', :rpt_type => 'Custom').where("conditions LIKE ?", "%#{value}%") + end + end + + OLD_VALUE = 'count: tenants.tenant_quotas'.freeze + NEW_VALUE = 'count: Tenant.tenant_quotas'.freeze + + def up + MiqReport.with_tenant_custom_report_and_condition(OLD_VALUE).each do |x| + x.conditions.gsub!(OLD_VALUE, NEW_VALUE) + x.save + end + end + + def down + MiqReport.with_tenant_custom_report_and_condition(NEW_VALUE).each do |x| + x.conditions.gsub!(NEW_VALUE, OLD_VALUE) + x.save + end + end +end
Fix field tenants.tenant_quotas of MiqExpression only for: - existing reports - custom reports(created by of 'Tenant Quota Report')
diff --git a/lib/interlatch/rails/extensions/action_controller.rb b/lib/interlatch/rails/extensions/action_controller.rb index abc1234..def5678 100644 --- a/lib/interlatch/rails/extensions/action_controller.rb +++ b/lib/interlatch/rails/extensions/action_controller.rb @@ -1,35 +1,42 @@-module ActionController - class Base - def caching_key(tag = nil, scope = nil) - options = { controller: controller_name, action: action_name, id: params[:id], tag: tag } - if scope == :global - options.merge! controller: 'any', action: 'any', id: 'any' - elsif scope == :controller - options.merge! action: 'any', id: 'any' - elsif scope == :action - options.merge! id: 'any' - end - locale = Interlatch.locale_method ? self.send(Interlatch.locale_method) : nil +module Interlatch + module Rails + module Extensions + module ActionController + def caching_key(tag = nil, scope = nil) + options = { controller: controller_name, action: action_name, id: params[:id], tag: tag } + if scope == :global + options.merge! controller: 'any', action: 'any', id: 'any' + elsif scope == :controller + options.merge! action: 'any', id: 'any' + elsif scope == :action + options.merge! id: 'any' + end + locale = Interlatch.locale_method ? self.send(Interlatch.locale_method) : nil - Interlatch.caching_key(options[:controller], options[:action], options[:id], options[:tag], locale) - end + Interlatch.caching_key(options[:controller], options[:action], options[:id], options[:tag], locale) + end - def behavior_cache(*args, &block) - options = args.extract_options! + def behavior_cache(*args, &block) + options = args.extract_options! - key = caching_key(options[:tag], options[:scope]) - unless fragment_exist? key - yield - args.each do |dependency| - add_dependency(key, dependency.to_s) + key = caching_key(options[:tag], options[:scope]) + unless fragment_exist? key + yield + args.each do |dependency| + add_dependency(key, dependency.to_s) + end + end + end + + private + def add_dependency(key, dependency) + dependency_cache = cache_store.fetch("interlatch:#{dependency}").try(:dup) || Set.new + dependency_cache << "views/#{key}" + cache_store.write("interlatch:#{dependency}", dependency_cache) end end end - - def add_dependency(key, dependency) - dependency_cache = cache_store.fetch("interlatch:#{dependency}").try(:dup) || Set.new - dependency_cache << "views/#{key}" - cache_store.write("interlatch:#{dependency}", dependency_cache) - end end end + +ActionController::Base.send(:include, Interlatch::Rails::Extensions::ActionController)
Use a module for ActionController extensions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3,7 +3,7 @@ # Devise will add extra flash messages. # We only want to display alerts, notices and errors def flash - super.select {|key, _| key.to_s.in? ["alert", "notice", "error"] } + Hash[super.select {|key, _| key.to_s.in? ["alert", "notice", "error"] }] end def flash_messages
Fix flash messages being selected into an array
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -23,7 +23,7 @@ end def last_updated(entity) - if entity.to_s.include? "by" + if entity.respond_to? 'user' "Last updated #{entity.updated_string} by #{link_to(entity.user)}".html_safe else "Last updated #{entity.updated_string}"
Refactor if statement to rely on better ruby methods
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,14 @@ module ApplicationHelper + def nav_link(text, link) + recognized = Rails.application.routes.recognize_path(link) + if recognized[:controller] == params[:controller] && recognized[:action] == params[:action] + content_tag(:li, :class => "active") do + link_to(text, link) + end + else + content_tag(:li) do + link_to(text, link) + end + end + end end
Create a helper to manage header links In the cases where we have a recognised path and are currently on it, show it as active.
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,4 @@+# Courseware helpers module ApplicationHelper # Helper to set page title #
Add application helper doc header.
diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index abc1234..def5678 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,7 +1,7 @@ class ApplicationMailer < ActionMailer::Base # TODO: Remove hard code domain default(from: Rails.application.config.action_mailer.smtp_settings[:from], - "Message-ID" =>"#{Digest::SHA2.hexdigest(Time.now.to_i.to_s)}@noty.im") + "Message-ID" => lambda {"#{Digest::SHA2.hexdigest(Time.now.to_i.to_s)}@noty.im" }) layout 'mailer' end
Switch to lambda to avoid same mesage id
diff --git a/app/models/converters/xml_json.rb b/app/models/converters/xml_json.rb index abc1234..def5678 100644 --- a/app/models/converters/xml_json.rb +++ b/app/models/converters/xml_json.rb @@ -23,9 +23,8 @@ end def json_to_xml(json) - hash = JSON.parse(json) - root = hash.keys.first - hash_for_xml = hash[root] + hash_for_xml = JSON.parse(json) + root = 'json' # TODO: implement array conversion as elements sequence without extra surrounding tag # TODO: implement xml attributes
Fix xml to json converting (root tag)
diff --git a/dimples.gemspec b/dimples.gemspec index abc1234..def5678 100644 --- a/dimples.gemspec +++ b/dimples.gemspec @@ -25,5 +25,6 @@ s.add_development_dependency 'minitest', '~> 5.8' s.add_development_dependency 'redcarpet', '~> 3.3' s.add_development_dependency 'erubis', '~> 2.7' - s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4' + s.add_development_dependency 'simplecov', '~> 0.14' + s.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.0' end
Add simplecov and update codeclimate-test-reporter.
diff --git a/toystore.gemspec b/toystore.gemspec index abc1234..def5678 100644 --- a/toystore.gemspec +++ b/toystore.gemspec @@ -18,7 +18,7 @@ s.require_paths = ["lib"] s.add_dependency 'adapter', '~> 0.5.1' - s.add_dependency 'activemodel', '~> 3.0', '< 3.2' - s.add_dependency 'activesupport', '~> 3.0', '< 3.2' + s.add_dependency 'activemodel', '~> 3.0' + s.add_dependency 'activesupport', '~> 3.0' s.add_dependency 'simple_uuid', '~> 0.2' end
Switch to a more liberal active support dependency.
diff --git a/connection.gemspec b/connection.gemspec index abc1234..def5678 100644 --- a/connection.gemspec +++ b/connection.gemspec @@ -20,5 +20,6 @@ s.add_development_dependency 'minitest' s.add_development_dependency 'minitest-spec-context' s.add_development_dependency 'pry' + s.add_development_dependency 'process_host' s.add_development_dependency 'runner' end
Add process host as development dependency
diff --git a/auto_html.gemspec b/auto_html.gemspec index abc1234..def5678 100644 --- a/auto_html.gemspec +++ b/auto_html.gemspec @@ -1,7 +1,6 @@ Gem::Specification.new do |gem| gem.name = 'auto_html' gem.version = '1.6.0' - gem.date = Date.today.to_s gem.summary = "Transform URIs to appropriate markup" gem.description = "Automatically transforms URIs (via domain) and includes the destination resource (Vimeo, YouTube movie, image, ...) in your document"
Remove gem.date from the gemspec. This was causing errors when deploying to engine yard and heroku. I've seen many other repos have this same issue. Another solution could be adding require 'date' to the gemspec, but I find setting gem.date to today's date somewhat useless.
diff --git a/RNFS.podspec b/RNFS.podspec index abc1234..def5678 100644 --- a/RNFS.podspec +++ b/RNFS.podspec @@ -11,6 +11,7 @@ s.author = { "Johannes Lumpe" => "johannes@lum.pe" } s.ios.deployment_target = '7.0' + s.tvos.deployment_target = '9.2' s.source = { :git => "https://github.com/itinance/react-native-fs", :tag => "v#{s.version}" } s.source_files = '*.{h,m}'
Add tvOS deployment target to podspec
diff --git a/activesupport/test/cache/behaviors/connection_pool_behavior.rb b/activesupport/test/cache/behaviors/connection_pool_behavior.rb index abc1234..def5678 100644 --- a/activesupport/test/cache/behaviors/connection_pool_behavior.rb +++ b/activesupport/test/cache/behaviors/connection_pool_behavior.rb @@ -4,12 +4,12 @@ def test_connection_pool Thread.report_on_exception, original_report_on_exception = false, Thread.report_on_exception + threads = [] + emulating_latency do begin cache = ActiveSupport::Cache.lookup_store(store, { pool_size: 2, pool_timeout: 1 }.merge(store_options)) cache.clear - - threads = [] assert_raises Timeout::Error do # One of the three threads will fail in 1 second because our pool size @@ -31,12 +31,12 @@ end def test_no_connection_pool + threads = [] + emulating_latency do begin cache = ActiveSupport::Cache.lookup_store(store, store_options) cache.clear - - threads = [] assert_nothing_raised do # Default connection pool size is 5, assuming 10 will make sure that
Fix test: threads being nil in ensure when connection_pool is not installed.
diff --git a/stomp_parser.gemspec b/stomp_parser.gemspec index abc1234..def5678 100644 --- a/stomp_parser.gemspec +++ b/stomp_parser.gemspec @@ -6,10 +6,10 @@ Gem::Specification.new do |spec| spec.name = "stomp_parser" spec.version = StompParser::VERSION - spec.authors = ["Kim Burgestrand"] - spec.email = ["kim@burgestrand.se"] + spec.authors = ["Kim Burgestrand", "Jonas Nicklas"] + spec.email = ["kim@burgestrand.se", "jonas.nicklas@gmail.com"] spec.summary = %q{STOMP frame parser.} - spec.homepage = "https://github.com/Burgestrand/stomp_parser" + spec.homepage = "https://github.com/stompede/stomp_parser" spec.license = "MIT" spec.files = `git ls-files`.split($/)
Add authors and correct homepage in gemspec
diff --git a/app/decorators/controllers/action_controller_base_decorator.rb b/app/decorators/controllers/action_controller_base_decorator.rb index abc1234..def5678 100644 --- a/app/decorators/controllers/action_controller_base_decorator.rb +++ b/app/decorators/controllers/action_controller_base_decorator.rb @@ -2,6 +2,12 @@ ActionController::Base.class_eval do prepend_before_action :detect_spreefinery_single_sign_on! + + def refinery_user? + if current_spree_user && current_spree_user.admin? + true + end + end private # This relies on a method added to lib/spree_refinery_authentication/authorisation_adapter
Add refinery_user? method in action_controller_base
diff --git a/rack-canonical-host.gemspec b/rack-canonical-host.gemspec index abc1234..def5678 100644 --- a/rack-canonical-host.gemspec +++ b/rack-canonical-host.gemspec @@ -7,7 +7,7 @@ gem.homepage = 'http://github.com/tylerhunt/rack-canonical-host' gem.author = 'Tyler Hunt' - gem.add_dependency 'rack', '>= 1.0.0' + gem.add_dependency 'rack', '~> 1.0' gem.add_development_dependency 'rspec', '~> 2.0' gem.files = `git ls-files`.split($\)
Use pessimistic version requirement for Rack.
diff --git a/Casks/intellij-idea-community.rb b/Casks/intellij-idea-community.rb index abc1234..def5678 100644 --- a/Casks/intellij-idea-community.rb +++ b/Casks/intellij-idea-community.rb @@ -2,6 +2,6 @@ url 'http://download-ln.jetbrains.com/idea/ideaIC-13.0.1.dmg' homepage 'https://www.jetbrains.com/idea/index.html' version '13.0.1' - sha1 '0f280843aaa1ba4cc5ab5b59d74e9592bc641fa3' + sha1 '99d18d3fcd49e9b93759dec13a950caf01b8570e' link 'IntelliJ IDEA 13 CE.app' end
Correct Intellij IDEA 13.0.1 SHA
diff --git a/Casks/xamarin-studio.rb b/Casks/xamarin-studio.rb index abc1234..def5678 100644 --- a/Casks/xamarin-studio.rb +++ b/Casks/xamarin-studio.rb @@ -1,6 +1,6 @@ class XamarinStudio < Cask - version '5.0.1.3-0' - sha256 '51e840a8b5e8679363290aee88af2cdadd9d99706ae346f787d07ecc27bdabe8' + version '5.4.0.240-0' + sha256 'bd5a3d28889a776190836c7cf3c19bbf749a01f2a45f74a118a535967ca3cc8a' url "http://download.xamarin.com/studio/Mac/XamarinStudio-#{version}.dmg" # non-Sparkle appcast
Bump Xamarin Studio to v5.4.0.240-0
diff --git a/recipes/nodejs_from_chocolatey.rb b/recipes/nodejs_from_chocolatey.rb index abc1234..def5678 100644 --- a/recipes/nodejs_from_chocolatey.rb +++ b/recipes/nodejs_from_chocolatey.rb @@ -18,11 +18,11 @@ chocolatey_package 'nodejs-lts' do version node['nodejs']['version'] - action :install + action :upgrade only_if node['nodejs']['version'] end chocolatey_package 'nodejs-lts' do - action :install + action :upgrade not_if node['nodejs']['version'] end
Change the action for nodejs chocolatey from install to upgrade This way it will upgrade to the active LTS version even if the version is maintenance LTS
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -36,6 +36,14 @@ ActionController::Base.view_paths = File.join(File.dirname(__FILE__), 'views') -ActionController::Routing::Routes.draw do |map| +InheritedResources::Router = ActionDispatch::Routing::RouteSet.new +InheritedResources::Router.draw do |map| map.connect ':controller/:action/:id' + map.connect ':controller/:action' end + +class ActiveSupport::TestCase + setup do + @router = InheritedResources::Router + end +end
Make tests run on master.
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -10,6 +10,7 @@ require 'helpers/test_cards' require 'pp' +require 'time' module Adyen::Test module Flaky
Fix tests by making sure Time.parse is available
diff --git a/test_runner.gemspec b/test_runner.gemspec index abc1234..def5678 100644 --- a/test_runner.gemspec +++ b/test_runner.gemspec @@ -25,6 +25,7 @@ s.add_runtime_dependency 'appium_lib', '= 0.15.2' s.add_runtime_dependency 'spec', '= 5.0.19' + s.add_runtime_dependency 'flaky', '= 0.0.22' s.files = `git ls-files`.split "\n" end
Add flaky for video recording
diff --git a/sinatra-formhelpers-ng.gemspec b/sinatra-formhelpers-ng.gemspec index abc1234..def5678 100644 --- a/sinatra-formhelpers-ng.gemspec +++ b/sinatra-formhelpers-ng.gemspec @@ -21,7 +21,7 @@ gem.require_paths = ["lib"] gem.rubygems_version = "2.4.5" - gem.add_development_dependency "bundler", "~> 1.8" + gem.add_development_dependency "bundler", "~> 1.6" gem.add_development_dependency "rake", "~> 10.0" gem.add_development_dependency "sinatra", "~> 1.4" gem.add_development_dependency "bacon", "~> 1.2"
Fix Bundler version for Travis-CI
diff --git a/shaq_overflow/app/controllers/votes_controller.rb b/shaq_overflow/app/controllers/votes_controller.rb index abc1234..def5678 100644 --- a/shaq_overflow/app/controllers/votes_controller.rb +++ b/shaq_overflow/app/controllers/votes_controller.rb @@ -3,6 +3,8 @@ def create if params[:votableType] == "Answer" answer_votes + elsif params[:votableType] == "Question" + question_votes end end @@ -21,4 +23,18 @@ end end + def question_votes + if request.xhr? + if params[:direction] == "up" + vote = Vote.create(votable_type: params[:votableType], user_id: current_user.id, value: 1, votable_id: params[:questionId]) + @question = Question.find(params[:questionId]) + else + vote = Vote.create(votable_type: params[:votableType], user_id: current_user.id, value: -1, votable_id: params[:questionId]) + @question = Question.find(params[:questionId]) + end + x = @question.q_net + x.to_json + render json: x + end + end end
Add logic for up/down vote for questions
diff --git a/Library/Formula/cfitsio.rb b/Library/Formula/cfitsio.rb index abc1234..def5678 100644 --- a/Library/Formula/cfitsio.rb +++ b/Library/Formula/cfitsio.rb @@ -1,4 +1,10 @@ require 'formula' + +class CfitsioExamples < Formula + url 'http://heasarc.gsfc.nasa.gov/docs/software/fitsio/cexamples/cexamples.zip' + md5 '31a5f5622a111f25bee5a3fda2fdac28' + version '2010.08.19' +end class Cfitsio < Formula url 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3280.tar.gz' @@ -6,10 +12,33 @@ md5 'fdb9c0f51678b47e78592c70fb5dc793' version '3.28' + def options + [ + ['--with-examples', "Compile and install example programs from http://heasarc.gsfc.nasa.gov/docs/software/fitsio/cexamples.html as well as fpack and funpack"] + ] + end + def install # --disable-debug and --disable-dependency-tracking are not recognized by configure system "./configure", "--prefix=#{prefix}" system "make shared" system "make install" + + if ARGV.include? '--with-examples' + system "make fpack funpack" + bin.install ['fpack', 'funpack'] + + # fetch, compile and install examples programs + CfitsioExamples.new.brew do + mkdir 'bin' + Dir.glob('*.c').each do |f| + # compressed_fits.c does not work (obsolete function call) + if f != 'compress_fits.c' + system "#{ENV.compiler} #{f} -I#{include} -L#{lib} -lcfitsio -lm -o bin/#{f.sub('.c','')}" + end + end + bin.install Dir['bin/*'] + end + end end end
CFitsIO: Add option to install example programs Added the option --with-examples to the cfitsio formula, that downloads, compiles and installs some useful programs, like listhead, modhead, etc. Signed-off-by: Charlie Sharpsteen <828d338a9b04221c9cbe286f50cd389f68de4ecf@sharpsteen.net>
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index abc1234..def5678 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -25,8 +25,8 @@ # Configure all nodes in nodeset c.before :suite do # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'apt') hosts.each do |host| + copy_module_to(host, :source => proj_root, :module_name => 'apt') shell("/bin/touch #{default['puppetpath']}/hiera.yaml") shell('puppet module install puppetlabs-stdlib --version 2.2.1', { :acceptable_exit_codes => [0,1] }) end
Fix issue with puppet_module_install, removed and using updated method from beaker core copy_module_to
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index abc1234..def5678 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -13,6 +13,6 @@ c.formatter = :documentation c.before :suite do - logger.info("Using Puppet version #{(on default, 'puppet --version').output.chomp}") + logger.info("Using Puppet version #{(on default, 'puppet --version').stdout.chomp}") end end
Print just the Puppet version, no other warning etc Facter complains about missing environment variables which is a bit noisy. Using stdout filters them out.
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index abc1234..def5678 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -14,7 +14,7 @@ # Install module and dependencies puppet_module_install(:source => proj_root, :module_name => 'tomcat') hosts.each do |host| - on host, puppet('module','install','camptocamp-archive'), { :acceptable_exit_codes => [0,1] } + on host, puppet('module','install','puppet-archive'), { :acceptable_exit_codes => [0,1] } on host, puppet('module','install','camptocamp-systemd'), { :acceptable_exit_codes => [0,1] } on host, puppet('module','install','herculesteam-augeasproviders_core'), { :acceptable_exit_codes => [0,1] } on host, puppet('module','install','herculesteam-augeasproviders_shellvar'), { :acceptable_exit_codes => [0,1] }
Use puppet-archive in acceptance tests
diff --git a/test/pachube_test.rb b/test/pachube_test.rb index abc1234..def5678 100644 --- a/test/pachube_test.rb +++ b/test/pachube_test.rb @@ -13,7 +13,14 @@ end def test_require_feed_id - svc = service({'api_key' => 'abcd1234'}, payload) + svc = service({'api_key' => 'abcd1234', 'track_branch' => 'xyz'}, payload) + assert_raises Service::ConfigurationError do + svc.receive_push + end + end + + def test_require_branch + svc = service({'api_key' => 'abcd1234', 'feed_id' => '123'}, payload) assert_raises Service::ConfigurationError do svc.receive_push end @@ -29,7 +36,7 @@ [200, {}, ''] end - svc = service({'api_key' => 'abcd1234', 'feed_id' => '1234'}, payload) + svc = service({'api_key' => 'abcd1234', 'feed_id' => '1234', 'track_branch' => 'xyz'}, payload) svc.receive_push end
Update the tests for Pachube
diff --git a/tasks/constructor-cms_tasks.rake b/tasks/constructor-cms_tasks.rake index abc1234..def5678 100644 --- a/tasks/constructor-cms_tasks.rake +++ b/tasks/constructor-cms_tasks.rake @@ -4,9 +4,7 @@ sh 'rake build' %w{core pages}.each do |engine| - sh "cd #{engine}" - sh "gem build constructor-#{engine}.gemspec && mv constructor-#{engine}-#{ConstructorCore::VERSION}.gem ./../pkg/" - sh "cd .." + sh "cd #{engine}; gem build constructor-#{engine}.gemspec; mv constructor-#{engine}-#{ConstructorCore::VERSION}.gem ./../pkg/" end end
Fix rakefile for building gems
diff --git a/acfs.gemspec b/acfs.gemspec index abc1234..def5678 100644 --- a/acfs.gemspec +++ b/acfs.gemspec @@ -18,8 +18,8 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = %w(lib) - spec.add_dependency 'activesupport' - spec.add_dependency 'activemodel' + spec.add_runtime_dependency 'activesupport' + spec.add_runtime_dependency 'activemodel' spec.add_development_dependency 'bundler', '~> 1.3' spec.add_development_dependency 'rake'
Switch to runtime dependencies. (Do not use alias.)
diff --git a/examples/creature.rb b/examples/creature.rb index abc1234..def5678 100644 --- a/examples/creature.rb +++ b/examples/creature.rb @@ -0,0 +1,38 @@+# Run this example: ruby examples/creature.rb +$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) +require 'slothify' + +class Creature +using Slothify + + SUPER_SLOW = 10 + attr_reader :name, :type, :speed + + def initialize(name, type, speed = :average) + @name = name + @type = type + @speed = speed + end + + def speak(str) + message = str + if type == :sloth + message = (speed == :super_slow ? str.slothify(SUPER_SLOW) : str.slothify) + end + puts "#{name} the #{type.to_s}: #{message}" + end +end + +# A thrilling conversation between creatures +farida = Creature.new("Farida", :ferret) +craig = Creature.new("Craig", :sloth, :slow) +senior_steve = Creature.new("Senior Steve", :sloth, :super_slow) + +farida.speak("Hello, fast world!") +craig.speak("Hi there.") +senior_steve.speak("Why hello, party people...") + +# Output: +# => "Hello, fast world!" +# => "Hiiii, thereeee!" +# => "Whyyyyyyyyy hellooooooooo, partyyyyyyyyy peopleeeeeeeee!"
Add examples folder and file
diff --git a/test/helpers__livereload_test.rb b/test/helpers__livereload_test.rb index abc1234..def5678 100644 --- a/test/helpers__livereload_test.rb +++ b/test/helpers__livereload_test.rb @@ -0,0 +1,18 @@+require "test_helper" + +class LivereloadTest < TestCase + test "#livereload_script has correct output" do + output = new_renderer.livereload_script(force: true) + + assert_equal(%{<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>}, output) + end + + private + + def new_renderer + renderer = Object.new + renderer.extend(Munge::Helpers::Tag) + renderer.extend(Munge::Helpers::Livereload) + renderer + end +end
Add test for view helper Livereload script output
diff --git a/bake.gemspec b/bake.gemspec index abc1234..def5678 100644 --- a/bake.gemspec +++ b/bake.gemspec @@ -18,6 +18,5 @@ spec.require_paths = ["lib"] spec.add_development_dependency "bundler", "~> 1.5" - spec.add_development_dependency "rake" - spec.add_runtime_dependency "thor" + spec.add_runtime_dependency "thor", "~> 0.19" end
Use pessimistic version operator for thor
diff --git a/watchman.rb b/watchman.rb index abc1234..def5678 100644 --- a/watchman.rb +++ b/watchman.rb @@ -1,7 +1,7 @@ require 'yaml' require 'action_mailer' require 'utf8-cleaner' -use UTF8Cleaner::Middleware +# use UTF8Cleaner::Middleware require "#{File.expand_path(File.dirname(__FILE__))}/file_mailer" @@ -36,4 +36,4 @@ File.open(file_mtime_path, 'w') { |file| file.write(file_mtime.to_yaml) } -FileMailer.experror(changed_content, settings['email']['to']).deliver_now if changed_content.length > 0+FileMailer.experror(changed_content, settings['email']['to']).deliver_now if changed_content.length > 0
Remove use that is for middleware
diff --git a/OGCSensorThings.podspec b/OGCSensorThings.podspec index abc1234..def5678 100644 --- a/OGCSensorThings.podspec +++ b/OGCSensorThings.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "OGCSensorThings" - s.version = "2.1.2" + s.version = "2.1.4" s.summary = "Easily consume OGCSensorThings services." s.description = <<-DESC
Update using new swagger-codegen from source