diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/libraries/helpers.rb b/libraries/helpers.rb index abc1234..def5678 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -6,7 +6,7 @@ elsif p && p.is_a?(Array) p.join(',') elsif p && p.is_a?(Range) - "#{p.first}:#{p.last} " + "#{p.first}:#{p.last}" end end end
Remove extra space after port range Resolves #79
diff --git a/lib/stuffed_bunny.rb b/lib/stuffed_bunny.rb index abc1234..def5678 100644 --- a/lib/stuffed_bunny.rb +++ b/lib/stuffed_bunny.rb @@ -4,7 +4,7 @@ module StuffedBunny # Call this in a test's setup method to stub the Bunny gem. - def reset! + def self.reset! Bunny.reset_exchanges end
Make the `reset!` method callable...
diff --git a/lib/tinytable/text_formatter.rb b/lib/tinytable/text_formatter.rb index abc1234..def5678 100644 --- a/lib/tinytable/text_formatter.rb +++ b/lib/tinytable/text_formatter.rb @@ -45,11 +45,11 @@ def row(r) append VERTICAL - r.each_with_index { |c, i| col(c, i) } + r.each_with_index { |c, i| cell(c, i) } new_line end - def col(text, i) + def cell(text, i) append PADDING append text width = @col_widths[i]
Rename 'col' method to 'cell'
diff --git a/lib/tmuxpowerline.rb b/lib/tmuxpowerline.rb index abc1234..def5678 100644 --- a/lib/tmuxpowerline.rb +++ b/lib/tmuxpowerline.rb @@ -1,10 +1,14 @@ require 'configuration/yaml' class TmuxPowerline - def initialize(configuration_loader) + def initialize(configuration_loader=Configuration::Yaml.new) if configuration_loader.nil? raise ArgumentError, "The configuration loader can't be nil" end @configuration_loader = configuration_loader end + + def load_config(config) + @configuration_loader.load_config(config) + end end
Define a default configuration loader and add a method to load the configuration
diff --git a/config/environments/production.rb b/config/environments/production.rb index abc1234..def5678 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -28,8 +28,9 @@ domain: ENV['MAILGUN_DOMAIN'] } + roqua_server_app_path = "https://#{ENV['SCREENSMART_URL']}" if ENV['SCREENSMART_URL'] heroku_app_path = "https://#{ENV['HEROKU_APP_NAME']}.herokuapp.com" if ENV['HEROKU_APP_NAME'] - config.action_mailer.default_url_options = { host: ENV['SCREENSMART_URL'] || + config.action_mailer.default_url_options = { host: roqua_server_app_path || heroku_app_path || 'https://screensmart.herokuapp.com' } end
Include https in root url
diff --git a/lib/models/page.rb b/lib/models/page.rb index abc1234..def5678 100644 --- a/lib/models/page.rb +++ b/lib/models/page.rb @@ -1,12 +1,12 @@ class Page < Sequel::Model def before_create - self.slug = Title.new(title).slug + self.slug = Title.new(self.title).slug end def before_save self.compiled_content = Markup.to_html(self.content) self.updated_on = Time.now - self.title_char = Title.new(title).first_char + self.title_char = Title.new(self.title).first_char end def self.search(query)
Make it clear that we use Sequel::Model attributes
diff --git a/lib/swagger/api.rb b/lib/swagger/api.rb index abc1234..def5678 100644 --- a/lib/swagger/api.rb +++ b/lib/swagger/api.rb @@ -12,7 +12,7 @@ end def operations http_methods, opts = {} - operations = http_methods.map { |m| Operation.new self, m, opts } + operations = Array(http_methods).map { |m| Operation.new self, m, opts } operations.each { |o| yield(o) } @values[:operations].concat operations end
Allow single strings for operations.
diff --git a/bureaucrat.gemspec b/bureaucrat.gemspec index abc1234..def5678 100644 --- a/bureaucrat.gemspec +++ b/bureaucrat.gemspec @@ -9,7 +9,7 @@ s.specification_version = 2 if s.respond_to? :specification_version= - s.files = ["lib/bureaucrat/fields.rb", "lib/bureaucrat/forms.rb", "lib/bureaucrat/formsets.rb", "lib/bureaucrat/media.rb", "lib/bureaucrat/quickfields.rb", "lib/bureaucrat/temporary_uploaded_file.rb", "lib/bureaucrat/utils.rb", "lib/bureaucrat/validators.rb", "lib/bureaucrat/widgets.rb", "lib/bureaucrat.rb", "README.md", "LICENSE", "test/fields_test.rb", "test/forms_test.rb", "test/formsets_test.rb", "test/test_helper.rb", "test/utils_test.rb", "test/widgets_test.rb"] + s.files = ["lib/bureaucrat/fields.rb", "lib/bureaucrat/forms.rb", "lib/bureaucrat/formsets.rb", "lib/bureaucrat/quickfields.rb", "lib/bureaucrat/temporary_uploaded_file.rb", "lib/bureaucrat/utils.rb", "lib/bureaucrat/validators.rb", "lib/bureaucrat/widgets.rb", "lib/bureaucrat.rb", "README.md", "LICENSE", "test/fields_test.rb", "test/forms_test.rb", "test/formsets_test.rb", "test/test_helper.rb", "test/utils_test.rb", "test/widgets_test.rb"] s.require_paths = ['lib']
Remove reference to unused file
diff --git a/app/admin/venue.rb b/app/admin/venue.rb index abc1234..def5678 100644 --- a/app/admin/venue.rb +++ b/app/admin/venue.rb @@ -21,7 +21,7 @@ attributes_table do row :single_events do |preset| ul do - venue.single_events.map { |s| li(link_to(s.name, edit_admin_single_event_path(s))) } + venue.single_events.map { |s| li(link_to(s.full_name, edit_admin_single_event_path(s))) } end end row :events do |preset|
Use full name, prevents empty list items
diff --git a/timeliness.gemspec b/timeliness.gemspec index abc1234..def5678 100644 --- a/timeliness.gemspec +++ b/timeliness.gemspec @@ -11,6 +11,7 @@ s.homepage = %q{http://github.com/adzap/timeliness} s.summary = %q{Date/time parsing for the control freak.} s.description = %q{Fast date/time parser with customisable formats, timezone and I18n support.} + s.license = "MIT" s.rubyforge_project = %q{timeliness}
Add license name to the gemspec.
diff --git a/lesson6/let_it_be_refactor.rb b/lesson6/let_it_be_refactor.rb index abc1234..def5678 100644 --- a/lesson6/let_it_be_refactor.rb +++ b/lesson6/let_it_be_refactor.rb @@ -0,0 +1,27 @@+# Lesson 6 - Gospel Song Chord Progression +# Let It Be - Refactor +use_synth :piano + +define :gospel_chord do |pitch, pitch_scale = :major| + play pitch + 2.times do + play chord(pitch.succ, pitch_scale) + sleep 0.5 + end +end + +[:C3, :G3, [:A3, :minor], :F3, :C3, :G3].each do |pitch| + gospel_chord(*pitch) +end + +play :F3 +play chord(:F4) +sleep 0.5 + +play chord(:E4, :minor) +sleep 0.25 +play chord(:D4, :minor) +sleep 0.25 + +play :C3 +play chord(:C4)
Add in a refactored version of let it be
diff --git a/spec/cloud_payments/models/order_spec.rb b/spec/cloud_payments/models/order_spec.rb index abc1234..def5678 100644 --- a/spec/cloud_payments/models/order_spec.rb +++ b/spec/cloud_payments/models/order_spec.rb @@ -0,0 +1,59 @@+require 'spec_helper' + +describe CloudPayments::Order do + subject{ described_class.new(attributes) } + + let(:attributes) do + { + id: 'f2K8LV6reGE9WBFn', + number: 61, + amount: 10.0, + currency: 'RUB', + currency_code: 0, + email: 'client@test.local', + description: 'Оплата на сайте example.com', + require_confirmation: true, + url:'https://orders.cloudpayments.ru/d/f2K8LV6reGE9WBFn' + } + end + + describe 'properties' do + specify{ expect(subject.id).to eq('f2K8LV6reGE9WBFn') } + specify{ expect(subject.number).to eq(61) } + specify{ expect(subject.amount).to eq(10.0) } + specify{ expect(subject.currency).to eq('RUB') } + specify{ expect(subject.currency_code).to eq(0) } + specify{ expect(subject.email).to eq('client@test.local') } + specify{ expect(subject.description).to eq('Оплата на сайте example.com') } + specify{ expect(subject.require_confirmation).to eq(true) } + specify{ expect(subject.url).to eq('https://orders.cloudpayments.ru/d/f2K8LV6reGE9WBFn') } + + it_behaves_like :raise_without_attribute, :id + it_behaves_like :raise_without_attribute, :number + it_behaves_like :raise_without_attribute, :amount + it_behaves_like :raise_without_attribute, :currency + it_behaves_like :raise_without_attribute, :currency_code + it_behaves_like :raise_without_attribute, :description + it_behaves_like :raise_without_attribute, :require_confirmation + it_behaves_like :raise_without_attribute, :url + + it_behaves_like :not_raise_without_attribute, :email + end + + describe 'transformations' do + context 'amount from string' do + before { attributes[:amount] = '293.42' } + specify{ expect(subject.amount).to eql(293.42) } + end + + context 'require_confirmation from "1"' do + before { attributes[:require_confirmation] = '1' } + specify{ expect(subject.require_confirmation).to eql(true) } + end + + context 'require_confirmation from "0"' do + before { attributes[:require_confirmation] = '0' } + specify{ expect(subject.require_confirmation).to eql(false) } + end + end +end
Add coverage for order model
diff --git a/spec/unit/nutrella/configuration_spec.rb b/spec/unit/nutrella/configuration_spec.rb index abc1234..def5678 100644 --- a/spec/unit/nutrella/configuration_spec.rb +++ b/spec/unit/nutrella/configuration_spec.rb @@ -5,48 +5,32 @@ describe "#initialize" do it "succeeds when configuration exists and YAML well formed" do - configuration_exists + configuration_file(key: "c1", secret: "5f", token: "3c") - allow(YAML).to receive(:load_file).with(path).and_return( - key: "c1", - secret: "5f", - token: "3c" - ) - - expect(subject).to have_attributes( - key: "c1", - secret: "5f", - token: "3c" - ) + expect(subject).to have_attributes(key: "c1", secret: "5f", token: "3c") end it "handles the case when the configuration is missing" do - configuration_missing + missing_configuration_file expect(File).to receive(:write).with(path, Configuration::INITIAL_CONFIGURATION) - expect { subject }.to( - output(/you don't have a config file/).to_stderr.and(raise_error(SystemExit)) - ) + expect { subject }.to output(/you don't have a config file/).to_stderr.and(raise_error(SystemExit)) end it "fails when configuration is malformed" do - configuration_exists - - allow(YAML).to receive(:load_file).with(path).and_return( - key: "c1", - token: "5f" - ) + configuration_file(key: "c1", token: "5f") expect { subject }.to raise_error(/#{path} malformed/) end end - def configuration_exists + def configuration_file(values) allow(File).to receive(:exist?).with(path).and_return(true) + allow(YAML).to receive(:load_file).with(path).and_return(values) end - def configuration_missing + def missing_configuration_file allow(File).to receive(:exist?).with(path).and_return(false) end end
Increase abstraction in the spec.
diff --git a/init.rb b/init.rb index abc1234..def5678 100644 --- a/init.rb +++ b/init.rb @@ -24,17 +24,18 @@ end # include Sortable and Searchable into all controllers -class ::ApplicationController < ActionController::Base - class << self - alias_method :amberbit_scaffold_original_inherited, :inherited - end +#class ::ApplicationController < ActionController::Base +# class << self +# alias_method :amberbit_scaffold_original_inherited, :inherited +# end - def self.inherited(subclass) - amberbit_scaffold_original_inherited(subclass) +# def self.inherited(subclass) +# amberbit_scaffold_original_inherited(subclass) - subclass.instance_eval do - include Sortable::Controller - include Searchable::Controller - end - end -end +# subclass.instance_eval do +# include Sortable::Controller +# include Searchable::Controller +# end +# end +#end +
Disable autoincluding of Sortable and Searchable controller modules
diff --git a/init.rb b/init.rb index abc1234..def5678 100644 --- a/init.rb +++ b/init.rb @@ -3,7 +3,8 @@ include AssertRequest # In production mode, trap assert_request's RequestError exceptions, and - # render a 404 response instead. + # render a 404 response instead of the default 500. Comment out the + # alias_method_chain call below if you don't want this behavior. def rescue_action_in_public_with_request_error(exception) if exception.kind_of? RequestError respond_to do |type|
Add comment about how to disable the current exception behavior in production (a 404 response). git-svn-id: 36d0598828eae866924735253b485a592756576c@8097 da5c320b-a5ec-0310-b7f9-e4d854caa1e2
diff --git a/lib/better_sjr/renderer_extensions.rb b/lib/better_sjr/renderer_extensions.rb index abc1234..def5678 100644 --- a/lib/better_sjr/renderer_extensions.rb +++ b/lib/better_sjr/renderer_extensions.rb @@ -1,5 +1,13 @@ module BetterSJR + # Wraps JavaScript formatted templates in a try-catch statement when rendered module RendererExtensions + # Overrides default behavior by wrapping rendered content in a try-catch + # statement. + # + # If debugging is enabled and the template is JavaScript format, wrap the + # rendered content in a try-catch statement. + # + # @return [String] the rendered template content def render_template(*) if debugging_sjr? && rendering_js? TryCatchStatement.new(super).wrapped_code
Add code documentation to RendererExtensions module
diff --git a/lib/apilint/lint/deep_path.rb b/lib/apilint/lint/deep_path.rb index abc1234..def5678 100644 --- a/lib/apilint/lint/deep_path.rb +++ b/lib/apilint/lint/deep_path.rb @@ -6,8 +6,19 @@ # TODO: Configure a prefix. Ex: :prefix => '/admin/api/' def check(request, _response) - return if request.uri.split("/").size <= 3 - add_offense(request.smart_path, request, :uri) + lint_config = @config.for_lint(lint_name) + max_depth = lint_config['MaxDepth'] || 3 + prefix = lint_config['Prefix'] + + if prefix + uri = request.uri.gsub(/^#{prefix}/, '') + else + uri = request.uri + end + + if uri.split("/").size > max_depth + add_offense(request.smart_path, request, :uri) + end end end end
Add config options in DeepPath lint
diff --git a/lib/camel_caser/middleware.rb b/lib/camel_caser/middleware.rb index abc1234..def5678 100644 --- a/lib/camel_caser/middleware.rb +++ b/lib/camel_caser/middleware.rb @@ -25,11 +25,12 @@ Rack::Request end.new(env) if request.post? - if env["rack.request.form_hash"] - Strategies::FormHash.handle(env) + strategy = if env["rack.request.form_hash"] + Strategies::FormHash else - Strategies::RawInput.handle(env) + Strategies::RawInput end + strategy.handle(env) end end end
Clean up if - strategy
diff --git a/app/models/login_observer.rb b/app/models/login_observer.rb index abc1234..def5678 100644 --- a/app/models/login_observer.rb +++ b/app/models/login_observer.rb @@ -1,4 +1,5 @@ class LoginObserver < ActiveRecord::Observer + unloadable # mail the user after signing up def after_request_activation(login, transition)
Make the login observer unloadable as this appears to prevent the observer from not working in development
diff --git a/app/models/miq_reportable.rb b/app/models/miq_reportable.rb index abc1234..def5678 100644 --- a/app/models/miq_reportable.rb +++ b/app/models/miq_reportable.rb @@ -8,9 +8,7 @@ end Ruport::Data::Table.new(:data => data.collect(&:last), - :column_names => data.collect(&:first).flatten.uniq, - :record_class => nil, - :filters => nil) + :column_names => data.collect(&:first).flatten.uniq) end # generate a ruport table from an array of hashes where the keys are the column names
Remove unused options from Ruport::Data::Table.new call
diff --git a/app/services/iiif_service.rb b/app/services/iiif_service.rb index abc1234..def5678 100644 --- a/app/services/iiif_service.rb +++ b/app/services/iiif_service.rb @@ -1,4 +1,17 @@ class IiifService < Spotlight::Resources::IiifService + def self.iiif_response(url) + resp = Faraday.get(url) + if resp.success? + resp.body + else + Rails.logger.info("Failed to get #{url}") + {}.to_json + end + rescue Faraday::Error::ConnectionFailed, Faraday::TimeoutError => e + Rails.logger.warn("HTTP GET for #{url} failed with #{e}") + {}.to_json + end + def create_iiif_manifest(manifest, collection = nil) IiifManifest.new(url: manifest['@id'], manifest: manifest, collection: collection) end
Allow for 404 when reindexing.
diff --git a/lib/firehose/server/message_filter.rb b/lib/firehose/server/message_filter.rb index abc1234..def5678 100644 --- a/lib/firehose/server/message_filter.rb +++ b/lib/firehose/server/message_filter.rb @@ -3,6 +3,8 @@ # A no-op message filter. This class is meant to be # extended by users for implementing channel middleware. class MessageFilter + attr_reader :channel, :params + def initialize(channel) @channel = channel @params = {}
Add attr_reader for MessageFilter channel & params
diff --git a/lib/http/exceptions/http_exception.rb b/lib/http/exceptions/http_exception.rb index abc1234..def5678 100644 --- a/lib/http/exceptions/http_exception.rb +++ b/lib/http/exceptions/http_exception.rb @@ -6,7 +6,7 @@ def initialize(options = {}) @original_exception = options[:original_exception] @response = options[:response] - msg = "An error as occured while processing response." + msg = "An error as occurred while processing response." msg += " Status #{response.code}\n#{response.body}" if response msg += " Original Exception: #{original_exception}" if original_exception super msg
Fix spelling typo in exception message The correct spelling is "occurred" (not occured). Per: https://www.grammarly.com/blog/occurred-occured-ocurred/
diff --git a/lib/es_easy_query/executor.rb b/lib/es_easy_query/executor.rb index abc1234..def5678 100644 --- a/lib/es_easy_query/executor.rb +++ b/lib/es_easy_query/executor.rb @@ -14,7 +14,9 @@ end def index(index_name) - new(index_name: index_name) + instance = self.class.new(query_class) + instance.send(:_index_name=, index_name) + instance end # query the query to execute on elasticsearch
Allow changing index at execution and definition time
diff --git a/lib/sidekiq_unique_jobs/middleware/client/unique_jobs.rb b/lib/sidekiq_unique_jobs/middleware/client/unique_jobs.rb index abc1234..def5678 100644 --- a/lib/sidekiq_unique_jobs/middleware/client/unique_jobs.rb +++ b/lib/sidekiq_unique_jobs/middleware/client/unique_jobs.rb @@ -1,5 +1,4 @@ require 'sidekiq_unique_jobs/middleware/client/strategies/unique' -require 'sidekiq_unique_jobs/middleware/client/strategies/testing_inline' module SidekiqUniqueJobs module Middleware
Remove require for testing inline
diff --git a/lib/middleman-alias/alias-resource.rb b/lib/middleman-alias/alias-resource.rb index abc1234..def5678 100644 --- a/lib/middleman-alias/alias-resource.rb +++ b/lib/middleman-alias/alias-resource.rb @@ -21,6 +21,7 @@ %[ <html> <head> + <link rel="canonical" href="#{@alias_path}" /> <meta http-equiv=refresh content="0; url=#{@alias_path}" /> <meta name="robots" content="noindex,follow" /> <meta http-equiv="cache-control" content="no-cache" />
Add rel=canonical URL to alias page See https://support.google.com/webmasters/answer/139066
diff --git a/lib/taiwan_validator/ubn_validator.rb b/lib/taiwan_validator/ubn_validator.rb index abc1234..def5678 100644 --- a/lib/taiwan_validator/ubn_validator.rb +++ b/lib/taiwan_validator/ubn_validator.rb @@ -10,11 +10,10 @@ results = digits.zip(MULTIPLIER).map do |op1, op2| digit = op1 * op2 digit = digit.to_s.chars.map(&:to_i).reduce(&:+) if number_digits(digit) == 2 - digit = digit.to_s.chars.last.to_i if number_digits(digit) == 2 digit end.inject(&:+) - results % 10 == 0 + results % 10 == 0 || (ubn[6] == "7" && (results + 1) % 10 == 0) end private
Fix error when 7th digit == "7"
diff --git a/lib/vagrant-butcher/action/cleanup.rb b/lib/vagrant-butcher/action/cleanup.rb index abc1234..def5678 100644 --- a/lib/vagrant-butcher/action/cleanup.rb +++ b/lib/vagrant-butcher/action/cleanup.rb @@ -27,6 +27,8 @@ rescue # The dir wasn't empty. end + else + env[:butcher].ui.warn "Client and/or node not butchered from the Chef Server. Client key was left at #{host_key_path(env)}" end end
Add message that key was not deleted on error
diff --git a/feeder.gemspec b/feeder.gemspec index abc1234..def5678 100644 --- a/feeder.gemspec +++ b/feeder.gemspec @@ -17,7 +17,7 @@ DESC s.license = "MIT" - s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"] + s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"] s.test_files = Dir["spec/**/*"] s.add_dependency "rails", "~> 4.0"
Update gemspec to point to markdown'd README
diff --git a/lib/rails_patch/components.rb b/lib/rails_patch/components.rb index abc1234..def5678 100644 --- a/lib/rails_patch/components.rb +++ b/lib/rails_patch/components.rb @@ -5,9 +5,9 @@ # By default, this logs *WAY* too much data for us when we're doing sidebars--I've seen ~2M # per hit. This has a negative impact on performance. - alias_method :orig_component_logging, :component_logging + alias_method :component_logging_with_unfiltered_options, :component_logging def component_logging(options, &block) - orig_component_logging(options.reject {|k,v| k==:params}, &block) + component_logging_with_unfiltered_options(options.reject {|k,v| k==:params}, &block) end end end
Rename orig_component_logging to something more descriptive, at pdcawley's request git-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@1020 820eb932-12ee-0310-9ca8-eeb645f39767
diff --git a/lib/tasks/datagrid_tasks.rake b/lib/tasks/datagrid_tasks.rake index abc1234..def5678 100644 --- a/lib/tasks/datagrid_tasks.rake +++ b/lib/tasks/datagrid_tasks.rake @@ -1,15 +1,15 @@ namespace :datagrid do - def copy_template(path) - gem_app = File.expand_path("../../../app", __FILE__) - rails_app = (Rails.root + "app").to_s - puts "* copy (#{path})" - sh "mkdir -p #{rails_app}/#{File.dirname path}" - cp "#{gem_app}/#{path}", "#{rails_app}/#{path}" - end desc "Copy table partials into rails application" task :copy_partials do + def copy_template(path) + gem_app = File.expand_path("../../../app", __FILE__) + rails_app = (Rails.root + "app").to_s + puts "* copy (#{path})" + sh "mkdir -p #{rails_app}/#{File.dirname path}" + cp "#{gem_app}/#{path}", "#{rails_app}/#{path}" + end copy_template "views/datagrid/_table.html.erb" copy_template "views/datagrid/_head.html.erb" copy_template "views/datagrid/_row.html.erb"
Refactor rake task a little
diff --git a/lib/tasks/setup_exchange.rake b/lib/tasks/setup_exchange.rake index abc1234..def5678 100644 --- a/lib/tasks/setup_exchange.rake +++ b/lib/tasks/setup_exchange.rake @@ -0,0 +1,7 @@+task :setup_exchange do + config = YAML.load_file(Rails.root.join("config", "rabbitmq.yml"))[Rails.env].symbolize_keys + + bunny = Bunny.new(ENV["RABBITMQ_URL"]) + channel = bunny.start.create_channel + Bunny::Exchange.new(channel, :topic, config[:exchange]) +end
Add task to setup exchange for RabbitMQ We need the exchange and it's queues in E2E testing this rake task allows for them to be setup using the existing config in publishing-api.
diff --git a/lib/vagrant/action/vm/boot.rb b/lib/vagrant/action/vm/boot.rb index abc1234..def5678 100644 --- a/lib/vagrant/action/vm/boot.rb +++ b/lib/vagrant/action/vm/boot.rb @@ -24,7 +24,7 @@ def wait_for_boot @env.ui.info I18n.t("vagrant.actions.vm.boot.waiting") - @env.env.config.ssh.max_tries.to_i.times do |i| + @env["config"].ssh.max_tries.to_i.times do |i| if @env["vm"].ssh.up? @env.ui.info I18n.t("vagrant.actions.vm.boot.ready") return true
Use the env["key"] style instead of env.env.key
diff --git a/by_star.gemspec b/by_star.gemspec index abc1234..def5678 100644 --- a/by_star.gemspec +++ b/by_star.gemspec @@ -16,6 +16,8 @@ s.add_development_dependency "bundler", ">= 1.0.0" s.add_development_dependency "sqlite3" + s.add_development_dependency "pg" + s.add_development_dependency "mysql2" s.add_development_dependency "rspec-rails", "~> 2.8" s.add_development_dependency "timecop", "~> 0.3"
Add pg and mysql2 dependencies to gemspec This is so that when 'bundle install' runs on Travis, it has the depenencies so the mysql and pg builds can run
diff --git a/spec/capybara_helper.rb b/spec/capybara_helper.rb index abc1234..def5678 100644 --- a/spec/capybara_helper.rb +++ b/spec/capybara_helper.rb @@ -9,12 +9,14 @@ selected_driver.to_s.start_with? 'selenium' end -Capybara.server_port = 31337 Capybara.default_driver = selected_driver -# TODO: fix the tests that depend on hidden elements and remove this if run_with_selenium? + # TODO: fix the tests that depend on hidden elements and remove this Capybara.ignore_hidden_elements = false + + # Include port on the URL, so we don't need to forward it via nginx or so + Capybara.always_include_port = true end puts "Running Capybara tests with #{selected_driver}, #{Capybara.ignore_hidden_elements ? '' : 'not '}ignoring hidden elements"
Include Capybara server port on URL for Selenium
diff --git a/closed_issues.rb b/closed_issues.rb index abc1234..def5678 100644 --- a/closed_issues.rb +++ b/closed_issues.rb @@ -6,14 +6,14 @@ require_relative 'sprint_statistics' fq_repo = File.join(ORGANIZATION, PROJECT) ss = SprintStatistics.new(ACCESS_TOKEN) -milestone = ss.client.milestones(fq_repo, :title => MILESTONE).first +milestone = ss.client.milestones(fq_repo, :state => "all").detect { |m| m[:title] == MILESTONE } prs = ss.pull_requests(fq_repo, :milestone => milestone[:number], :state => "closed") File.open("closed_issues_#{PROJECT}_repo.csv", 'w') do |f| - f.puts "Milestone Statistics for: #{prs.first.milestone.title}" - f.puts "NUMBER,TITLE,AUTHOR,ASSIGNEE,LABELS,CLOSED AT,CHANGELOGTEXT" - prs.each do |i| - i.changelog = "#{i.title} [(##{i.number})](#{i.pull_request.html_url})" - f.puts "#{i.number},#{i.title},#{i.user.login},#{i.assignee && i.assignee.login},#{i.labels.collect(&:name).join(" ")},#{i.closed_at},#{i.changelog}" - end + f.puts "Milestone Statistics for: #{prs.first.milestone.title}" + f.puts "NUMBER,TITLE,AUTHOR,ASSIGNEE,LABELS,CLOSED AT,CHANGELOGTEXT" + prs.each do |i| + i.changelog = "#{i.title} [(##{i.number})](#{i.pull_request.html_url})" + f.puts "#{i.number},#{i.title},#{i.user.login},#{i.assignee && i.assignee.login},#{i.labels.collect(&:name).join(" ")},#{i.closed_at},#{i.changelog}" + end end
Fix code for detecting the correct milestone. You can't filter by :title in the api
diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/comments_controller_spec.rb +++ b/spec/controllers/comments_controller_spec.rb @@ -6,6 +6,8 @@ @user = create(:user) @idea = create(:idea) @comment = create(:comment) + + sign_in @user end describe "GET 'index'" do
Use devise to sign in the test user. Creating a new comment or editing an existing one requires users to be signed in/authenticated (as specified in the comments controller). Without signing in, trying to request the new & edit actions from the controller would fail the authentication and return false. This is not what the test was expecting.
diff --git a/js_image_paths.gemspec b/js_image_paths.gemspec index abc1234..def5678 100644 --- a/js_image_paths.gemspec +++ b/js_image_paths.gemspec @@ -18,7 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_dependency("rails", "~> 4.0") + spec.add_dependency "rails", ">= 4.0", "< 6.0" spec.add_development_dependency "bundler", "~> 1.10" spec.add_development_dependency "rake", "~> 10.0" end
Support rails 5 in dependencies
diff --git a/lib/fappu/manga.rb b/lib/fappu/manga.rb index abc1234..def5678 100644 --- a/lib/fappu/manga.rb +++ b/lib/fappu/manga.rb @@ -7,7 +7,9 @@ URL = "https://api.fakku.net/manga" attr_accessor :title, :url, :description, :language, :category, :date, :filesize, - :favorites, :comments, :pages, :poster, :poster_url, :tags + :favorites, :comments, :pages, :poster, :poster_url, :tags, :translators, + :series, :artists, :images, :tags + def initialize args @@ -20,6 +22,7 @@ response = JSON.parse( URI.parse(URL).read ) arr = response["latest"] + puts arr.first.inspect arr.collect do |manga| self.new(title: manga["content_name"], url: manga["content_url"],
Add artists, images, series label。
diff --git a/lib/islay/pages.rb b/lib/islay/pages.rb index abc1234..def5678 100644 --- a/lib/islay/pages.rb +++ b/lib/islay/pages.rb @@ -55,8 +55,8 @@ @features = bool end - def content(slug, name, type) - @contents[slug] = {:slug => slug, :name => name, :type => type} + def content(slug, name, type, opts = {}) + @contents[slug] = {:slug => slug, :name => name, :type => type, :opts = opts} end def page(slug, name, &blk)
Allow content definitions to take an options hash (for grouping)
diff --git a/lib/petscan_api.rb b/lib/petscan_api.rb index abc1234..def5678 100644 --- a/lib/petscan_api.rb +++ b/lib/petscan_api.rb @@ -35,6 +35,6 @@ end def typical_errors - [Errno::EHOSTUNREACH] + [Errno::EHOSTUNREACH, Faraday::TimeoutError] end end
Add timeout as common PetScan API error This seems to be a nontrivial problem with some PetScan queries, such as for psid 16065109
diff --git a/lib/relex/token.rb b/lib/relex/token.rb index abc1234..def5678 100644 --- a/lib/relex/token.rb +++ b/lib/relex/token.rb @@ -1,16 +1,6 @@ module Relex class Token - attr_reader :palavras_reservadas, :delimitadores, :operadores_aritmeticos, :identificadores, :strings_numericas, :comando_atribuicao, :operador_relacional - def initialize(valor, classificacao) - self.palavras_reservadas = /program|var|begin|end|integer|if|then|else/ - self.delimitadores = /;|:|,|\(|\)/ - self.operadores_aritmeticos = /\+|\*/ - self.identificadores = /[a..z]+[a..z0..9_]*/ - self.strings_numericas = /[0..9]+/ - self.comando_atribuicao = /\:=/ - self.operador_relacional = /=/ - @valor = valor @classificacao = classificacao end
Remove regexps de Token. Elas devem estar em cli.rb
diff --git a/lib/wixy/caesar.rb b/lib/wixy/caesar.rb index abc1234..def5678 100644 --- a/lib/wixy/caesar.rb +++ b/lib/wixy/caesar.rb @@ -5,7 +5,7 @@ class Caesar def initialize(config = Config.new) @text_alphabet = Alphabet.AZ - @cipher_alphabet = Alphabet.AZ :shift => config.shift + @cipher_alphabet = Alphabet.AZ shift: config.shift end def encrypt(text)
Revert "Use 1.8-compatible hash syntax" This reverts commit 20a33e072956d1d034ba948fee00bafcdaa4e747.
diff --git a/recipes/default.rb b/recipes/default.rb index abc1234..def5678 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -27,5 +27,6 @@ source node['xquartz']['url'] checksum node['xquartz']['checksum'] volumes_dir "XQuartz-#{node['xquartz']['version']}" + package_id "org.macosforge.xquartz.pkg" type "pkg" end
Use package_id to ensure idempotency of pkg install.
diff --git a/recipes/default.rb b/recipes/default.rb index abc1234..def5678 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -12,6 +12,20 @@ package 'dsc20' package 'cassandra20' +execute "Set cassandra listening address" do + command "sed -i -e 's/localhost/#{node['fqdn']}/g' /etc/cassandra/conf/cassandra.yaml" +end + +service "dsc20" do + action [ :enable, :start ] + supports :status => true, :start => true, :stop => true, :restart => true +end + +service "cassandra20" do + action [ :enable, :start ] + supports :status => true, :start => true, :stop => true, :restart => true +end + include_recipe 'midokura::zookeeper' include_recipe 'midokura::midolman' include_recipe 'midokura::midonet-api'
Set FQDN for cassandra listen and RPC then start datastax and cassandra
diff --git a/recipes/upgrade.rb b/recipes/upgrade.rb index abc1234..def5678 100644 --- a/recipes/upgrade.rb +++ b/recipes/upgrade.rb @@ -19,7 +19,11 @@ case node['platform_family'] when 'debian', 'ubuntu' - packages = %w(libssl1.0.0 openssl) + packages = if platform?('debian') && node['platform_version'].to_i >= 9 + %w(libssl1.0.2 openssl) + else + %w(libssl1.0.0 openssl) + end when 'rhel', 'fedora', 'suse', 'amazon' packages = %w(openssl) else
Fix failures on Debian 9 Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
diff --git a/redirector.gemspec b/redirector.gemspec index abc1234..def5678 100644 --- a/redirector.gemspec +++ b/redirector.gemspec @@ -15,7 +15,7 @@ s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md", "redirector.gemspec", "HISTORY"] - s.test_files = Dir["test/**/*"] + s.test_files = Dir["spec/**/*"] s.add_dependency "rails", "~> 3.2.8" # s.add_dependency "jquery-rails"
Update test files defination in gemspec
diff --git a/app/controllers/permit_steps_controller.rb b/app/controllers/permit_steps_controller.rb index abc1234..def5678 100644 --- a/app/controllers/permit_steps_controller.rb +++ b/app/controllers/permit_steps_controller.rb @@ -9,8 +9,18 @@ def show @permit = current_permit + + case step + + when :enter_details + skip_step if @permit.addition == nil || !@permit.addition + end + when :enter_repair + skip_step if @permit.repair == nil || !@permit.repair + end render_wizard - end + + end def update @permit = current_permit
Make it possible to skip steps
diff --git a/app/services/search/conditions/abstract.rb b/app/services/search/conditions/abstract.rb index abc1234..def5678 100644 --- a/app/services/search/conditions/abstract.rb +++ b/app/services/search/conditions/abstract.rb @@ -40,7 +40,7 @@ def order order_conditions = RademadeAdmin::Search::Part::Order.new - order_conditions.add(:id, :desc) + order_conditions.add(@data_items.primary_field.name, :desc) order_conditions end
Fix default table order field
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,5 @@ Rails.application.routes.draw do resources :communities, :defaults => { :format => 'json' } do - resources :events do - resources :tickets - end - resources :admins - resources :owners - resources :members + resources :events end end
Fix review delete routing of non-create controller
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,7 +5,7 @@ namespace :v1 do mount_devise_token_auth_for 'User', at: 'auth' - resources :users, only: [:index, :show], param: :nickname + resources :users, only: [:index, :show], param: :nickname, constraints: { :nickname => /[^\/]+/ } resources :victories, only: [:index, :show, :create, :destroy] do resources :votes, only: [:index, :create, :destroy, :update] end
Allow user url with username with a dot
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -27,6 +27,6 @@ match ':controller/:action/:id' match ':controller/:action' - match 'tasks/*path/:id' => 'tasks#show' + match 'tasks/*path/:id' => 'tasks#edit' end
Fix default route (show -> edit)
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -32,5 +32,5 @@ end end - resources :discussion_boards, :only => [ :edit ] + resources :discussion_boards, :only => [ :edit, :update ] end
Update Routing for DiscussionBoard update Action Add a route for the DiscussionBoard update action.
diff --git a/config/routes.rb b/config/routes.rb index abc1234..def5678 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -17,9 +17,12 @@ end resources :courses, :only => [ :create ] + resources :blogs, :only => [ :create ] end resources :courses, :only => [ :edit, :update ] do resources :lessons, :only => [ :create, :update ] end + + resources :blogs, :only => [ :edit ] end
Add Blog create and edit Routes Update the routing file to include Blog create and edit routes.
diff --git a/spec/feature/login_register_spec.rb b/spec/feature/login_register_spec.rb index abc1234..def5678 100644 --- a/spec/feature/login_register_spec.rb +++ b/spec/feature/login_register_spec.rb @@ -5,17 +5,21 @@ @user = create(:user) end - scenario 'Signing in with correct credentials' do + given(:sign_in) do visit '/login' within('#new_user') do fill_in 'Email', with: @user.email fill_in 'Password', with: @user.password end click_button 'Log in' + end + + scenario 'succeeds with correct credentials' do + sign_in expect(page).to have_content 'Signed in successfully' end - scenario 'Signing in with correct credentials' do + scenario 'fails with incorrect credentials' do visit '/login' within('#new_user') do fill_in 'Email', with: @user.email @@ -24,4 +28,9 @@ click_button 'Log in' expect(page).to have_content 'Invalid Email or password' end + + scenario 'Sign in redirects to dashboard overview' do + sign_in + expect(page).to have_current_path(dashboard_overview_path) + end end
Improve descriptions for sign in tests
diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb index abc1234..def5678 100644 --- a/config/initializers/redis.rb +++ b/config/initializers/redis.rb @@ -1 +1,3 @@-$redis = Redis.new(url: ENV["REDIS_URL"]) if ENV['REDIS_URL'] +redis_connection = Redis.new(url: ENV["REDIS_URL"]) if ENV['REDIS_URL'] +namespace = "glowfic:#{Rails.env}" +$redis = Redis::Namespace.new(namespace, :redis => redis_connection)
Use Redis namespaced to current env
diff --git a/generators/layout_files/layout_files_generator.rb b/generators/layout_files/layout_files_generator.rb index abc1234..def5678 100644 --- a/generators/layout_files/layout_files_generator.rb +++ b/generators/layout_files/layout_files_generator.rb @@ -1,5 +1,5 @@ class LayoutFilesGenerator < Rails::Generator::Base - + def manifest record do |m| ["public/javascripts/application.js", @@ -11,15 +11,14 @@ "public/stylesheets/layout.css", "public/stylesheets/mobile.css", "public/stylesheets/print.css", - "public/stylesheets/screen.css", "public/stylesheets/reset.css", "public/stylesheets/skin.css", "public/stylesheets/typography.css"].each do |file| m.file file, file end - - m.file( 'application_layout.html.erb', File.join('app/views/layouts', 'application.html.erb')) + + m.file( 'application_layout.html.erb', File.join('app/views/layouts', 'application.html.erb')) end end - + end
Fix to generator (remove missing file screen.css)
diff --git a/paperclip-storage-ftp.gemspec b/paperclip-storage-ftp.gemspec index abc1234..def5678 100644 --- a/paperclip-storage-ftp.gemspec +++ b/paperclip-storage-ftp.gemspec @@ -5,6 +5,7 @@ gem.description = %q{Allow Paperclip attachments to be stored on FTP servers} gem.summary = %q{Allow Paperclip attachments to be stored on FTP servers} gem.homepage = "https://github.com/xing/paperclip-storage-ftp" + gem.license = "MIT" gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } gem.files = `git ls-files`.split("\n")
Add MIT license info to gemspec [ci skip]
diff --git a/resources/check.rb b/resources/check.rb index abc1234..def5678 100644 --- a/resources/check.rb +++ b/resources/check.rb @@ -19,6 +19,8 @@ actions :add, :remove +default_action :add + state_attrs :command, :command_name, :critical_condition, @@ -27,13 +29,7 @@ # Name of the nrpe check, used for the filename and the command name attribute :command_name, :kind_of => String, :name_attribute => true - attribute :warning_condition, :kind_of => [Integer, String], :default => nil attribute :critical_condition, :kind_of => [Integer, String], :default => nil attribute :command, :kind_of => String attribute :parameters, :kind_of => String, :default => nil - -def initialize(*args) - super - @action = :add -end
Update LWRP to use default_action vs. initialize method
diff --git a/resources/model.rb b/resources/model.rb index abc1234..def5678 100644 --- a/resources/model.rb +++ b/resources/model.rb @@ -1,7 +1,7 @@ actions :create, :delete default_action :create -attribute :name, :kind_of => Symbol, :name_attribute => true, :required => true +attribute :name, :kind_of => String, :name_attribute => true, :required => true attribute :description, :kind_of => String attribute :definition, :kind_of => String
Fix Symbols as name attribute broken with chef-client 12.5
diff --git a/lib/dry/types/value.rb b/lib/dry/types/value.rb index abc1234..def5678 100644 --- a/lib/dry/types/value.rb +++ b/lib/dry/types/value.rb @@ -3,7 +3,7 @@ module Dry module Types class Value < Struct - def self.new(*, &_block) + def self.new(*) super.freeze end end
Refactor `Value.new` removing unnecessary &_block
diff --git a/db/migrate/20160624040512_create_trails.rb b/db/migrate/20160624040512_create_trails.rb index abc1234..def5678 100644 --- a/db/migrate/20160624040512_create_trails.rb +++ b/db/migrate/20160624040512_create_trails.rb @@ -1,6 +1,13 @@ class CreateTrails < ActiveRecord::Migration def change create_table :trails do |t| + t.string :name, null: false + t.text :directions + t.float :lat + t.float :lon + t.text :description + t.string :city, null: false + t.string :state, null: false t.timestamps null: false end
Update trails migration to include info from API
diff --git a/lib/related/helpers.rb b/lib/related/helpers.rb index abc1234..def5678 100644 --- a/lib/related/helpers.rb +++ b/lib/related/helpers.rb @@ -1,5 +1,5 @@ require 'base64' -require 'digest/sha2' +require 'digest/md5' module Related module Helpers @@ -7,8 +7,8 @@ # Generate a unique id def generate_id Base64.encode64( - Digest::SHA256.digest("#{Time.now}-#{rand}") - ).gsub('/','x').gsub('+','y').gsub('=','').strip[0..21] + Digest::MD5.digest("#{Time.now}-#{rand}") + ).gsub('/','x').gsub('+','y').gsub('=','').strip end end
Use MD5 instead of SHA to generate ids. Makes more sense and is faster.
diff --git a/lib/thread_variable.rb b/lib/thread_variable.rb index abc1234..def5678 100644 --- a/lib/thread_variable.rb +++ b/lib/thread_variable.rb @@ -3,13 +3,13 @@ module ThreadVariable def thread_variable *names names.each do |name| + namespace = (self.name || self.object_id.to_s).to_sym + define_singleton_method :"#{name}" do - namespace = (self.name || self.object_id.to_s).to_sym (Thread.current[namespace] ||= {})[name] end define_singleton_method :"#{name}=" do |val| - namespace = (self.name || self.object_id.to_s).to_sym (Thread.current[namespace] ||= {})[name] = val end end
Define namespace outside of method to avoid recalculating Since the method is defined as a closure, we can pre-calculate it and it will always use that namespace. This should give a slight speed-up for the getters and setters.
diff --git a/lib/zebra/print_job.rb b/lib/zebra/print_job.rb index abc1234..def5678 100644 --- a/lib/zebra/print_job.rb +++ b/lib/zebra/print_job.rb @@ -29,9 +29,9 @@ def send_to_printer(path) # My ip is 192.168.101.99 if RUBY_PLATFORM =~ /darwin/ - `lpr -P #{@printer} -o raw #{path} -h 192.168.101.99[:631]` + `lpr -h 192.168.101.99 -P #{@printer}` else - `lp -d #{@printer} -o raw #{path} -h 192.168.101.99[:631]` + `lp -h 192.168.101.99 -d #{@printer}` end end end
Remove path declaration from send_to_printer method
diff --git a/Library/Homebrew/unpack_strategy/directory.rb b/Library/Homebrew/unpack_strategy/directory.rb index abc1234..def5678 100644 --- a/Library/Homebrew/unpack_strategy/directory.rb +++ b/Library/Homebrew/unpack_strategy/directory.rb @@ -16,7 +16,9 @@ def extract_to_dir(unpack_dir, basename:, verbose:) path.children.each do |child| - FileUtils.copy_entry child, unpack_dir/child.basename, true, false + system_command! "cp", + args: ["-pR", child.directory? ? "#{child}/." : child, unpack_dir/child.basename], + verbose: verbose end end end
Use `cp` instead of `FileUtils.copy_entry`.
diff --git a/react-native-idle-timer.podspec b/react-native-idle-timer.podspec index abc1234..def5678 100644 --- a/react-native-idle-timer.podspec +++ b/react-native-idle-timer.podspec @@ -9,7 +9,7 @@ s.description = package['description'] s.license = package['license'] s.author = package['author'] - s.homepage = package['homepage'] + s.homepage = package['repository']['url'] s.source = { :git => 'https://github.com/marcshilling/react-native-idle-timer.git', :tag => s.version } s.requires_arc = true
Fix homepage value in podspec for cocoapods 1.0+
diff --git a/main.rb b/main.rb index abc1234..def5678 100644 --- a/main.rb +++ b/main.rb @@ -20,7 +20,7 @@ store.transaction do unless info == store['info'] - msg = "5ngayvang has been updated! Check it out #{NGAYVANG_URL}" + msg = "5ngayvang has been updated! New info: #{info}. Check it out #{NGAYVANG_URL}" puts msg slack_notifier msg store['info'] = info
Add new info to msg
diff --git a/plugins/guests/tinycore/cap/configure_networks.rb b/plugins/guests/tinycore/cap/configure_networks.rb index abc1234..def5678 100644 --- a/plugins/guests/tinycore/cap/configure_networks.rb +++ b/plugins/guests/tinycore/cap/configure_networks.rb @@ -7,6 +7,11 @@ def self.configure_networks(machine, networks) machine.communicate.tap do |comm| networks.each do |n| + if n[:type] == :dhcp + comm.sudo("/sbin/udhcpc -b -i eth#{n[:interface]} -p /var/run/udhcpc.eth#{n[:interface]}.pid") + return + end + ifc = "/sbin/ifconfig eth#{n[:interface]}" broadcast = (IPAddr.new(n[:ip]) | (~ IPAddr.new(n[:netmask]))).to_s comm.sudo("#{ifc} down")
Add support for DHCP on tinycore
diff --git a/cookbooks/rs_utils/recipes/setup_timezone.rb b/cookbooks/rs_utils/recipes/setup_timezone.rb index abc1234..def5678 100644 --- a/cookbooks/rs_utils/recipes/setup_timezone.rb +++ b/cookbooks/rs_utils/recipes/setup_timezone.rb @@ -23,7 +23,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Set the Timezone -unless node.rs_utils.timezone.nil? || node.rs_utils.timezone == '' +if node.rs_utils.timezone link "/etc/localtime" do to "/usr/share/zoneinfo/#{node[:rs_utils][:timezone]}"
Test if logic on timezone.
diff --git a/Casks/omnigraffle5.rb b/Casks/omnigraffle5.rb index abc1234..def5678 100644 --- a/Casks/omnigraffle5.rb +++ b/Casks/omnigraffle5.rb @@ -0,0 +1,10 @@+cask :v1 => 'omnigraffle5' do + version '5.4.4' + sha256 '7bcc64093f46bd4808b1a4cb86cf90c0380a5c5ffffd55ce8f742712818558df' + + url "http://www.omnigroup.com/ftp/pub/software/MacOSX/10.6/OmniGraffle-#{version}.dmg" + homepage 'http://www.omnigroup.com/products/omnigraffle' + license :closed + + app 'OmniGraffle 5.app' +end
Add OmniGraffle 5 Standard cask Fix token name Add OmniGraffle 5 Standard cask Fix token name
diff --git a/ConnectMe/rADMeNow.rb b/ConnectMe/rADMeNow.rb index abc1234..def5678 100644 --- a/ConnectMe/rADMeNow.rb +++ b/ConnectMe/rADMeNow.rb @@ -1,9 +1,10 @@-# @author Marius Küng -# @version 0.1 (2013-11-22) +# @author Marius Küng and Livio Bieri # open smb://fsemu18.edu.ds.fhnw.ch/e_18_data11\$/ -load(File.join(File.dirname(__FILE__),'rCheckWifi.rb')) -load(File.join(File.dirname(__FILE__),'rVPNMeNow.rb')) +require 'require_relative' + +load('./rCheckWifi.rb') +load('./rVPNMeNow.rb') if !File.directory?("/Volumes/e_18_data11$") then if(!getFHNWWifi)
Make use of require 'require_relative' gem
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 @@ -13,4 +13,14 @@ assert_response :bad_request end + + test 'should return search results by search id' do + get search_url('soprano') + + search_id = JSON.parse(response.body)['id'] + + get search_result(search_id) + + assert_equal(3, JSON.parse(response.body)) + end end
Add test for Search Results
diff --git a/Casks/bluestacks.rb b/Casks/bluestacks.rb index abc1234..def5678 100644 --- a/Casks/bluestacks.rb +++ b/Casks/bluestacks.rb @@ -8,4 +8,24 @@ license :closed app 'BlueStacks.app' + + uninstall :launchctl => [ + 'com.BlueStacks.AppPlayer.bstservice_helper', + 'com.BlueStacks.AppPlayer.Service', + 'com.BlueStacks.AppPlayer.UninstallWatcher', + 'com.BlueStacks.AppPlayer.Updater' + ], + :delete => '/Library/PrivilegedHelperTools/com.BlueStacks.AppPlayer.bstservice_helper' + zap :delete => [ + '~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.bluestacks.bluestacks.sfl', + '~/Library/BlueStacks', + '~/Library/Caches/com.bluestacks.BlueStacks', + '~/Library/Caches/KSCrashReports/BlueStacks', + '~/Library/Logs/BlueStacks', + '~/Library/Preferences/com.BlueStacks.AppPlayer.DiagnosticTimestamp.txt', + '~/Library/Preferences/com.BlueStacks.AppPlayer.plist', + '~/Library/Preferences/com.BlueStacks.AppPlayer.SavedFrame.plist', + '~/Library/Preferences/com.bluestacks.BlueStacks.plist' + ], + :rmdir => '~/Library/Caches/KSCrashReports' end
Add uninstall and zap stanzas for BlueStacks
diff --git a/Casks/mini-metro.rb b/Casks/mini-metro.rb index abc1234..def5678 100644 --- a/Casks/mini-metro.rb +++ b/Casks/mini-metro.rb @@ -1,7 +1,7 @@ class MiniMetro < Cask - url 'http://static.dinopoloclub.com/minimetro/builds/alpha12/MiniMetro-alpha12-osx.zip' + url 'http://static.dinopoloclub.com/minimetro/builds/alpha12/MiniMetro-alpha12a-osx.zip' homepage 'http://dinopoloclub.com/minimetro/' - version 'Alpha 12' - sha256 '0c81781fff8984f41276fe2c9c0a1da7bdfd18c8970fbe4b8c4ff2376936e7bd' - link 'MiniMetro-alpha12-osx.app', :target => 'Mini Metro.app' + version 'Alpha 12a' + sha256 'cbbf5e60c39bb4d850e65703e220d41a0410212fc6f87d997abe36dc2d7658f9' + link 'MiniMetro-alpha12a-osx.app', :target => 'Mini Metro.app' end
Update Mini Metro to Alpha 12a
diff --git a/Diff.podspec b/Diff.podspec index abc1234..def5678 100644 --- a/Diff.podspec +++ b/Diff.podspec @@ -17,23 +17,11 @@ "Wojtek Czekalski" => "me@wczekalski.com" } + s.source = { :git => "https://github.com/tonyarnold/Diff.git", :tag => "0.6" } + s.source_files = "Sources/Diff" + s.platforms = { :ios => "8.0", :osx => "10.10", :tvos => "9.0", :watchos => "3.0" } + s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' } s.osx.exclude_files = "Sources/Diff/Diff+UIKit.swift" s.watchos.exclude_files = "Sources/Diff/Diff+UIKit.swift" - - s.source = { :git => "https://github.com/tonyarnold/Diff.git", :tag => "0.6" } - - s.source_files = "Sources/Diff" - - post_install do |installer| - targets = ['Diff'] - - installer.pods_project.targets.each do |target| - if targets.include? target.name - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.0' - end - end - end - end end
Fix Podspec to use new pod_target_xcconfig property
diff --git a/spec/models/spree/payment_method/klarna_credit_spec.rb b/spec/models/spree/payment_method/klarna_credit_spec.rb index abc1234..def5678 100644 --- a/spec/models/spree/payment_method/klarna_credit_spec.rb +++ b/spec/models/spree/payment_method/klarna_credit_spec.rb @@ -1,21 +1,51 @@ # frozen_string_literal: true -require "spec_helper" +require 'spec_helper' describe Spree::PaymentMethod::KlarnaCredit do - describe "capture", :klarna_api do + describe 'capture', :klarna_api do + subject(:capture) { payment_method.capture(amount, klarna_order_id, order_id: "#{order.number}-dummy") } + + let(:payment_method) { create(:klarna_credit_payment_method) } let(:order) { create(:order_with_line_items) } - let(:gateway) { double(:gateway) } + + let(:gateway) { instance_spy('ActiveMerchant::Billing::KlarnaGateway') } + let(:order_serializer) { instance_spy('SolidusKlarnaPayments::OrderSerializer') } + let(:amount) { 100 } - let(:klarna_order_id) { "KLARNA_ORDER_ID" } + let(:klarna_order_id) { 'KLARNA_ORDER_ID' } - # Regression test - it "does not error" do - expect(subject).to receive(:gateway).and_return(gateway) - expect(gateway).to receive(:capture) + before do + allow(payment_method).to receive(:gateway).and_return(gateway) + allow(gateway).to receive(:capture) + + allow(SolidusKlarnaPayments::OrderSerializer) + .to receive(:new) + .and_return(order_serializer) + + allow(order_serializer).to receive(:to_hash).and_return({ shipping_info: 'shipping_info' }) + end + + it 'does not error' do expect { - subject.capture(amount, klarna_order_id, order_id: "#{order.number}-dummy") + capture }.not_to raise_error + end + + it 'calls the gateway capture method' do + capture + + expect(gateway) + .to have_received(:capture) + .with(amount, 'KLARNA_ORDER_ID', { order_id: "#{order.number}-dummy", shipping_info: 'shipping_info' }) + end + + it 'calls the order serializer' do + capture + + expect(SolidusKlarnaPayments::OrderSerializer) + .to have_received(:new) + .with(order, :us) end end end
Add klarna payment method missing specs
diff --git a/spec/unit/data_mapper/mapper/class_methods/map_spec.rb b/spec/unit/data_mapper/mapper/class_methods/map_spec.rb index abc1234..def5678 100644 --- a/spec/unit/data_mapper/mapper/class_methods/map_spec.rb +++ b/spec/unit/data_mapper/mapper/class_methods/map_spec.rb @@ -1,11 +1,15 @@ require 'spec_helper' describe DataMapper::Mapper, '.map' do + subject { object.map(name, options) } + + let(:object) { described_class } let(:name) { :title } let(:options) { { :to => :book_title } } - it "adds a new attribute to attribute set" do - described_class.attributes.should_receive(:add).with(name, options) - described_class.map(name, options) + before do + object.attributes.should_receive(:add).with(name, options) end + + it_should_behave_like 'a command method' end
Kill a mutation in Mapper.map
diff --git a/PBWebViewController.podspec b/PBWebViewController.podspec index abc1234..def5678 100644 --- a/PBWebViewController.podspec +++ b/PBWebViewController.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'PBWebViewController' - s.version = '0.3' + s.version = '0.4' s.summary = 'A light-weight, simple and extendible web browser component for iOS.' s.homepage = 'https://github.com/kmikael/PBWebViewController' s.license = {:type => 'MIT', :file => 'LICENSE.txt'}
Prepare a new version for Cocoapods
diff --git a/barebones.gemspec b/barebones.gemspec index abc1234..def5678 100644 --- a/barebones.gemspec +++ b/barebones.gemspec @@ -1,9 +1,10 @@ require "./lib/barebones/version" +require "date" Gem::Specification.new do |s| s.name = "barebones" s.version = "0.1.1" - s.date = "2015-10-19" + s.date = Date.today.to_s s.licenses = ['MIT'] s.summary = "Rails template generator" s.description = "Personal Rails template generator for Danny Yu"
Change gemspec date to automatically update
diff --git a/db/seeds/demo/demo_data/fake_intervention.rb b/db/seeds/demo/demo_data/fake_intervention.rb index abc1234..def5678 100644 --- a/db/seeds/demo/demo_data/fake_intervention.rb +++ b/db/seeds/demo/demo_data/fake_intervention.rb @@ -8,7 +8,7 @@ (1..28).to_a.sample ) @educator = Educator.first_or_create! - @intervention_type = InterventionType.all.sample + @intervention_type = InterventionType.atp end def next @@ -17,7 +17,8 @@ end_date: @start_date + (152..365).to_a.sample.days, educator_id: @educator.id, intervention_type_id: @intervention_type.id, - student_id: @student.id + student_id: @student.id, + number_of_hours: rand(0..40) } end
Update fake Intervention to look like ATP w/ number of hours
diff --git a/Contacts/spec/models/contact_spec.rb b/Contacts/spec/models/contact_spec.rb index abc1234..def5678 100644 --- a/Contacts/spec/models/contact_spec.rb +++ b/Contacts/spec/models/contact_spec.rb @@ -7,7 +7,8 @@ context "writing to the database" do it "saves without errors" do - # Tests whether fields are required + # Tests whether other attributes not + # declared in 'before' are required expect {@contact.save}.to change{Contact.count}.from(0).to(1) end end
Make comment on model test clearer
diff --git a/db/migrate/20160815160730_create_functions.rb b/db/migrate/20160815160730_create_functions.rb index abc1234..def5678 100644 --- a/db/migrate/20160815160730_create_functions.rb +++ b/db/migrate/20160815160730_create_functions.rb @@ -3,8 +3,8 @@ create_table :functions do |t| t.belongs_to :user, foreign_key: true t.belongs_to :role, foreign_key: true - t.datetime :assumed_at - t.datetime :vacated_at + t.date :assumed_at + t.date :vacated_at t.timestamps end
Change duration time for functions to date
diff --git a/examples/free_guest_subscriber.rb b/examples/free_guest_subscriber.rb index abc1234..def5678 100644 --- a/examples/free_guest_subscriber.rb +++ b/examples/free_guest_subscriber.rb @@ -0,0 +1,36 @@+require 'noam-lemma' + +# This is an example of a Ruby Lemma that publishes message and *also* uses the +# "Guest" model of connection. This Lemma will advertise that it's available on +# the local network and only begin subscribing to messages once a server +# requests a connection from the Lemma. + +publisher = Noam::Lemma.new( + 'example-publisher', + 'ruby-script', + 9000, + ["e3"], + []) + +# Using the `advertise` method asks the Lemma to announce it's presence and +# wait for a message from a server that may want to connect to it. +# +# The "local-test" parameter is the room name. Servers with a room name that's +# the same as the Lemma's advertised room name will connect automatically. +publisher.advertise("local-test") + +loop do + # The `listen` method will return an Event object once one is received by the + # Lemma. Until an event is heard, the `listen` method blocks. + m = subscriber.listen + + # There's one special value that's returned from `listen`: the `:cancelled` + # symbol. If this shows up, it means some one else has called the `stop` + # method on the Lemma. + if :cancelled == m + puts "Done" + break + else + puts "Read: #{m.ident} -> #{m.value.inspect}" + end +end
Add an example of a free guest subscriber.
diff --git a/spec/endpoints/content_upload_spec.rb b/spec/endpoints/content_upload_spec.rb index abc1234..def5678 100644 --- a/spec/endpoints/content_upload_spec.rb +++ b/spec/endpoints/content_upload_spec.rb @@ -0,0 +1,41 @@+describe DropboxApi::Endpoints::ContentUpload do + shared_examples_for "is calculated and appended to headers" do + it "is calculated and appended to headers" do + _, headers = subject.build_request({}, body) + expect(headers['Content-Length']).to eq(content_length) + end + end + + let(:builder) { DropboxApi::ConnectionBuilder.new("bearer") } + let(:content) { "tested content" } + let(:content_length) { content.length.to_s } + subject { described_class.new(builder) } + + context 'Content-Length header' do + context 'for string body' do + let(:body) { content } + + include_examples "is calculated and appended to headers" + end + + context 'for File body' do + let(:body) { Tempfile.new('dropbox_api') } + around(:each) do |example| + body << content + example.run + body.close + end + + include_examples "is calculated and appended to headers" + end + + context 'for nil' do + let(:body) { nil } + + it 'is not in headers' do + _, headers = subject.build_request({}, body) + expect(headers).to_not have_key("Content_length") + end + end + end +end
Add spec for Content-Length header.
diff --git a/NTAnalytics.podspec b/NTAnalytics.podspec index abc1234..def5678 100644 --- a/NTAnalytics.podspec +++ b/NTAnalytics.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "NTAnalytics" - s.version = "0.15" + s.version = "0.50" s.summary = "NTAnalytics - A Provider-based system to integrate Analytics systems such at Flurry or Google Analytics" s.homepage = "https://github.com/NagelTech/NTAnalytics" s.license = { :type => 'MIT', :file => 'license.txt' } s.author = { "Ethan Nagel" => "eanagel@gmail.com" } s.platform = :ios, '6.0' - s.source = { :git => "https://github.com/NagelTech/NTAnalytics.git", :tag => "0.15" } + s.source = { :git => "https://github.com/NagelTech/NTAnalytics.git", :tag => "0.50" } s.requires_arc = true s.subspec "Core" do |sp|
Update posspec version to 0.50
diff --git a/AttributedLib.podspec b/AttributedLib.podspec index abc1234..def5678 100644 --- a/AttributedLib.podspec +++ b/AttributedLib.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'AttributedLib' - s.version = '1.0.0' + s.version = '1.1.0' s.summary = 'A Modern interface for attributed strings.' s.description = <<-DESC
Increment pod version to 1.1.0
diff --git a/spec/support/transactional_command.rb b/spec/support/transactional_command.rb index abc1234..def5678 100644 --- a/spec/support/transactional_command.rb +++ b/spec/support/transactional_command.rb @@ -0,0 +1,37 @@+module TransactionalCommand +end + +RSpec.shared_examples_for TransactionalCommand do + describe "event logging" do + it "creates an event for the command" do + expect { + described_class.call(payload) + }.to change(Event, :count).by(1) + + event = Event.last + expect(event.action).to eq(described_class.name.demodulize) + expect(event.payload).to eq(payload) + end + + it "wraps the command in a transaction" do + allow_any_instance_of(described_class).to receive(:call) do + FactoryGirl.create(:content_item) + raise "Uh oh, command failed half-way through processing" + end + + previous_count = ContentItem.count + + expect { + described_class.call(payload) + }.to raise_error(/half-way through/) + + new_count = ContentItem.count + + expect(new_count).to eq(previous_count), + "The transaction should have been rolled back" + + expect(Event.count).to be_zero, + "The command should not have logged an event" + end + end +end
Add a shared context for testing transactionality
diff --git a/UKPostcodeValidator.podspec b/UKPostcodeValidator.podspec index abc1234..def5678 100644 --- a/UKPostcodeValidator.podspec +++ b/UKPostcodeValidator.podspec @@ -13,7 +13,5 @@ s.requires_arc = true s.source_files = 'Classes' - s.resources = 'Resources' - s.public_header_files = 'Classes/**/*.h' end
Fix podspec (remove resources reference)
diff --git a/LINK/usr/bin/evm_failover_monitor.rb b/LINK/usr/bin/evm_failover_monitor.rb index abc1234..def5678 100644 --- a/LINK/usr/bin/evm_failover_monitor.rb +++ b/LINK/usr/bin/evm_failover_monitor.rb @@ -1,6 +1,6 @@ #!/bin/env ruby -require_relative '/var/www/miq/vmdb/gems/pending/bundler_setup' +require 'manageiq-gems-pending' require 'postgres_ha_admin/failover_monitor' monitor = PostgresHaAdmin::FailoverMonitor.new
Use manageiq-gems-pending gem instead of require_relative The gems-pending code was moved into a gem, so we cannot use a path to require the bundler environment anymore. Requiring the gem directly gives us the same effect.
diff --git a/spec/table_spec.rb b/spec/table_spec.rb index abc1234..def5678 100644 --- a/spec/table_spec.rb +++ b/spec/table_spec.rb @@ -4,34 +4,34 @@ before { @table = Table.new(schema_file) } - it 'find the right count of tables in the schema' do + it 'finds the right count of tables in the schema' do expect(@table.names.size).to eq 5 end - it 'find the right count of tables in a fake schema' do + it 'finds the right count of tables in a fake schema' do schema = "create_table \"foos\"\nt.integer \"foo\"\nend" expect(Table.new(schema).names.size).to eq 1 end - it "find the right table's names in the schema" do + it "finds the right table's names in the schema" do names = ['assignments', 'products', 'users', 'users_3', 'policies'] @table.names.each do |name| expect(names.include?(name)).to be true end end - it "find the right table's names in a fake schema" do + it "finds the right table's names in a fake schema" do schema = "create_table \"foos\"\nt.integer \"foo\"\nend" expect(Table.new(schema).names.first).to eq 'foos' end - it 'find the content of a table in a fake schema' do + it 'finds the content of a table in a fake schema' do schema = "create_table \"foos\"\nt.integer \"foo\"\nend" content = Table.new(schema).content_for('foos') expect(content).to eq "t.integer \"foo\"\n" end - it 'find the content of a table in the schema' do + it 'finds the content of a table in the schema' do content = @table.content_for('assignments') expected = " t.integer \"foo\"\n t.string \"bar\"\n" expect(content).to eq expected
Fix some typos in spec
diff --git a/spec/texas_spec.rb b/spec/texas_spec.rb index abc1234..def5678 100644 --- a/spec/texas_spec.rb +++ b/spec/texas_spec.rb @@ -23,6 +23,12 @@ run_scenario "texasrc" end + it "run scenario for .texasrc with --merge-config and fail" do + lambda { + run_scenario "texasrc", :merge_config => "other_mode" + }.should raise_error + end + it "run scenario for lib/ helpers" do run_scenario "lib-helpers" end
Add failing acceptance test to test --merge-config parameter
diff --git a/app/controllers/api/councillors_controller.rb b/app/controllers/api/councillors_controller.rb index abc1234..def5678 100644 --- a/app/controllers/api/councillors_controller.rb +++ b/app/controllers/api/councillors_controller.rb @@ -1,5 +1,6 @@ class Api::CouncillorsController < ApiController def index + email = params[:email] ward_id = params[:ward_id] councillor_name = params[:councillor_name] @councillors = Councillor.all @@ -7,6 +8,7 @@ @councillors = @councillors.where("lower(first_name) LIKE ? OR lower(last_name) LIKE ? OR lower(email) LIKE ?", @@query, @@query, @@query) unless @@query.empty? + @councillors = @councillors.where("email = ?", email) if email.present? @councillors = @councillors.where("ward_id = ?", ward_id) if ward_id.present? @councillors = search_by_date_range(params[:date], @councillors, "start_date_in_office")
Add Email Search For API Counctillor
diff --git a/spec/controllers/device_tokens_controller_spec.rb b/spec/controllers/device_tokens_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/device_tokens_controller_spec.rb +++ b/spec/controllers/device_tokens_controller_spec.rb @@ -5,10 +5,13 @@ let(:user1) { FactoryGirl.create(:user) } it "creates a new device token" do - post :create, :token => "ABC123", :user_id => user1.email, :provider => :apns FwtPushNotificationServer::DeviceToken.count.should == 1 - + FwtPushNotificationServer::DeviceToken.first.user_id.should eql user1.email + end + + it "updates user attributes" do + pending("update the test app to include first name/last name for user") end end
Add pending spec for updating user attributes
diff --git a/lib/active_crew/backends/inline_backend.rb b/lib/active_crew/backends/inline_backend.rb index abc1234..def5678 100644 --- a/lib/active_crew/backends/inline_backend.rb +++ b/lib/active_crew/backends/inline_backend.rb @@ -4,6 +4,12 @@ class Queue def size 0 + end + + def method_missing(method, *args, &block) + return unless respond_to? method + + super method, *args, &block end end
Extend inline backend with mock
diff --git a/lib/config.rb b/lib/config.rb index abc1234..def5678 100644 --- a/lib/config.rb +++ b/lib/config.rb @@ -5,6 +5,7 @@ class Config def file_set Valise::Set.define do + ro "." ro "config/" ro "~/.timepulse" ro "~/"
Add current directory to valise
diff --git a/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb b/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb index abc1234..def5678 100644 --- a/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb +++ b/buildserver/cookbooks/fdroidbuild-general/recipes/default.rb @@ -1,5 +1,5 @@ -%w{ant ant-contrib autoconf autopoint bison libtool libssl1.0.0 libssl-dev maven javacc python git-core mercurial subversion bzr git-svn make perlmagick pkg-config zip ruby rubygems librmagick-ruby}.each do |pkg| +%w{ant ant-contrib autoconf autopoint bison cmake libtool libssl1.0.0 libssl-dev maven javacc python git-core mercurial subversion bzr git-svn make perlmagick pkg-config zip ruby rubygems librmagick-ruby}.each do |pkg| package pkg do action :install end
Add cmake to build server
diff --git a/lib/grit/ext/diff.rb b/lib/grit/ext/diff.rb index abc1234..def5678 100644 --- a/lib/grit/ext/diff.rb +++ b/lib/grit/ext/diff.rb @@ -1,5 +1,7 @@ module Grit class Diff + attr_reader :repo + def hunks header_lines.each_with_index .map { |header, index|
Make repo attr_reader on Grit::Diff
diff --git a/lib/rack/pygments.rb b/lib/rack/pygments.rb index abc1234..def5678 100644 --- a/lib/rack/pygments.rb +++ b/lib/rack/pygments.rb @@ -13,11 +13,11 @@ raise Exception, "Pygmentize is missing" end end - + def call(env) if env["PATH_INFO"] !~ /.*\.css$/ status, headers, response = @app.call(env) - content = response.instance_variable_get("@body").to_s + content = response.each.map.join document = Nokogiri::HTML(content) nodes = document.css(@tag) nodes.each do |node|
Update to work with current Rack There isn't a @body instance variable in the part of the Rack response representing the body. Using []#each to yield Strings as per the Rack spec.
diff --git a/lib/request_error.rb b/lib/request_error.rb index abc1234..def5678 100644 --- a/lib/request_error.rb +++ b/lib/request_error.rb @@ -1,4 +1,26 @@+# assert_request Rails Plugin +# +# (c) Copyright 2007 by West Arete Computing, Inc. + module AssertRequest - # This is the exception that we raise when we find an invalid request. + + # This is the exception that we raise when we find an invalid request. By + # default, the full details of this exception will be displayed to the + # browser in development mode. In production mode it will be intercepted, + # and a 404 Not Found response will be displayed to the user. + # + # This means that if you are using the exception_notification plugin to get + # emails about exceptions while running in production mode, then you + # will not get an email when your application encounters bad + # requests. This is intentional, since bad requests in production are not + # necessarily an indicator of a bug in your program, and your mailbox can + # quickly fill up if your visitors are using out-of-date bookmarks, or if + # someone links to your site incorrectly. + # + # If you would rather have the assertions in this plugin result + # in status 500 errors, then edit init.rb in the plugin root and comment + # out the call to alias_method_chain. + # class RequestError < RuntimeError ; end + end
Add full documentation for this file. git-svn-id: 36d0598828eae866924735253b485a592756576c@8096 da5c320b-a5ec-0310-b7f9-e4d854caa1e2