diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/motion-sqlite3/database.rb b/lib/motion-sqlite3/database.rb index abc1234..def5678 100644 --- a/lib/motion-sqlite3/database.rb +++ b/lib/motion-sqlite3/database.rb @@ -8,6 +8,20 @@ end def execute(sql, params = nil, &block) + raise ArgumentError if sql.nil? + + prepare(sql, params) do |statement| + results = statement.execute + + if block_given? + results.each do |result| + yield result + end + end + end + end + + def execute_debug(sql, params = nil, &block) raise ArgumentError if sql.nil? puts "*** #{sql}"
Remove logging from execute and define new execute_debug method.
diff --git a/lib/signable/concerns/query.rb b/lib/signable/concerns/query.rb index abc1234..def5678 100644 --- a/lib/signable/concerns/query.rb +++ b/lib/signable/concerns/query.rb @@ -34,7 +34,7 @@ end module ClassMethods - def all(offset = 0, limit = 10) + def all(offset = 0, limit = 30) response = client.all(entry_point, offset, limit) if response.ok?
Change the default limit of signable templates
diff --git a/lib/slg-meta/method_bondage.rb b/lib/slg-meta/method_bondage.rb index abc1234..def5678 100644 --- a/lib/slg-meta/method_bondage.rb +++ b/lib/slg-meta/method_bondage.rb @@ -2,28 +2,28 @@ module Meta module MethodBondage def self.trace!(traced_method) - target = traced_method.target - target = target.metaclass if traced_method.type == :singleton - jiggery_pokery = method_jiggery_pokery(target, traced_method) - target.module_eval(&jiggery_pokery) - end - - def self.stop_tracing! - puts "TODO: #{self}.stop_tracing!" - end - - private - - def self.method_jiggery_pokery(target, traced_method) + target = target_for_eval(traced_method) unbound_method = target.instance_method(traced_method.method) - lambda do - m = traced_method.method + m = traced_method.method + target.module_eval do define_method(m) do |*args, &b| traced_method.called! unbound_method.bind(self).call(*args, &b) end end end + + def self.stop_tracing!(traced_method) + puts "TODO: #{self}.stop_tracing!" + end + + private + + def self.target_for_eval(traced_method) + target = traced_method.target + target = target.metaclass if traced_method.type == :singleton + target + end end end end
Refactor MethodBondage (but it's still failing)
diff --git a/lib/tasks/service/account.rake b/lib/tasks/service/account.rake index abc1234..def5678 100644 --- a/lib/tasks/service/account.rake +++ b/lib/tasks/service/account.rake @@ -32,8 +32,9 @@ Service::Account.each do |item| puts item.name item.reload_quota_used.save - puts "=> { base: #{item.base_quota_used}, cms: #{item.cms_quota_used} " + - "gws: #{item.gws_quota_used}, webmail: #{item.webmail_quota_used} }" + msg = "=> { base: #{item.base_quota_used}, cms: #{item.cms_quota_used} " + msg << "gws: #{item.gws_quota_used}, webmail: #{item.webmail_quota_used} }" + puts msg end end end
[rubocop] C: Use \ instead of + or << to concatenate those strings.
diff --git a/spec/combined_call_spec.rb b/spec/combined_call_spec.rb index abc1234..def5678 100644 --- a/spec/combined_call_spec.rb +++ b/spec/combined_call_spec.rb @@ -13,14 +13,14 @@ html: '<html><body>foo bar</body></html>', url: 'http://www.google.com' }.each do |type, value| - [:json].each do |output_mode| + [:json].each do |mode| before do - AlchemyAPI::Config.output_mode = output_mode + AlchemyAPI::Config.output_mode = mode end - describe "#{type} search with #{output_mode} results" do + describe "#{type} search with #{mode} results" do it 'returns a hash of results' do - VCR.use_cassette("combined_call_basic_#{type}_#{output_mode}_search") do + VCR.use_cassette("combined_call_basic_#{type}_#{mode}_search") do result = subject.search(type => value) result.must_be_instance_of Hash @@ -28,7 +28,7 @@ end it 'includes the keyword text and relavence' do - VCR.use_cassette("combined_call_basic_#{type}_#{output_mode}_search") do + VCR.use_cassette("combined_call_basic_#{type}_#{mode}_search") do result = subject.search(type => value) result['totalTransactions'].wont_be_nil
Reduce char length so Rubocop settles down
diff --git a/masque.gemspec b/masque.gemspec index abc1234..def5678 100644 --- a/masque.gemspec +++ b/masque.gemspec @@ -17,9 +17,9 @@ gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"] gem.add_dependency "headless" - gem.add_dependency "capybara" - gem.add_dependency "capybara-webkit", "~> 0.14.0" - gem.add_dependency "poltergeist", "~> 1.1.0" + gem.add_dependency "capybara" # maybe 2.1.0 + gem.add_dependency "capybara-webkit", "~> 1.0.0" + gem.add_dependency "poltergeist", "~> 1.3.0" gem.add_development_dependency "rspec", "~> 2.11" gem.add_development_dependency "sinatra" gem.add_development_dependency "simplecov"
Update gems, using Capybara 2.1.0
diff --git a/spec/load_profiles_spec.rb b/spec/load_profiles_spec.rb index abc1234..def5678 100644 --- a/spec/load_profiles_spec.rb +++ b/spec/load_profiles_spec.rb @@ -11,7 +11,7 @@ expect(file.read).to_not match(/\r[^\n]/), message end - it "#{ file.basename } should something" do + it "#{ file.basename } should have values summing to 1/3600" do values = File.foreach(file).map(&:to_f) in_joules = values.reduce(:+) * 3600 @@ -19,7 +19,7 @@ # since the load profile will implicitly convert values from ETEngine, # which are in Joules, into watthours. expect(in_joules).to be_within(1e-3).of(1.0) - end # something + end # have values summing to 1/3600 end # each profile end # for dataset end # each dataset
Make the load profile spec title more descriptive
diff --git a/spec/sisimai-rhost_spec.rb b/spec/sisimai-rhost_spec.rb index abc1234..def5678 100644 --- a/spec/sisimai-rhost_spec.rb +++ b/spec/sisimai-rhost_spec.rb @@ -0,0 +1,20 @@+require 'spec_helper' +require 'sisimai/rhost' + +describe 'Sisimai::Rhost' do + describe 'Sisimai::Rhost.list() method' do + v = Sisimai::Rhost.list() + it 'list() returns a list' do + expect(v.kind_of?(Array)).to be_true + end + end + describe 'Sisimai::Rhost.match() method' do + it 'match(aspmx.l.google.com) returns True' do + expect(Sisimai::Rhost.match('aspmx.l.google.com')).to be_true + end + it 'match(example.jp) returns False' do + expect(Sisimai::Rhost.match('example.jp')).to be_false + end + end +end +
Test code for list() and match() method in Sisimai::Rhost
diff --git a/app/controllers/auth.rb b/app/controllers/auth.rb index abc1234..def5678 100644 --- a/app/controllers/auth.rb +++ b/app/controllers/auth.rb @@ -11,7 +11,8 @@ user = User.find_by(name: params[:name]) if user && user.authenticate(params[:password]) session[:user_id] =user.id - redirect "/user/#{user.id}" + redirect "/users + /#{user.id}" else session[:message] = "Invalid username and/or password" redirect '/' @@ -34,6 +35,9 @@ end get '/users/:user_id' do + + + @queries = ["Open Timeslots (Mine)", "Open Timeslots (Others)", "Booked Timeslots (me teacher)", "Booked Timeslots (me student)", "All DBC Times for Requests", "All DBC Times for Requests"] @user = User.find(params[:user_id]) erb :"/auth/userpage" end
Fix user page and show useful dashboard page
diff --git a/lib/llt/form_builder/api.rb b/lib/llt/form_builder/api.rb index abc1234..def5678 100644 --- a/lib/llt/form_builder/api.rb +++ b/lib/llt/form_builder/api.rb @@ -6,6 +6,12 @@ class Api < Sinatra::Base register Sinatra::RespondWith + + before do + headers 'Access-Control-Allow-Origin' => '*', + 'Access-Control-Allow-Methods' => %w{ GET POST }, + 'Access-Control-Allow-Headers' => %w{ Content-Type } + end post '/generate' do request_json = JSON.parse(request.body.read)
Add header controls to API
diff --git a/spec/factories/outgoing_messages.rb b/spec/factories/outgoing_messages.rb index abc1234..def5678 100644 --- a/spec/factories/outgoing_messages.rb +++ b/spec/factories/outgoing_messages.rb @@ -11,7 +11,15 @@ body 'Some information please' what_doing 'normal_sort' end + end + factory :new_information_followup do + ignore do + status 'ready' + message_type 'followup' + body 'I clarify my request' + what_doing 'new_information' + end end factory :internal_review_request do @@ -21,7 +29,6 @@ body 'I want a review' what_doing 'internal_review' end - end # FIXME: This here because OutgoingMessage has an after_initialize,
Add a generic followup factory
diff --git a/spec/models/stock_estimator_spec.rb b/spec/models/stock_estimator_spec.rb index abc1234..def5678 100644 --- a/spec/models/stock_estimator_spec.rb +++ b/spec/models/stock_estimator_spec.rb @@ -0,0 +1,19 @@+require 'spec_helper' + +describe Spree::Stock::Estimator do + context "complete order" do + it "uses existing rates" do + order = create(:completed_order_with_totals) + estimator = Spree::Stock::Estimator.new(order) + + shipment = order.shipments.first + package = shipment.to_package + + expect(SpreeShipwire::Rates).to_not receive(:compute) + + rates = estimator.shipping_rates(package) + + expect(rates.count).to eq(1) + end + end +end
Add spec for getting rates when order completed
diff --git a/lib/resque/core_ext/hash.rb b/lib/resque/core_ext/hash.rb index abc1234..def5678 100644 --- a/lib/resque/core_ext/hash.rb +++ b/lib/resque/core_ext/hash.rb @@ -23,7 +23,7 @@ end unless method_defined?(:slice) - # Return a subset of self + # Returns a subset of self # Defined IFF not already defined elsewhere (e.g., ActiveSupport) # @param keys [Array<Object>] # @return [Hash<Object,Object>]
Fix typo 'Return' -> 'Returns'
diff --git a/spec/uploaders/cover_image_uploader_spec.rb b/spec/uploaders/cover_image_uploader_spec.rb index abc1234..def5678 100644 --- a/spec/uploaders/cover_image_uploader_spec.rb +++ b/spec/uploaders/cover_image_uploader_spec.rb @@ -16,7 +16,7 @@ context 'test env' do it 'uploads the cover image to the correct bucket' do - expect(cover_image.file.url).to match(/.*\/#{ENV['CARRIERWAVE_DIRECTORY']}-test.*/) + expect(cover_image.file.url).to match(/^#{ENV['CARRIERWAVE_ASSET_HOST']}/) end end end
Change asset url to match carrierwave asset host
diff --git a/spec/views/home/learn_more.html.erb_spec.rb b/spec/views/home/learn_more.html.erb_spec.rb index abc1234..def5678 100644 --- a/spec/views/home/learn_more.html.erb_spec.rb +++ b/spec/views/home/learn_more.html.erb_spec.rb @@ -0,0 +1,40 @@+require 'spec_helper' + +describe "home/learn_more.html.erb" do + include Warden::Test::Helpers + Warden.test_mode! + + describe "GET '/learn_more'" do + describe "for a signed-in user" do + before :each do + login_as FactoryGirl.create(:user), :scope => :user + visit '/learn_more' + end + + after :each do + Warden.test_reset! + end + + it "should display a link to the user's club" do + within ".sign-up-form" do + page.should have_selector('a', :text => 'Go to My Club') + end + end + end + + describe "for a non signed-in guest" do + before :each do + visit '/learn_more' + end + + it "should display a sign-up form with required elements" do + within ".sign-up-form" do + page.should have_selector('input#user_name.required') + page.should have_selector('input#user_email.required') + page.should have_selector('input#user_password.required') + page.should have_selector('input#user_password_confirmation.required') + end + end + end + end +end
Add View Spec for Learn More View Add a view spec to account for a user being logged in/logged out for the Learn More view.
diff --git a/lib/tasks/bulk_imports.rake b/lib/tasks/bulk_imports.rake index abc1234..def5678 100644 --- a/lib/tasks/bulk_imports.rake +++ b/lib/tasks/bulk_imports.rake @@ -9,7 +9,7 @@ imported_count = 0 total_count = 0 - CSV.foreach(args.file_path, headers: true, skip_blanks: true).with_index do |row, index| + CSV.foreach(args.file_path, headers: true, skip_blanks: true, converters: ->(f) { f&.strip }).with_index do |row, index| next if row.all?(&:blank?) total_count += 1
Make sure values are stripped There's an issue at the moment where the data in the CSV file comes with spaces which messes up the import.
diff --git a/logflow.rb b/logflow.rb index abc1234..def5678 100644 --- a/logflow.rb +++ b/logflow.rb @@ -8,8 +8,8 @@ require './logbook' Dir[File.join(File.dirname(__FILE__), 'schema', '*.rb')].each { |file| require file } -get '/?:logbook_file?' do |logbook_file| - logbook_file ||= 'data/logbook.csv' +get '/' do + logbook_file = ENV['LOGBOOK_CSV'] || 'data/logbook.csv' logbook = Logbook.new(logbook_file) data = {
Revert "Allow passing the logbook file path/name as an URL param." Decided to undo this. It's a security risk if future people come across this and unknowingly run this as publicly accessible (would allow reading of arbitrary files on the file system via URL param). I don't think it provides enough additional convenience to be worth the risk. This reverts commit bcb6d786544b44ab34c0392453dd0c9c9fd53f05.
diff --git a/app/controllers/salaries_controller.rb b/app/controllers/salaries_controller.rb index abc1234..def5678 100644 --- a/app/controllers/salaries_controller.rb +++ b/app/controllers/salaries_controller.rb @@ -33,7 +33,9 @@ def create @salary = Salary.new(params[:salary]) - @salary.build_booking + if @salary.valid? + @salary.build_booking + end create! end
Handle salary validation problem gracefully.
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index abc1234..def5678 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -13,7 +13,7 @@ format.html { redirect_to @user } format.json { render json: :user, status: :logged, location: @user } else - format.html { redirect_to login_path } + format.html { redirect_to '/' } format.json { render json: @user.errors } end end
Fix redirect for invalid logins
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index abc1234..def5678 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -4,9 +4,9 @@ def create user = User.find_by(username: params[:session][:username]) - if user && user.autenticate(params[:session][:password]) + if user && (user.password == (params[:session][:password])) #Log the user in and redirect to the user's show page (for now) - # render new_user_path + redirect_to user_path(user) else flash.now[:danger] = 'Invalid username/password combination' render 'new'
Fix if statement so a succesful login takes the user to their own user profile
diff --git a/lib/bun/bots/base.rb b/lib/bun/bots/base.rb index abc1234..def5678 100644 --- a/lib/bun/bots/base.rb +++ b/lib/bun/bots/base.rb @@ -12,12 +12,14 @@ ::File.expand_path(::File.join(::File.dirname(called_from), ::File.basename(called_from,'.*'))) end - def self.task_names - Dir.glob(::File.join(task_directory,'*_task.rb')).map{|t| ::File.basename(t, '.*')} + def self.task_names(directory=nil) + directory ||= task_directory + Dir.glob(::File.join(directory,'*_task.rb')).map{|t| ::File.basename(t, '.*')} end - def self.load_tasks - task_names.each {|task| load_task task} + def self.load_tasks(directory=nil) + directory ||= task_directory + task_names(directory).each {|task| load_task task, ::File.join(directory, "#{task}.rb") } end def self.load_task(task_name, file_name=nil)
Allow load_tasks to specify a directory
diff --git a/app/services/git_repository_service.rb b/app/services/git_repository_service.rb index abc1234..def5678 100644 --- a/app/services/git_repository_service.rb +++ b/app/services/git_repository_service.rb @@ -0,0 +1,15 @@+class GitRepositoryService + def setup(git_url, git_username, git_password, verify_ssl) + new_git_repo = false + git_repo = GitRepository.find_or_create_by!(:url => git_url) { new_git_repo = true } + git_repo.update_attributes( + :verify_ssl => verify_ssl == "true" ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE + ) + + if git_username && git_password + git_repo.update_authentication(:values => {:userid => git_username, :password => git_password}) + end + + return {:git_repo_id => git_repo.id, :new_git_repo? => new_git_repo} + end +end
Add GitRepositoryService in preparation for extracting logic https://bugzilla.redhat.com/show_bug.cgi?id=1393982 (transferred from ManageIQ/manageiq@436969b205dc85db451136c2d19c302714c2820d)
diff --git a/app/services/shop/order_cycles_list.rb b/app/services/shop/order_cycles_list.rb index abc1234..def5678 100644 --- a/app/services/shop/order_cycles_list.rb +++ b/app/services/shop/order_cycles_list.rb @@ -10,7 +10,7 @@ def call order_cycles = OrderCycle.with_distributor(@distributor).active - .order(@distributor.preferred_shopfront_order_cycle_order) + .order(@distributor.preferred_shopfront_order_cycle_order).to_a apply_tag_rules!(order_cycles) end
Fix relation/array handling in OrderCycles List
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -11,4 +11,3 @@ end end -
Add question_id to Answer creation in seed file
diff --git a/watir/watir/elements.rb b/watir/watir/elements.rb index abc1234..def5678 100644 --- a/watir/watir/elements.rb +++ b/watir/watir/elements.rb @@ -2,7 +2,6 @@ class Ul < NonControlElement TAG = 'UL' end - module Container def ul(how, what) return Ul.new(self, how, what) @@ -12,7 +11,6 @@ class H1 < NonControlElement TAG = 'H1' end - module Container def h1(how, what) return H1.new(self, how, what) @@ -22,7 +20,6 @@ class H2 < NonControlElement TAG = 'H2' end - module Container def h2(how, what) return H2.new(self, how, what) @@ -32,11 +29,37 @@ class H3 < NonControlElement TAG = 'H3' end - module Container def h3(how, what) return H3.new(self, how, what) end end + class H4 < NonControlElement + TAG = 'H4' + end + module Container + def h4(how, what) + return H4.new(self, how, what) + end + end + + class H5 < NonControlElement + TAG = 'H5' + end + module Container + def h5(how, what) + return H5.new(self, how, what) + end + end + class H6 < NonControlElement + TAG = 'H6' + end + + module Container + def h6(how, what) + return H6.new(self, how, what) + end + end + end
Add support for h4, h5 and h6.
diff --git a/app/controllers/rscratch/exceptions_controller.rb b/app/controllers/rscratch/exceptions_controller.rb index abc1234..def5678 100644 --- a/app/controllers/rscratch/exceptions_controller.rb +++ b/app/controllers/rscratch/exceptions_controller.rb @@ -3,6 +3,9 @@ class ExceptionsController < ApplicationController include SmartListing::Helper::ControllerExtensions helper SmartListing::Helper + + before_filter :set_exception, :only => [:show, :toggle_ignore, :resolve] + def index @exceptions = Rscratch::Exception.order("updated_at desc") smart_listing_create :exceptions, @exceptions.by_status('new'), partial: "rscratch/exceptions/exception_smartlist" @@ -13,11 +16,25 @@ format.json { render json: @exceptions } end end + def show - @excp = Rscratch::Exception.find(params[:id]) @log = @excp.exception_logs.order("created_at desc").page(params[:page]).per(1) @historical_data = @excp.exception_logs.select("count(id) as exception_count, date(created_at) as date").group("date(created_at)").order("date(created_at)").last(30) rescue Exception => @error + end + + def toggle_ignore + @excp.toggle_ignore! + end + + def resolve + @excp.resolve! end + + private + + def set_exception + @excp = Rscratch::Exception.find(params[:id]) + end end end
Resolve and toggle action added
diff --git a/lib/authem/base_user.rb b/lib/authem/base_user.rb index abc1234..def5678 100644 --- a/lib/authem/base_user.rb +++ b/lib/authem/base_user.rb @@ -1,5 +1,3 @@-require 'bcrypt' - module Authem::BaseUser extend ::ActiveSupport::Concern
Remove bcrypt require from BaseUser
diff --git a/app/helpers/pattern_library/application_helper.rb b/app/helpers/pattern_library/application_helper.rb index abc1234..def5678 100644 --- a/app/helpers/pattern_library/application_helper.rb +++ b/app/helpers/pattern_library/application_helper.rb @@ -1,4 +1,12 @@ module PatternLibrary module ApplicationHelper + def method_missing(method, *args, &block) + method_name = method.to_s + if (method_name.end_with?('_path') || method_name.end_with?('_url')) && main_app.respond_to?(method) + main_app.send method, *args + else + super + end + end end end
Break engine isolation a bit. Allow application route helpers to be accessed if they dont match anything in the engine first. Needed to embed pages in app layout
diff --git a/lib/axiom/types/type.rb b/lib/axiom/types/type.rb index abc1234..def5678 100644 --- a/lib/axiom/types/type.rb +++ b/lib/axiom/types/type.rb @@ -38,8 +38,6 @@ self end - singleton_class.class_eval { protected :constraint } - # TODO: move this into a module. separate the constraint setup from # declaration of the members, like the comparable modules. def self.includes(*members)
Remove protected visibility from constraint
diff --git a/app/services/interventions/costs/input_service.rb b/app/services/interventions/costs/input_service.rb index abc1234..def5678 100644 --- a/app/services/interventions/costs/input_service.rb +++ b/app/services/interventions/costs/input_service.rb @@ -12,12 +12,13 @@ options = { quantity: quantity, unit_name: unit_name } - if incoming_parcel - purchase_item = incoming_parcel.purchase_invoice_item - purchase_item ||= incoming_parcel.purchase_order_item + # TODO: Check if incoming_parcel.purchase_invoice_item is the last purchase_invoice of the product. +# if incoming_parcel +# purchase_item = incoming_parcel.purchase_invoice_item +# purchase_item ||= incoming_parcel.purchase_order_item - return purchase_item_amount(purchase_item, options) if purchase_item - end +# return purchase_item_amount(purchase_item, options) if purchase_item +# end options[:catalog_usage] = :purchase options[:catalog_item] = product.default_catalog_item(options[:catalog_usage])
Disable real cost by purchases
diff --git a/wikidata-client.gemspec b/wikidata-client.gemspec index abc1234..def5678 100644 --- a/wikidata-client.gemspec +++ b/wikidata-client.gemspec @@ -17,8 +17,8 @@ s.add_dependency("faraday", "~> 0.9") s.add_dependency("faraday_middleware", "~> 0.9") - s.add_dependency("excon", "~> 0.40") s.add_dependency("hashie", "~> 3.3") + s.add_development_dependency("excon", "~> 0.40") s.add_development_dependency("rspec", "~> 3.1") s.add_development_dependency("webmock", "~> 1.18") s.add_development_dependency("vcr", "~> 2.9")
Make excon only a development dependency
diff --git a/lib/facter/node_join.rb b/lib/facter/node_join.rb index abc1234..def5678 100644 --- a/lib/facter/node_join.rb +++ b/lib/facter/node_join.rb @@ -13,9 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Author: Martin Loschwitz <m.loschwitz@syseleven.de> - -# node_join.rb +# Authors: Martin Loschwitz <m.loschwitz@syseleven.de> +# Martin Zdrahal <martin.zdrahal@s-team.at> require 'puppet' @@ -29,12 +28,9 @@ nodes.each do |node| - output = Puppet::Util::Execution.execute("drbdmanage howto-join #{node} 2>/dev/null") - fact_name = "#{node}_join" - - Facter.add("#{fact_name}") do + Facter.add("#{node}_join") do setcode do - output.chop + Puppet::Util::Execution.execute("drbdmanage howto-join #{node} 2>/dev/null").chop end end end
Apply a patch by Martin Zdrahal to no longer use the output variable
diff --git a/fieldhand.gemspec b/fieldhand.gemspec index abc1234..def5678 100644 --- a/fieldhand.gemspec +++ b/fieldhand.gemspec @@ -6,7 +6,7 @@ A library to harvest metadata from OAI-PMH repositories. EOF s.license = 'MIT' - s.authors = ['Paul Mucur', 'Maciej Gajewski', 'Giovanni Derks'] + s.authors = ['Paul Mucur', 'Maciej Gajewski', 'Giovanni Derks', 'Abeer Salameh'] s.email = 'support@altmetric.com' s.homepage = 'https://github.com/altmetric/fieldhand' s.files = %w[README.md LICENSE] + Dir['lib/**/*.rb']
Add @cwrw as an author
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -2,18 +2,18 @@ require 'active_record/fixtures' related_identifier_types = [ - [ "DOI" ] - [ "URL" ] - [" arXiv "] - [" PMID "] - [" ARK "] - [" Handle "] - [" ISBN "] - [" ISTC"] - [" LISSN "] - [" LSID"] - [" PURL "] - [" URN "] + "DOI", + "URL", + "arXiv", + "PMID", + "ARK", + "Handle", + "ISBN", + "ISTC", + "LISSN", + "LSID", + "PURL", + "URN" ] related_identifier_types.each do |related_identifier_type| @@ -22,21 +22,21 @@ relation_types = [ - [ " Cites" ] - [ " isCitedBy" ] - [ " Supplements" ] - [ " IsSupplementedBy" ] - [ " IsNewVersionOf" ] - [ " IsPreviousVersionOf" ] - [ " Continues" ] - [ " IsContinuedBy" ] - [ " IsPartOf" ] - [ " HasPart" ] - [ " IsDocumentedBy" ] - [ " Documents" ] - [ " IsIdenticalTo" ] - [ " IsDerivedFrom" ] - [ " IsSourceOf" ] + "Cites", + "isCitedBy", + "Supplements" , + "IsSupplementedBy", + "IsNewVersionOf", + "IsPreviousVersionOf", + "Continues", + "IsContinuedBy", + "IsPartOf", + "HasPart", + "IsDocumentedBy", + "Documents", + "IsIdenticalTo", + "IsDerivedFrom", + "IsSourceOf" ] relation_types.each do |relation_type|
Fix array style representation of Seed data
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,3 +5,29 @@ # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Character.create(name: 'Luke', movie: movies.first) + + url_params = Hash.new + url_params[:page_url] = "www.google.com" + url_params[:page_content] = { +title: "TestChat", +location: 70, +abstract: "TestChat", +id: 1, +user: { +username: nil, +first_name: nil, +last_name: nil, +location: nil, +info: nil +}, +messages: [ +{ +content: "test_content", +abstract: "test_content", +id: 1 +} +] +} + +new_url = Url.create(url_params) +
Add url to seed file for easy rails console testing
diff --git a/db/seeds.rb b/db/seeds.rb index abc1234..def5678 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -6,4 +6,4 @@ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) -Request.create! service_request_id: "1234", status: "open", service_name: "garbage", service_code: "GARB", description: "someone left shit on my lawn", requested_datetime: "1/2/12 00:00:00".to_datetime +Request.create! service_request_id: "1234", status: "open", service_name: "garbage", service_code: "GARB", description: "someone left shit on my lawn", requested_datetime: "2013-04-01 10:48".to_datetime
Change db/seed.rb to have input date per South Bend raw data
diff --git a/lib/command_objects/report_bot_status.rb b/lib/command_objects/report_bot_status.rb index abc1234..def5678 100644 --- a/lib/command_objects/report_bot_status.rb +++ b/lib/command_objects/report_bot_status.rb @@ -13,19 +13,31 @@ def execute # TODO: Replace everything here with just `bot.status.to_h`. Can't right # now because it will be a breaking change to the web app. - { - busy: bot.status[:busy], - current_command: bot.status[:last], - x: bot.status[:x], - y: bot.status[:y], - z: bot.status[:z], - last_sync: bot.status_storage.fetch(:pi, :last_sync) - }.merge(pin_info) - .merge(bot.status.to_h) - .deep_symbolize_keys + {} + .merge(status_info) + .merge(pin_info) + .merge(other_info) + .deep_symbolize_keys end private + + def other_info + bot + .status + .to_h + .except(:X, :Y, :Z, :BUSY, :LAST, :PINS, :S) + end + + def status_info + { busy: bot.status[:busy], + current_command: bot.status[:last], + x: bot.status[:x], + y: bot.status[:y], + z: bot.status[:z], + s: bot.status[:s], + last_sync: bot.status_storage.fetch(:pi, :last_sync) } + end def pin_info [*0..13].inject({}) do |hsh, pin|
[STABLE] Remove some abiguity from bot status messages.
diff --git a/lib/dredd_hooks/server/events_handler.rb b/lib/dredd_hooks/server/events_handler.rb index abc1234..def5678 100644 --- a/lib/dredd_hooks/server/events_handler.rb +++ b/lib/dredd_hooks/server/events_handler.rb @@ -7,8 +7,8 @@ attr_reader :runner private :runner - def initialize - @runner = Runner.instance + def initialize(runner=Runner.instance) + @runner = runner end def handle(event, transaction)
Refactor inject runner dependency in EventsHandler
diff --git a/lib/extensions/action_controller/base.rb b/lib/extensions/action_controller/base.rb index abc1234..def5678 100644 --- a/lib/extensions/action_controller/base.rb +++ b/lib/extensions/action_controller/base.rb @@ -6,29 +6,7 @@ helper_method :current_user, :current_user? - def current_user - @current_user ||= if session[:user_id] - User.find(session[:user_id]) - elsif cookies[:remember_token] - User.find_by_remember_token(cookies[:remember_token]) - else - false - end - end - - def current_user? - !!current_user - end - - def current_user=(user) - user.tap do |user| - user.remember - session[:user_id] = user.id - cookies[:remember_token] = user.remember_token - end - end - - protected + protected # Filters @@ -52,6 +30,28 @@ session[:return_to] = nil end + def current_user + @current_user ||= if session[:user_id] + User.find(session[:user_id]) + elsif cookies[:remember_token] + User.find_by_remember_token(cookies[:remember_token]) + else + false + end + end + + def current_user? + !!current_user + end + + def current_user=(user) + user.tap do |user| + user.remember + session[:user_id] = user.id + cookies[:remember_token] = user.remember_token + end + end + def logout! session[:user_id] = nil @current_user = nil
Revert "Move current_user from protection section so it can be used in a controller" Doing this for now until James/i386 can confirm that the current_user needs to be in the public scope. This reverts commit cca77744a6ac29b387ad24d0afd2ec892f29671e.
diff --git a/lib/facter/mac_current_user_full_name.rb b/lib/facter/mac_current_user_full_name.rb index abc1234..def5678 100644 --- a/lib/facter/mac_current_user_full_name.rb +++ b/lib/facter/mac_current_user_full_name.rb @@ -0,0 +1,13 @@+# mac_current_user_full_name.rb +Facter.add(:mac_current_user_full_name) do + # Limit this fact to macOS only + confine :kernel => 'Darwin' + setcode do + # Assign external 'mac_current_user' fact to current_user + current_user = Facter.value(:mac_current_user) + # Creating shell command and passing in current_user + shell_command = "/usr/bin/id -F #{current_user}" + # Execute shell command + Facter::Core::Execution.execute(shell_command) + end +end
Add fact to display the current user's full name I'm using this fact to display the current user's full name by using your 'mac_current_user' fact as a variable. As an example: 'mac_current_user' = paulgalow 'mac_current_user_full_name' = Paul Galow As I'm using your great collection of Mac facts I'd like to propose adding this fact. I'm successfully running this on Puppet v5.3.2 with Facter v3.9.2 (server side) and on macOS 10.12.6 and 10.13.1 (client side). Perhaps this is useful to anyone else.
diff --git a/lib/intercode/virtual_host_constraint.rb b/lib/intercode/virtual_host_constraint.rb index abc1234..def5678 100644 --- a/lib/intercode/virtual_host_constraint.rb +++ b/lib/intercode/virtual_host_constraint.rb @@ -14,6 +14,11 @@ request = Rack::Request.new(env) unless request.path =~ %r{\A#{Rails.application.config.assets.prefix}/} env['intercode.convention'] ||= Convention.find_by(domain: request.host) + if env['intercode.convention'] + Rails.logger.info "Intercode::FindVirtualHost: request to #{request.host} mapped to #{env['intercode.convention'].name}" + else + Rails.logger.info "Intercode::FindVirtualHost: request to #{request.host} mapped to root site" + end end @app.call env
Add some debug logging for FindVirtualHost, which seems to be crapping out on 2019.beconlarp.com
diff --git a/lib/poper/rule/seventy_two_char_limit.rb b/lib/poper/rule/seventy_two_char_limit.rb index abc1234..def5678 100644 --- a/lib/poper/rule/seventy_two_char_limit.rb +++ b/lib/poper/rule/seventy_two_char_limit.rb @@ -1,7 +1,7 @@ module Poper module Rule class SeventyTwoCharLimit < Rule - MSG = 'Every line should be 72 chars or less' + MSG = 'Every line of git commit message should be 72 chars or less' def check(message) MSG if message.lines.any? { |line| line.length > 72 }
Make message for SeventyTwoCharLimit rule more specific
diff --git a/lib/rack/webtranslateit/configuration.rb b/lib/rack/webtranslateit/configuration.rb index abc1234..def5678 100644 --- a/lib/rack/webtranslateit/configuration.rb +++ b/lib/rack/webtranslateit/configuration.rb @@ -4,10 +4,13 @@ attr_accessor :api_key, :files, :master_locale, :password def initialize - root = defined?(RAILS_ROOT) && RAILS_ROOT - root ||= defined?(RACK_ROOT) && RACK_ROOT - root ||= File.expand_path(".") - file = File.join(root, 'config', 'translation.yml') + unless file = self.class.config_location + root = defined?(RAILS_ROOT) && RAILS_ROOT + root ||= defined?(RACK_ROOT) && RACK_ROOT + root ||= File.expand_path(".") + file = File.join(root, 'config', 'translation.yml') + end + configuration = YAML.load_file(file) self.api_key = configuration['api_key'] self.password = configuration['password'] @@ -32,8 +35,12 @@ end end - def self.method_missing(name, *args) - @configuration ||= new - @configuration.send(name, *args) + class << self + def method_missing(name, *args) + @configuration ||= new + @configuration.send(name, *args) + end + + attr_accessor :config_location end end
Allow customization of config location.
diff --git a/spec/comments_spec.rb b/spec/comments_spec.rb index abc1234..def5678 100644 --- a/spec/comments_spec.rb +++ b/spec/comments_spec.rb @@ -0,0 +1,13 @@+require 'yaml' +require 'minitest/autorun' +require_relative '../lib/taaze.rb' + +URL = '' +comments_from_file = YAML.load(File.read('./spec/testfiles/comments.yml')) +comments_found = Taaze.new(url).comments + +describe "Get all the comments with specific user's url" do + it 'has the right number of comments' do + comments_found.size.must_equal comments_from_file[URL].size + end +end
Create comment spec test file.
diff --git a/spec/lib/task_spec.rb b/spec/lib/task_spec.rb index abc1234..def5678 100644 --- a/spec/lib/task_spec.rb +++ b/spec/lib/task_spec.rb @@ -19,9 +19,9 @@ describe 'given tags' do describe '#tags' do - it 'is an array of tags in the order they appear, without arguments' do - task = Task.new('- [ ] A task @downtown @star @due(2016-01-01)') - expect(task.tags).to eq(%w(downtown star due)) + it 'is an array of lowercase tags in the order they appear, without arguments' do + task = Task.new('- [ ] A task @downtown @star @due(2016-01-01) @ALLCAPS') + expect(task.tags).to eq(%w(downtown star due allcaps)) end end
Clarify behavior for capital letters in tags
diff --git a/examples/pcbin/lib/pcbin/surgery_shims.rb b/examples/pcbin/lib/pcbin/surgery_shims.rb index abc1234..def5678 100644 --- a/examples/pcbin/lib/pcbin/surgery_shims.rb +++ b/examples/pcbin/lib/pcbin/surgery_shims.rb @@ -12,7 +12,4 @@ Date.new(year, 7, 2) end end - - class SpecimenCollectionGroup - end end
Remove extraneous empty SCG class def.
diff --git a/test/integration/users_signup_test.rb b/test/integration/users_signup_test.rb index abc1234..def5678 100644 --- a/test/integration/users_signup_test.rb +++ b/test/integration/users_signup_test.rb @@ -12,4 +12,15 @@ end assert_template 'users/new' end + + test 'valid signup information creates new user' do + get signup_path + assert_difference 'User.count', 1 do + post_via_redirect users_path, user: { name: 'Rowan', + email: 'user@valid.com', + password: 'foo123', + password_confirmation: 'foo123' } + end + assert_template 'users/show' + end end
Add integration test for successful signup
diff --git a/Casks/jawbone-updater.rb b/Casks/jawbone-updater.rb index abc1234..def5678 100644 --- a/Casks/jawbone-updater.rb +++ b/Casks/jawbone-updater.rb @@ -4,4 +4,5 @@ version '2.2.3' sha256 '3085edf935347e45573405ee7e51fbacce366847f5f06f783a4e1ea89d70aee6' install 'Jawbone_Updater-2.2.3.pkg' + uninstall :pkgutil => 'com.Aliph.[Jj]awbone(|Updater.*).pkg' end
Add uninstall stanza for Jawbone Updater
diff --git a/middleman-sprockets.gemspec b/middleman-sprockets.gemspec index abc1234..def5678 100644 --- a/middleman-sprockets.gemspec +++ b/middleman-sprockets.gemspec @@ -18,4 +18,5 @@ s.add_dependency("middleman-core", ["~> 3.2"]) s.add_dependency("sprockets", ["~> 2.1"]) s.add_dependency("sprockets-sass", ["~> 1.0.0"]) + s.add_dependency("sprockets-helpers", ["~> 1.0.0"]) end
Revert "Remove unused sprockets-helpers dependency" Guess we do need it... This reverts commit 5edc902c47efc7b00c016216017d52a035fcc330.
diff --git a/core/lib/spree/testing_support/factories/image_factory.rb b/core/lib/spree/testing_support/factories/image_factory.rb index abc1234..def5678 100644 --- a/core/lib/spree/testing_support/factories/image_factory.rb +++ b/core/lib/spree/testing_support/factories/image_factory.rb @@ -1,5 +1,5 @@ FactoryGirl.define do factory :image, class: Spree::Image do - attachment URI.parse('http://upload.wikimedia.org/wikipedia/en/c/c0/Les_Horribles_Cernettes_in_1992.jpg') + attachment { File.new(Spree::Core::Engine.root + "spec/fixtures" + 'thinking-cat.jpg') } end end
Use local fixture for Image factory. * faster tests * no internet connection needed Fixes #6342
diff --git a/lib/job_board/models.rb b/lib/job_board/models.rb index abc1234..def5678 100644 --- a/lib/job_board/models.rb +++ b/lib/job_board/models.rb @@ -27,15 +27,24 @@ def initdb! return if @initdb - Sequel.extension :core_extensions + Sequel.extension(*global_extensions) %w[images jobs].each do |table| Sequel.qualify(:job_board, table.to_sym) table.to_sym.qualify(:job_board) end - db.extension :pg_hstore, :pg_json + db.extension(*connection_extensions) @initdb = db['select now()'] + end + + private def global_extensions + %i[core_extensions pg_hstore pg_json] + end + + private def connection_extensions + return [] if JobBoard.config.database.url.start_with?('mock') + %i[pg_hstore pg_json] end end
Load different sequel extensions at global and conn level depending on database type
diff --git a/generators/lib/generators/refinery/engine/templates/db/migrate/create_plural_name.rb b/generators/lib/generators/refinery/engine/templates/db/migrate/create_plural_name.rb index abc1234..def5678 100644 --- a/generators/lib/generators/refinery/engine/templates/db/migrate/create_plural_name.rb +++ b/generators/lib/generators/refinery/engine/templates/db/migrate/create_plural_name.rb @@ -1,6 +1,6 @@ class Create<%= class_name.pluralize %> < ActiveRecord::Migration - def self.up + def up create_table :refinery_<%= table_name %> do |t| <% attributes.each do |attribute| @@ -22,7 +22,7 @@ load(Rails.root.join('db', 'seeds', '<%= class_name.pluralize.underscore.downcase %>.rb')) end - def self.down + def down if defined?(::Refinery::UserPlugin) ::Refinery::UserPlugin.destroy_all({:name => "<%= class_name.pluralize.underscore.downcase %>"}) end
Use class methods in generated migration.
diff --git a/lib/plezi/activation.rb b/lib/plezi/activation.rb index abc1234..def5678 100644 --- a/lib/plezi/activation.rb +++ b/lib/plezi/activation.rb @@ -12,10 +12,10 @@ end @plezi_initialize = nil def self.plezi_initialize + ::Plezi::Base::MessageDispatch._init if @plezi_initialize.nil? @plezi_initialize = true @plezi_autostart = true if @plezi_autostart.nil? - ::Plezi::Base::MessageDispatch._init at_exit do next if @plezi_autostart == false ::Iodine::Rack.app = ::Plezi.app @@ -23,5 +23,6 @@ ::Iodine.start end end + true end end
Allow multiple reviews of Message Dispatch state
diff --git a/lib/scss_lint/linter.rb b/lib/scss_lint/linter.rb index abc1234..def5678 100644 --- a/lib/scss_lint/linter.rb +++ b/lib/scss_lint/linter.rb @@ -1,6 +1,5 @@ module SCSSLint class Linter < Sass::Tree::Visitors::Base - include LinterRegistry include Utils attr_reader :engine, :lints
Remove Linter superclass from LinterRegistry The superclass `Linter` was incorrectly being returned in the list of registered linters. Remove the inclusion of the `LinterRegistry` module to remove it. This didn't previously have any negative effect because the `Linter` class `run` method is effectively a no-op. Change-Id: I1199f0b35ff16f693d3d17e99288cd93add4200b Reviewed-on: https://gerrit.causes.com/27622 Tested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com> Reviewed-by: Kim Douglas Clarence Mason <b21f0a9a26d2288a382e1db897c9c0db98688f4c@causes.com>
diff --git a/lib/sensu-plugin/cli.rb b/lib/sensu-plugin/cli.rb index abc1234..def5678 100644 --- a/lib/sensu-plugin/cli.rb +++ b/lib/sensu-plugin/cli.rb @@ -50,9 +50,9 @@ rescue SystemExit => e exit e.status rescue Exception => e - critical "Check failed to run: #{e}" + self.new.critical "Check failed to run: #{e}" end - warning "Check did not exit! You should call an exit code method." + self.new.warning "Check did not exit! You should call an exit code method." end end
Create a new instance for the exception/exit warning
diff --git a/db/migrate/20110512104213_set_neutral_feedback_to_zero.rb b/db/migrate/20110512104213_set_neutral_feedback_to_zero.rb index abc1234..def5678 100644 --- a/db/migrate/20110512104213_set_neutral_feedback_to_zero.rb +++ b/db/migrate/20110512104213_set_neutral_feedback_to_zero.rb @@ -0,0 +1,14 @@+class SetNeutralFeedbackToZero < ActiveRecord::Migration + def self.up + change_table :reputation_ratings do |t| + t.change :neutral_feedback, :integer, :default => 0 + end + people = Person.all + people.each do | person | + person.reputation_rating.update_attributes(:neutral_feedback => 0) + end + end + + def self.down + end +end
Set neutral feedback value to default 0
diff --git a/app/controllers/admin/gists_controller.rb b/app/controllers/admin/gists_controller.rb index abc1234..def5678 100644 --- a/app/controllers/admin/gists_controller.rb +++ b/app/controllers/admin/gists_controller.rb @@ -11,9 +11,8 @@ @gist.assign_attributes(gist_params[:gist]) paper = Paper.find_by_identifier(params[:gist][:paper_attributes][:identifier]) if paper - if paper.authors.blank? && gist_params[:gist][:paper_attributes][:title].present? - paper.update_attributes(gist_params[:gist][:paper_attributes]) - end + paper.assign_attributes(gist_params[:gist][:paper_attributes]) + paper.save if paper.changed? @gist.paper = paper else @gist.paper = Paper.new(gist_params[:gist][:paper_attributes])
Apply fix editing gists in for admin controller
diff --git a/app/controllers/admin/posts_controller.rb b/app/controllers/admin/posts_controller.rb index abc1234..def5678 100644 --- a/app/controllers/admin/posts_controller.rb +++ b/app/controllers/admin/posts_controller.rb @@ -74,7 +74,7 @@ private def post_params - params.require(:post).permit(:kind, :title, :body, :draft, main_medium_attributes: [:file]) + params.require(:post).permit(:kind, :title, :reply_to, :body, :draft, main_medium_attributes: [:file]) end end end
Allow admin to receive reply_to field
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index abc1234..def5678 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -18,10 +18,14 @@ current_publisher end + def user_for_paper_trail + current_user.try(:id) + end + def current_ability @current_ability ||= Ability.new(current_user, request.remote_ip) end - + def set_locale I18n.locale = params[:locale] || I18n.default_locale end
Include user's id for paper_trail
diff --git a/app/controllers/sales_pages_controller.rb b/app/controllers/sales_pages_controller.rb index abc1234..def5678 100644 --- a/app/controllers/sales_pages_controller.rb +++ b/app/controllers/sales_pages_controller.rb @@ -0,0 +1,8 @@+class SalesPagesController < ApplicationController + def show + @sales_page = SalesPage.find params[:id] + @club = @sales_page.club + + authorize! :read, @sales_page + end +end
Add show Action for SalesPages Controller Update the SalesPages controller to include a show action.
diff --git a/lib/sinatra/partials.rb b/lib/sinatra/partials.rb index abc1234..def5678 100644 --- a/lib/sinatra/partials.rb +++ b/lib/sinatra/partials.rb @@ -13,11 +13,11 @@ options.merge!(:layout => false) if collection = options.delete(:collection) then collection.inject([]) do |buffer, member| - buffer << erubis(:"#{template}", options.merge(:layout => + buffer << erb(:"#{template}", options.merge(:layout => false, :locals => {template_array[-1].to_sym => member})) end.join("\n") else - erubis(:"#{template}", options) + erb(:"#{template}", options) end end end
Use erb, not erubis explicitly.
diff --git a/lib/support/requires.rb b/lib/support/requires.rb index abc1234..def5678 100644 --- a/lib/support/requires.rb +++ b/lib/support/requires.rb @@ -10,7 +10,7 @@ def initialize @ignorable_source_files = [File.join('support', 'requires.rb'), File.join('raml_poliglota.rb')] - @dir_order = ['configuration', 'model', 'support', 'helper', 'validation', 'parser'] + @dir_order = ['configuration', 'model', 'support', 'helper', 'validation', 'parser', 'generator'] @lib_dir = File.dirname(__FILE__).sub /\/support$/, '' end
Add requirement to generator source folder.
diff --git a/lib/metasploit/credential/version.rb b/lib/metasploit/credential/version.rb index abc1234..def5678 100644 --- a/lib/metasploit/credential/version.rb +++ b/lib/metasploit/credential/version.rb @@ -9,7 +9,7 @@ # The patch number, scoped to the {MINOR} version number. PATCH = 1 # The prerelease name of the given {MAJOR}.{MINOR}.{PATCH} version number. Will not be defined on master. - PRERELEASE = 'metasploit-credential' + PRERELEASE = 'net-ssh' # The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the {PRERELEASE} in the # {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
Fix PRERELEASE to match branch MSP-9881
diff --git a/lib/metasploit_data_models/engine.rb b/lib/metasploit_data_models/engine.rb index abc1234..def5678 100644 --- a/lib/metasploit_data_models/engine.rb +++ b/lib/metasploit_data_models/engine.rb @@ -11,7 +11,7 @@ # Remove ActiveSupport::Dependencies loading paths to save time during constant resolution and to ensure that # metasploit_data_models is properly declaring all autoloads and not falling back on ActiveSupport::Dependencies - config.paths.values do |path| + config.paths.each_value do |path| path.skip_autoload! path.skip_autoload_once! path.skip_eager_load!
Revert "Fix problem with autoload path resetting" This reverts commit 94f110167400016e4429e8506091c65b3a97db6f.
diff --git a/lib/pipeline/mounters/url_mounter.rb b/lib/pipeline/mounters/url_mounter.rb index abc1234..def5678 100644 --- a/lib/pipeline/mounters/url_mounter.rb +++ b/lib/pipeline/mounters/url_mounter.rb @@ -19,7 +19,7 @@ last = target.slice(-4,target.length) if last === ".git" return false - else if start === "http" + elsif start === "http" return true else return false
Fix bug in if / else
diff --git a/lib/pushing/adapters/test_adapter.rb b/lib/pushing/adapters/test_adapter.rb index abc1234..def5678 100644 --- a/lib/pushing/adapters/test_adapter.rb +++ b/lib/pushing/adapters/test_adapter.rb @@ -10,7 +10,7 @@ @deliveries = [] end - delegate :each, :clear, :<<, :length, :size, to: :@deliveries + delegate :each, :empty?, :clear, :<<, :length, :size, to: :@deliveries def apn select {|delivery| delivery.is_a?(Platforms::ApnPayload) }
Make empty? available on `Pushing::Base.deliveries`
diff --git a/lib/rbplusplus/builders/extension.rb b/lib/rbplusplus/builders/extension.rb index abc1234..def5678 100644 --- a/lib/rbplusplus/builders/extension.rb +++ b/lib/rbplusplus/builders/extension.rb @@ -42,6 +42,7 @@ def with_module_functions @code.functions.each do |func| + next if do_not_wrap?(func) add_child GlobalFunctionNode.new(func, self) end end
Make sure to take into account the same availability checks for global functions
diff --git a/kraken-io.gemspec b/kraken-io.gemspec index abc1234..def5678 100644 --- a/kraken-io.gemspec +++ b/kraken-io.gemspec @@ -11,7 +11,7 @@ s.homepage = 'http://github.com/kraken-io/kraken-ruby' s.summary = %q{Ruby gem for interacting with Kraken.io API} s.description = %q{With this gem you can plug into the power and speed of Kraken.io Image Optimizer. https://kraken.io/} - s.files = ['lib/kraken-io.rb'] + s.files = Dir["lib/**/*.rb"] s.license = 'MIT' s.add_dependency('json') s.add_dependency('httparty')
Add lib/* to packaged files
diff --git a/db/migrate/20180503081248_add_hour_counter_to_product_categories.rb b/db/migrate/20180503081248_add_hour_counter_to_product_categories.rb index abc1234..def5678 100644 --- a/db/migrate/20180503081248_add_hour_counter_to_product_categories.rb +++ b/db/migrate/20180503081248_add_hour_counter_to_product_categories.rb @@ -0,0 +1,17 @@+class AddHourCounterToProductCategories < ActiveRecord::Migration + def up + varieties = [:tractor, + :heavy_equipment, + :handling_equipment] + + product_natures = ProductNature.where(variety: varieties) + + product_natures.each do |product_nature| + product_nature.variable_indicators_list << :hour_counter + product_nature.save! + end + end + + def down + end +end
Add hour counter variable to product natures
diff --git a/lib/sortable_columns/helpers/action_view_extension.rb b/lib/sortable_columns/helpers/action_view_extension.rb index abc1234..def5678 100644 --- a/lib/sortable_columns/helpers/action_view_extension.rb +++ b/lib/sortable_columns/helpers/action_view_extension.rb @@ -3,12 +3,12 @@ extend ActiveSupport::Concern module InstanceMethods - def sortable(column, title = nil) + def sortable(column, title = nil) title ||= column.titleize - css_class = column == sort_column ? "current #{sort_direction}" : nil - direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc" + css_class = column == params[:sort] ? "current #{ params[:direction] }" : nil + direction = column == params[:sort] && params[:direction] == "asc" ? "desc" : "asc" link_to title, params.merge(:sort => column, :direction => direction), {:class => css_class} end end end -end +end
Update view helper. There was no need for them to call the param validation logic.
diff --git a/formatize.gemspec b/formatize.gemspec index abc1234..def5678 100644 --- a/formatize.gemspec +++ b/formatize.gemspec @@ -12,7 +12,7 @@ s.files = Dir['lib/**/*', 'LICENSE', 'README.md'] - s.add_dependency 'RedCloth', '~> 4.2' - s.add_dependency 'bluecloth', '~> 2.0' - s.add_development_dependency 'actionpack' + s.add_dependency 'RedCloth', '~> 4.2' + s.add_dependency 'bluecloth', '~> 2.0' + s.add_dependency 'actionpack', '3.0.0.beta4' end
Make actionpack-3.0.0.beta4 a standard dependency
diff --git a/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb b/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb index abc1234..def5678 100644 --- a/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb +++ b/lib/sastrawi/morphology/disambiguator/disambiguator_prefix_rule7.rb @@ -0,0 +1,19 @@+module Sastrawi + module Morphology + module Disambiguator + class DisambiguatorPrefixRule7 + def disambiguate(word) + contains = /^ter([bcdfghjklmnpqrstvwxyz])er([aiueo].*)$/.match(word) + + if contains + matches = contains.captures + + return if matches[0] == 'r' + + return matches[0] << 'er' << matches[1] + end + end + end + end + end +end
Add implementation of seventh rule of disambiguator prefix
diff --git a/db/migrate/20111213125009_project_members_admins.rb b/db/migrate/20111213125009_project_members_admins.rb index abc1234..def5678 100644 --- a/db/migrate/20111213125009_project_members_admins.rb +++ b/db/migrate/20111213125009_project_members_admins.rb @@ -1,6 +1,7 @@ class ProjectMembersAdmins < ActiveRecord::Migration def self.up - ProjectMember.all do |m| + ActiveRecord::Base.logger = Logger.new(STDERR) + ProjectMember.all.each do |m| m.administrator = true m.save end
Fix bug and actually iterate through the project members
diff --git a/Library/Formula/cmake.rb b/Library/Formula/cmake.rb index abc1234..def5678 100644 --- a/Library/Formula/cmake.rb +++ b/Library/Formula/cmake.rb @@ -4,6 +4,13 @@ url 'http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz' md5 'a76a44b93acf5e3badda9de111385921' homepage 'http://www.cmake.org/' + + def patches + # Adds support for enabling/disabling specific system libraries + # http://public.kitware.com/Bug/view.php?id=11431 + # Shouldn't be needed in 2.8.4 + "http://cmake.org/gitweb?p=cmake.git;a=patch;h=60d72b56" + end def install # A framework-installed expat will be detected and mess things up. @@ -16,18 +23,9 @@ EOS end - # If we specify to CMake to use the system libraries by passing - # --system-libs to bootstrap then it insists on finding them all - # or erroring out, as that's what other Linux/OSX distributions - # would want. I've requested that they either fix this or let us - # submit a patch to do so on their bug tracker: - # http://www.cmake.org/Bug/view.php?id=11431 - inreplace 'CMakeLists.txt', - "# Mention to the user what system libraries are being used.", - "SET(CMAKE_USE_SYSTEM_LIBARCHIVE 0)" - system "./bootstrap", "--prefix=#{prefix}", "--system-libs", + "--no-system-libarchive", "--datadir=/share/cmake", "--docdir=/share/doc/cmake", "--mandir=/share/man"
Add upstream CMake bootstrap patch.
diff --git a/SLFlexibleButton.podspec b/SLFlexibleButton.podspec index abc1234..def5678 100644 --- a/SLFlexibleButton.podspec +++ b/SLFlexibleButton.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'SLFlexibleButton' - s.version = '0.1.0' + s.version = '0.0.1' s.summary = 'A button library which able to draw it self with bezel defined by relative location' s.author = { 'Shuo Li' => 'shuoli84@gmail.com' } s.source = { :git => 'https://github.com/shuoli84/SLFlexibleButton.git' }
Change the version to 0.0.1
diff --git a/lib/knapsack_pro/formatters/rspec_json_formatter.rb b/lib/knapsack_pro/formatters/rspec_json_formatter.rb index abc1234..def5678 100644 --- a/lib/knapsack_pro/formatters/rspec_json_formatter.rb +++ b/lib/knapsack_pro/formatters/rspec_json_formatter.rb @@ -4,7 +4,7 @@ module KnapsackPro module Formatters class RSpecJsonFormatter < RSpec::Core::Formatters::JsonFormatter - RSpec::Core::Formatters.register self, :message, :dump_summary, :dump_profile, :stop, :seed, :close + RSpec::Core::Formatters.register self private
Remove methods because it's not needed to generate json report and in old rspec 3.6.5 it fails due to lack of seed method
diff --git a/RSBarcodes_Swift.podspec b/RSBarcodes_Swift.podspec index abc1234..def5678 100644 --- a/RSBarcodes_Swift.podspec +++ b/RSBarcodes_Swift.podspec @@ -10,5 +10,5 @@ s.source_files = 'Source/*.{swift,h,m}' s.frameworks = ['CoreImage', 'AVFoundation', 'QuartzCore'] s.requires_arc = true - s.swift_version = "5.0" + s.swift_versions = ['5.0'] end
Fix -- [!] Usage of the `.swift_version` file has been deprecated! Please delete the file and use the `swift_versions` attribute within your podspec instead.
diff --git a/config/initializers/dashboard_trial.rb b/config/initializers/dashboard_trial.rb index abc1234..def5678 100644 --- a/config/initializers/dashboard_trial.rb +++ b/config/initializers/dashboard_trial.rb @@ -9,31 +9,53 @@ 'Chelmsford', 'Chelmsford', 'Coldingley', + 'Cookham Wood', + 'Deerbolt', 'Downview', + 'Durham', + 'East Sutton Park', + 'Elmley', 'Feltham', + 'Ford', 'Foston Hall', + 'Frankland', 'Gartree', 'Glen Parva', + 'Hatfield Open', 'High Down', 'Highpoint', 'Hollesley Bay Open', + 'Holme House', + 'Hull', + 'Humber', + 'Leeds', 'Leicester', 'Lincoln', + 'Lindholme', 'Littlehey', 'Long Lartin', + 'Low Newton', + 'Maidstone', + 'Moorland Closed', + 'New Hall', 'North Sea Camp', 'Norwich', 'Nottingham', 'Onley', 'Pentonville', + 'Rochester', 'Send', + 'Standford Hill', 'Stocken', 'Sudbury', + 'Swaleside', 'Swansea', 'The Mount', 'Usk', + 'Wakefield', 'Wandsworth', 'Warren Hill', + 'Wetherby', 'Whatton', 'Wormwood Scrubs' ]
Add more estates to the trial Adds North East, Yorkshire, Humberside, Kent and Sussex estates, except Wealstun, Full Sutton, Lewes and Askham Grange. Needs to be deployed by 30th of September.
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 @@ -14,6 +14,9 @@ end def markdown(text) - Redcarpet::Markdown.new(Redcarpet::Render::HTML).render(text).html_safe + options = { + :fenced_code_blocks => true + } + Redcarpet::Markdown.new(Redcarpet::Render::HTML, options).render(text).html_safe end end
Add fenced code blocks in markdown
diff --git a/lib/convection/model/template/resource_property/aws_elbv2_listener_rule_condition.rb b/lib/convection/model/template/resource_property/aws_elbv2_listener_rule_condition.rb index abc1234..def5678 100644 --- a/lib/convection/model/template/resource_property/aws_elbv2_listener_rule_condition.rb +++ b/lib/convection/model/template/resource_property/aws_elbv2_listener_rule_condition.rb @@ -8,7 +8,7 @@ # ELBV2 ListenerRule Condition Type class ELBV2ListenerRuleCondition < ResourceProperty # http://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_RuleCondition.html - property :field, 'Field' + property :field_name, 'Field' property :values, 'Values', :type => :list end end
Fix field name so not overloading
diff --git a/modules/mongodb/spec/type/collection/create/spec.rb b/modules/mongodb/spec/type/collection/create/spec.rb index abc1234..def5678 100644 --- a/modules/mongodb/spec/type/collection/create/spec.rb +++ b/modules/mongodb/spec/type/collection/create/spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' -describe command('mongo testdb --quiet --host localhost --port 27017 --eval "db.getCollection(\'mycollection\').stats()"') do +describe command('mongo testdb --quiet --host localhost --port 27017 --eval "printjson(db.getCollection(\'mycollection\').stats())"') do its(:stdout) { should match /"ns" : "testdb.mycollection"/ } + its(:stdout) { should_not match /"sharded" :/ } end
Make sure collection is created with sharding by default
diff --git a/config/initializers/delayed_job_config.rb b/config/initializers/delayed_job_config.rb index abc1234..def5678 100644 --- a/config/initializers/delayed_job_config.rb +++ b/config/initializers/delayed_job_config.rb @@ -1,3 +1,3 @@-Delayed::Worker.sleep_delay = 5 +Delayed::Worker.sleep_delay = 10 Delayed::Worker.max_attempts = 1 -Delayed::Worker.max_run_time = 10.minutes +Delayed::Worker.max_run_time = 20.minutes
Increase Delayed::Worker.max_run_time to 20 minutes
diff --git a/config/initializers/skip_passive_login.rb b/config/initializers/skip_passive_login.rb index abc1234..def5678 100644 --- a/config/initializers/skip_passive_login.rb +++ b/config/initializers/skip_passive_login.rb @@ -1,3 +1,5 @@-ApplicationController.class_eval do - skip_before_filter :passive_login, if: -> { Rails.env.development? || Rails.env.test? } +[UmlautController, ApplicationController].each do |klass| + klass.class_eval do + skip_before_filter :passive_login, if: -> { Rails.env.development? || Rails.env.test? } + end end
Disable passive login attempt on dev for multiple controllers
diff --git a/files/brews/tokumx.rb b/files/brews/tokumx.rb index abc1234..def5678 100644 --- a/files/brews/tokumx.rb +++ b/files/brews/tokumx.rb @@ -11,7 +11,7 @@ def install bin.install Dir["bin/*"] - lib.install Dir["lib64/*"] + (prefix+'lib64').install Dir["lib64/*"] share.install Dir["scripts"] doc.install "GNU-AGPL-3.0", "THIRD-PARTY-NOTICES", "NEWS", "README", "README-TOKUKV"
Use lib path actually linked into mongod executable
diff --git a/app/models/project_services/slack_service.rb b/app/models/project_services/slack_service.rb index abc1234..def5678 100644 --- a/app/models/project_services/slack_service.rb +++ b/app/models/project_services/slack_service.rb @@ -40,7 +40,8 @@ project_name: project_name )) - credentials = webhook.match(/(\w*).slack.com.*services\/(.*)/) + credentials = webhook.match(/([\w-]*).slack.com.*services\/(.*)/) + if credentials.present? subdomain = credentials[1] token = credentials[2].split("token=").last
Use allowed slack team name.
diff --git a/lib/fog/brightbox/models/compute/cloud_ip.rb b/lib/fog/brightbox/models/compute/cloud_ip.rb index abc1234..def5678 100644 --- a/lib/fog/brightbox/models/compute/cloud_ip.rb +++ b/lib/fog/brightbox/models/compute/cloud_ip.rb @@ -22,6 +22,7 @@ attribute :interface_id, :aliases => "interface", :squash => "id" attribute :server_id, :aliases => "server", :squash => "id" attribute :load_balancer, :alias => "load_balancer", :squash => "id" + attribute :server_group, :alias => "server_group", :squash => "id" attribute :port_translators attribute :name
[Brightbox] Add ServerGroup attribute in CloudIP model
diff --git a/features/support/env.rb b/features/support/env.rb index abc1234..def5678 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -17,6 +17,7 @@ Webrat.configure do |config| config.mode = :rails + config.open_error_files = false end # Comment out the next two lines if you're not using RSpec's matchers (should / should_not) in your steps.
Set cucumber/webrat config to not open browser
diff --git a/features/support/vcr.rb b/features/support/vcr.rb index abc1234..def5678 100644 --- a/features/support/vcr.rb +++ b/features/support/vcr.rb @@ -1,5 +1,7 @@ require 'vcr' require 'webmock/cucumber' + +WebMock.disable_net_connect!(:allow => 'lon.auth.api.rackspacecloud.com') VCR.configure do |c| # Automatically filter all secure details that are stored in the environment @@ -14,7 +16,6 @@ c.cassette_library_dir = 'fixtures/vcr_cassettes' c.hook_into :webmock c.ignore_localhost = true - c.ignore_hosts 'lon.auth.api.rackspacecloud.com' c.ignore_request do |request| URI(request.uri).host =~ %r{.*\.clouddrive\.com.*} end
Allow rackspace connections further up the chain
diff --git a/lib/ruboty/zoi.rb b/lib/ruboty/zoi.rb index abc1234..def5678 100644 --- a/lib/ruboty/zoi.rb +++ b/lib/ruboty/zoi.rb @@ -34,12 +34,13 @@ end def fetch_data + return @fetched_data if @fetched_data zoi_data = open(ZOI_DATA_URI).read zoi_data = zoi_data. match(/this.items = (.+?);/m)[1]. gsub(/(word|image|src):/, "'\\1':"). gsub("'", '"') - JSON.parse(zoi_data) + @fetched_data = JSON.parse(zoi_data) end end end
Set fetched data into cache
diff --git a/lib/slatan/ear.rb b/lib/slatan/ear.rb index abc1234..def5678 100644 --- a/lib/slatan/ear.rb +++ b/lib/slatan/ear.rb @@ -0,0 +1,21 @@+require "util/string_ex" + +module Slatan + using StringEx + + class Ear + def initialize(mouth) + @concerns = [] + Dir[File.expand_path('../../../concerns', __FILE__) << '/*.rb'].each do |file| + require file + @concerns << Object.const_get(File.basename(file, '.*').camelize).new(mouth) + end + end + + def hear(msg) + @concerns.each do |concern| + concern.hear(msg) + end + end + end +end
Create Ear class to dispatch receive event
diff --git a/queue_classic.gemspec b/queue_classic.gemspec index abc1234..def5678 100644 --- a/queue_classic.gemspec +++ b/queue_classic.gemspec @@ -1,3 +1,4 @@+#encoding: UTF-8 Gem::Specification.new do |s| s.name = "queue_classic" s.email = "ryan@heroku.com"
Add UTF-8 encoding directive to gemspec
diff --git a/app/controllers/paperclip_database_storage/attachments_controller.rb b/app/controllers/paperclip_database_storage/attachments_controller.rb index abc1234..def5678 100644 --- a/app/controllers/paperclip_database_storage/attachments_controller.rb +++ b/app/controllers/paperclip_database_storage/attachments_controller.rb @@ -14,6 +14,6 @@ raise ActionController::RoutingError.new('Too many images found. Check your route definition') if attachments.length > 1 attachment = attachments.first - send_data attachment.file_data, :type => attachment.content_type + send_data attachment.file_data, :type => attachment.content_type, :disposition => attachment.content_type.strip =~ /^image/ ? 'inline' : 'attachment' end end
Send uploaded images with inline disposition, and the rest with attachment
diff --git a/omniauth-heroku.gemspec b/omniauth-heroku.gemspec index abc1234..def5678 100644 --- a/omniauth-heroku.gemspec +++ b/omniauth-heroku.gemspec @@ -1,17 +1,16 @@ Gem::Specification.new do |gem| + gem.name = "omniauth-heroku" gem.authors = ["Pedro Belo"] gem.email = ["pedro@heroku.com"] - gem.description = %q{OmniAuth strategy for Heroku.} - gem.summary = %q{OmniAuth strategy for Heroku.} + gem.description = "OmniAuth strategy for Heroku." + gem.summary = "OmniAuth strategy for Heroku." gem.homepage = "https://github.com/heroku/omniauth-heroku" gem.license = "MIT" - gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } - gem.files = `git ls-files`.split("\n") - gem.name = "omniauth-heroku" - gem.require_paths = ["lib"] + gem.files = Dir["README.md", "LICENSE", "lib/**/*"] + gem.require_path = "lib" gem.version = "0.2.0" - gem.add_dependency 'omniauth', '~> 1.2' - gem.add_dependency 'omniauth-oauth2', '~> 1.2' + gem.add_dependency "omniauth", "~> 1.2" + gem.add_dependency "omniauth-oauth2", "~> 1.2" end
Clean up gemspec a bit
diff --git a/omniauth-oauth2.gemspec b/omniauth-oauth2.gemspec index abc1234..def5678 100644 --- a/omniauth-oauth2.gemspec +++ b/omniauth-oauth2.gemspec @@ -3,7 +3,7 @@ require "omniauth-oauth2/version" Gem::Specification.new do |gem| - gem.add_dependency "oauth2", "~> 1.1" + gem.add_dependency "oauth2", "~> 1.4" gem.add_dependency "omniauth", "~> 1.9" gem.add_development_dependency "bundler", "~> 1.0"
Update oauth2 gem to 1.4
diff --git a/lib/Cinderella.rb b/lib/Cinderella.rb index abc1234..def5678 100644 --- a/lib/Cinderella.rb +++ b/lib/Cinderella.rb @@ -23,6 +23,10 @@ DataStore.instance.get(id)[:transformed] end + def self.midnight(id) + reset_data_at(id) + end + private def self.store(data)
Add the code to make previous spec commit pass
diff --git a/app/importers/settings/somerville_star_importers.rb b/app/importers/settings/somerville_star_importers.rb index abc1234..def5678 100644 --- a/app/importers/settings/somerville_star_importers.rb +++ b/app/importers/settings/somerville_star_importers.rb @@ -2,13 +2,6 @@ def self.from_options(options) new(options).importer end - - IMPORTERS = [ - StarReadingImporter, - StarReadingImporter::HistoricalImporter, - StarMathImporter, - StarMathImporter::HistoricalImporter - ] def initialize(options = {}) @school_scope = options["school"] @@ -19,7 +12,12 @@ school_scope: @school_scope, client: SftpClient.for_star, data_transformer: CsvTransformer.new, - file_importers: IMPORTERS.map(&:new) + file_importers: [ + StarReadingImporter, + StarReadingImporter::HistoricalImporter, + StarMathImporter, + StarMathImporter::HistoricalImporter + ].map(&:new) } end
Move STAR importers lists out of constant + The thor task tries to load up SomervilleStarImporters, which then tries to load the constant + But that fails because the Thor task doesn't automatically include the Rails environment
diff --git a/schema.gemspec b/schema.gemspec index abc1234..def5678 100644 --- a/schema.gemspec +++ b/schema.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'evt-schema' s.summary = "Primitives for schema and structure" - s.version = '0.6.1.0' + s.version = '0.6.1.1' s.description = ' ' s.authors = ['The Eventide Project']
Package version is increased from 0.6.1.0 to 0.6.1.1
diff --git a/lib/facilethings/partners/coupons_data.rb b/lib/facilethings/partners/coupons_data.rb index abc1234..def5678 100644 --- a/lib/facilethings/partners/coupons_data.rb +++ b/lib/facilethings/partners/coupons_data.rb @@ -3,7 +3,7 @@ module Facilethings class CouponsData < Facilethings::Base attr_reader :user, :status, :coupon - attr_accessor :currency, :income, :commission, :cleared + attr_accessor :currency, :income, :commission, :cleared, :date #def convert_to(currency, rate) # @attrs[:currency] = currency
Add date to coupons (event)
diff --git a/lib/light-service/context_key_verifier.rb b/lib/light-service/context_key_verifier.rb index abc1234..def5678 100644 --- a/lib/light-service/context_key_verifier.rb +++ b/lib/light-service/context_key_verifier.rb @@ -6,13 +6,13 @@ class << self def verify_expected_keys_are_in_context(context, action) verify_keys_are_in_context(context, action.expected_keys) do |not_found_keys| - fail ExpectedKeysNotInContextError, "expected #{format_keys(not_found_keys)} to be in the context during #{action.to_s}" + fail ExpectedKeysNotInContextError, "expected #{format_keys(not_found_keys)} to be in the context during #{action}" end end def verify_promised_keys_are_in_context(context, action) verify_keys_are_in_context(context, action.promised_keys) do |not_found_keys| - fail PromisedKeysNotInContextError, "promised #{format_keys(not_found_keys)} to be in the context during #{action.to_s}" + fail PromisedKeysNotInContextError, "promised #{format_keys(not_found_keys)} to be in the context during #{action}" end end
Remove to_s since interpolation already does it implicitly
diff --git a/lib/dmm-crawler.rb b/lib/dmm-crawler.rb index abc1234..def5678 100644 --- a/lib/dmm-crawler.rb +++ b/lib/dmm-crawler.rb @@ -1,7 +1,7 @@ require 'mechanize' module DMMCrawler - BASE_URL = 'https://www.dmm.co.jp'.freeze + BASE_URL = 'http://www.dmm.co.jp'.freeze end require 'dmm-crawler/agent'
Revert "Use HTTPS in all connections"