diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/checkout_ru/address.rb b/lib/checkout_ru/address.rb index abc1234..def5678 100644 --- a/lib/checkout_ru/address.rb +++ b/lib/checkout_ru/address.rb @@ -4,6 +4,7 @@ class Address < Entity property :postindex property :street_fias_id, :from => :streetFiasId + property :street property...
Add an undocumented street property to Address
diff --git a/lib/convergence/command.rb b/lib/convergence/command.rb index abc1234..def5678 100644 --- a/lib/convergence/command.rb +++ b/lib/convergence/command.rb @@ -19,7 +19,9 @@ elsif @opts[:apply] Convergence::Command::Apply end - unless execute_klass.nil? + if execute_klass.nil? + ...
Change it to display help when executed without option
diff --git a/lib/eventbrite/attendee.rb b/lib/eventbrite/attendee.rb index abc1234..def5678 100644 --- a/lib/eventbrite/attendee.rb +++ b/lib/eventbrite/attendee.rb @@ -23,5 +23,9 @@ :email, :first_name, :gender, :home_phone, :job_title, :last_name, :name, :prefix, :suffix, :website, :work_phone, ...
Add first and last name to Attendee.inspect
diff --git a/Casks/navicat-for-mysql.rb b/Casks/navicat-for-mysql.rb index abc1234..def5678 100644 --- a/Casks/navicat-for-mysql.rb +++ b/Casks/navicat-for-mysql.rb @@ -1,6 +1,6 @@ cask :v1 => 'navicat-for-mysql' do - version '11.1.9' # navicat-premium.rb and navicat-for-* should be upgraded together - sha256 'dcb8...
Upgrade 'Navicat for MySQL.app' to v11.1.10
diff --git a/lib/mongo_session_store.rb b/lib/mongo_session_store.rb index abc1234..def5678 100644 --- a/lib/mongo_session_store.rb +++ b/lib/mongo_session_store.rb @@ -6,18 +6,17 @@ def self.collection_name=(name) @collection_name = name - if defined?(MongoStore::Session) - MongoStore::Session.reset_c...
Fix collection_name= with multiples stores loaded Wouldn't set the collection name on all stores, just the first one checked.
diff --git a/lib/moonshot/ssh_config.rb b/lib/moonshot/ssh_config.rb index abc1234..def5678 100644 --- a/lib/moonshot/ssh_config.rb +++ b/lib/moonshot/ssh_config.rb @@ -2,5 +2,10 @@ class SSHConfig attr_accessor :ssh_identity_file attr_accessor :ssh_user + + def initialize + @ssh_identity_file = ENV...
Fix the usege of MOONSHOT_SSH_USER and MOONSHOT_SSH_KEY_FILE environment variables
diff --git a/test/support/mongrel_helper.rb b/test/support/mongrel_helper.rb index abc1234..def5678 100644 --- a/test/support/mongrel_helper.rb +++ b/test/support/mongrel_helper.rb @@ -6,7 +6,7 @@ def setup check_mongrel `cd example && m2sh load -config mongrel2.conf` - self.pid = Process.spawn("bundle e...
Revert "Display output from foreman processes to debug travis issues" This reverts commit 91c78c4b5db2f08d8b94c534702c5dccddc3a313. Conflicts: test/support/mongrel_helper.rb
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/search_controller_spec.rb +++ b/spec/controllers/search_controller_spec.rb @@ -6,9 +6,6 @@ end describe 'query is a person' do - @lola = FactoryGirl.create(...
Remove a dangling "lola" object creation It's never used and possibly was left unnoticed by some refactoring. closes #7230
diff --git a/test/test_subclass_tracking.rb b/test/test_subclass_tracking.rb index abc1234..def5678 100644 --- a/test/test_subclass_tracking.rb +++ b/test/test_subclass_tracking.rb @@ -1,7 +1,10 @@ require_relative 'helper' class TestSubclassTracking < Sidetiq::TestCase - class Foo + class Base + end + + class F...
Add extra test for SubclassTracking.
diff --git a/lib/buildr/core/jrebel.rb b/lib/buildr/core/jrebel.rb index abc1234..def5678 100644 --- a/lib/buildr/core/jrebel.rb +++ b/lib/buildr/core/jrebel.rb @@ -25,6 +25,7 @@ def rebel_jar if jrebel_home + # jrebel_home may point to jrebel.jar directly File.directory?(jrebel_home) ? Fil...
Add comment to help prevent future regressions git-svn-id: d8f3215415546ce936cf3b822120ca56e5ebeaa0@1038832 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ext/platform_dependencies.rb b/ext/platform_dependencies.rb index abc1234..def5678 100644 --- a/ext/platform_dependencies.rb +++ b/ext/platform_dependencies.rb @@ -3,14 +3,15 @@ installer = Gem::DependencyInstaller.new begin - if RUBY_VERSION >= '2.0' - puts "Installing byebug for Ruby #{RUBY_VERSIO...
Fix ruby version matcher to check for leading 'ruby-'
diff --git a/lib/git-cleanup/helper.rb b/lib/git-cleanup/helper.rb index abc1234..def5678 100644 --- a/lib/git-cleanup/helper.rb +++ b/lib/git-cleanup/helper.rb @@ -1,6 +1,6 @@ class GitCleanup module Helper - def self.boolean(question) + def self.boolean(question, &block) puts "#{question} (y/n)" ...
Fix bug if you provided invalid y/n response
diff --git a/lib/jumble/rest/client.rb b/lib/jumble/rest/client.rb index abc1234..def5678 100644 --- a/lib/jumble/rest/client.rb +++ b/lib/jumble/rest/client.rb @@ -22,7 +22,7 @@ def method_missing(name, *args, &block) client.send(name, *args, &block) - rescue ::Twitter::Error::TooManyRequests, ::...
Remove excess exception from rescue
diff --git a/lib/mabbre/interpreter.rb b/lib/mabbre/interpreter.rb index abc1234..def5678 100644 --- a/lib/mabbre/interpreter.rb +++ b/lib/mabbre/interpreter.rb @@ -6,7 +6,7 @@ def method_missing(name, *args) matched = nil - if self.class.tracked_methods(MAbbre).one? {|m| matched = m if m =~ /\A#{name...
Modify code to be compatible with Ruby 1.8.7.
diff --git a/lib/models/pending_job.rb b/lib/models/pending_job.rb index abc1234..def5678 100644 --- a/lib/models/pending_job.rb +++ b/lib/models/pending_job.rb @@ -8,7 +8,7 @@ db.transaction do ids = select_map(:query_id) - filter(query_id: ids).delete + filter(query_id: ids).delete if ids.any? ...
Reduce database load when checking for pending jobs
diff --git a/lib/morph/limit_output.rb b/lib/morph/limit_output.rb index abc1234..def5678 100644 --- a/lib/morph/limit_output.rb +++ b/lib/morph/limit_output.rb @@ -26,6 +26,9 @@ STDOUT.sync = true STDERR.sync = true +stdout_buffer = '' +stderr_buffer = '' + Open3.popen3(command) do |_stdin, stdout, stderr, wait_th...
Write out one line at a time
diff --git a/lib/processors/rmagick.rb b/lib/processors/rmagick.rb index abc1234..def5678 100644 --- a/lib/processors/rmagick.rb +++ b/lib/processors/rmagick.rb @@ -5,7 +5,7 @@ tmp_file = Tempfile.new(["",".tif"]) cat = @instance || Magick::Image.read(@source.to_s).first cat.crop!(@x, @y, @w, @h) unless [...
Modify syntax to try to skip compression on convert call
diff --git a/src/supermarket/spec/support/shared_examples/exportable_shared.rb b/src/supermarket/spec/support/shared_examples/exportable_shared.rb index abc1234..def5678 100644 --- a/src/supermarket/spec/support/shared_examples/exportable_shared.rb +++ b/src/supermarket/spec/support/shared_examples/exportable_shared.rb...
Use match_array in test to compare arrays Introduced in 4.2, ActiveRecord's #attribute_names does not return attribute names in any particular order. That was a byproduct of the implementation in <= 4.1. This particular test now only confirms that all attributes are _present_ in the header row of the CSV export. Other...
diff --git a/samples/cloud_front.rb b/samples/cloud_front.rb index abc1234..def5678 100644 --- a/samples/cloud_front.rb +++ b/samples/cloud_front.rb @@ -13,5 +13,5 @@ puts "First ten distribution items:" -p cloud_front.get("/distribution", "MaxItems" => 10) +p cloud_front.get("/distribution", :params => {"MaxItems"...
Update samples to use :params
diff --git a/qa/qa/page/label/index.rb b/qa/qa/page/label/index.rb index abc1234..def5678 100644 --- a/qa/qa/page/label/index.rb +++ b/qa/qa/page/label/index.rb @@ -11,10 +11,11 @@ end def go_to_new_label - wait(reload: false) do - within_element(:label_svg) do - has_...
Add comments explaining the wait
diff --git a/spec/acceptance/acceptance_test_helpers.rb b/spec/acceptance/acceptance_test_helpers.rb index abc1234..def5678 100644 --- a/spec/acceptance/acceptance_test_helpers.rb +++ b/spec/acceptance/acceptance_test_helpers.rb @@ -35,6 +35,7 @@ visit '/' attach_file('File', File.expand_path("spec/fixtures/#{...
Make all images uploaded via this helper public for now
diff --git a/lib/troo/configuration.rb b/lib/troo/configuration.rb index abc1234..def5678 100644 --- a/lib/troo/configuration.rb +++ b/lib/troo/configuration.rb @@ -43,7 +43,7 @@ end def api_url - 'https://api.trello.com/1' + config.fetch('api_url', 'https://api.trello.com/1') end def a...
Add sensible defaults to Configuration class.
diff --git a/vendor/plugins/themes/lib/theme_server.rb b/vendor/plugins/themes/lib/theme_server.rb index abc1234..def5678 100644 --- a/vendor/plugins/themes/lib/theme_server.rb +++ b/vendor/plugins/themes/lib/theme_server.rb @@ -1,7 +1,7 @@ # Allow the metal piece to run in isolation require(File.dirname(__FILE__) + "...
Send a blank response with 304
diff --git a/lib/migration_helper.rb b/lib/migration_helper.rb index abc1234..def5678 100644 --- a/lib/migration_helper.rb +++ b/lib/migration_helper.rb @@ -6,14 +6,14 @@ end module InstanceMethods - def userstamps(include_deleted_by = false) - column(Ddb::Userstamp.compatibility_mode ? :...
Allow extra parameters to be passed on to the column definition. This follows ActiveRecord's `timestamps` migration table definition helper method.
diff --git a/lib/mobile-fu/helper.rb b/lib/mobile-fu/helper.rb index abc1234..def5678 100644 --- a/lib/mobile-fu/helper.rb +++ b/lib/mobile-fu/helper.rb @@ -6,15 +6,33 @@ def stylesheet_link_tag_with_mobilization(*sources) mobilized_sources = Array.new + + # Figure out where stylesheets live, wh...
Fix mobilized stylesheets to work with rails 3.1+ asset pipeline: Look for stylesheets in Rails.root/app/assets/stylesheets instead of public/stylesheets when the asset pipeline is enabled. Support ERB and SASS stylesheets (.css.erb, .css.scss.erb) files in addition to simple .css files.
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 @@ -22,7 +22,7 @@ env = ENV['RAILS_ENV'] || 'development' case env when 'develop...
Make app talk to imminence properly in development
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 @@ -2,13 +2,4 @@ # Prevent CSRF attacks by raising an exception. # For APIs, you may want ...
Revert "Show profiler info to mlandauer in production""" This reverts commit 511d285baa00ea0664e3bc1be5ae0a9254ec560b.
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 @@ -1,6 +1,7 @@ class ApplicationController < ActionController::Base include GDS::SSO::Contr...
Add `before_action :set_paper_trail_whodunnit` to ApplicationController - As of PaperTrail 5, PaperTrail doesn't set this automatically, so we have to set it ourselves. See https://github.com/paper-trail-gem/paper_trail#setting-whodunnit-with-a-controller-callback.
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 @@ -4,6 +4,6 @@ protect_from_forgery with: :exception # force the user to redirect to th...
Allow unauthenticated user access to site
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 @@ -1,6 +1,8 @@ class ApplicationController < Sinatra::Base set :views, File.expand_path('.....
Enable sessions. Used to implement user authentication
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 @@ -9,14 +9,13 @@ protect_from_forgery with: :exception def after_sign_in_path_for(resou...
Remove condicoes para redirect depois do login e corrige autenticacao do manager
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 @@ -1,7 +1,7 @@ require "application_responder" class ApplicationController < ActionControll...
Fix double flash responders on sign on
diff --git a/lib/rolify/configure.rb b/lib/rolify/configure.rb index abc1234..def5678 100644 --- a/lib/rolify/configure.rb +++ b/lib/rolify/configure.rb @@ -45,7 +45,7 @@ role_cnames = [ "Role" ] if role_cnames.empty? role_cnames.each do |role_cname| role_class = role_cname.constantize - if...
Make sure we are connected before table_exists? Because otherwise it will bail because it cannot connect to a DB when doing things like precompiling assets. Test with: ``` env -i GEM_PATH=$GEM_PATH \ PATH=$PATH \ DATABASE_URL=postgres://user:pass@127.0.0.1/dbname \ /bin/sh -c 'bundle exe...
diff --git a/app/policies/renalware/bag_type_policy.rb b/app/policies/renalware/bag_type_policy.rb index abc1234..def5678 100644 --- a/app/policies/renalware/bag_type_policy.rb +++ b/app/policies/renalware/bag_type_policy.rb @@ -0,0 +1,16 @@+module Renalware + + class BagTypePolicy < ApplicationPolicy + def new? ; ...
Set up pundit policy for bag types.
diff --git a/lib/search_flip/json.rb b/lib/search_flip/json.rb index abc1234..def5678 100644 --- a/lib/search_flip/json.rb +++ b/lib/search_flip/json.rb @@ -1,8 +1,17 @@ module SearchFlip - module JSON + class JSON + @default_options = { + mode: :custom, + use_to_json: true + } + + def self.defau...
Set JSON options via customizable default options
diff --git a/lib/encrypt.rb b/lib/encrypt.rb index abc1234..def5678 100644 --- a/lib/encrypt.rb +++ b/lib/encrypt.rb @@ -12,6 +12,7 @@ end def decrypt key + return nil unless self.bytesize > 32 cipher = OpenSSL::Cipher::AES256.new(:CTR) cipher.decrypt salt = self.byteslice(0..15)
Return nil if bytesize is less than 32.
diff --git a/lib/hue/cli.rb b/lib/hue/cli.rb index abc1234..def5678 100644 --- a/lib/hue/cli.rb +++ b/lib/hue/cli.rb @@ -25,17 +25,25 @@ end end - desc 'light ID STATE', 'Access a light' + desc 'light ID STATE [COLOR]', 'Access a light' + long_desc <<-LONGDESC + Examples: \n + hue light 1 ...
Update on/off state and update brightness, saturation, alert
diff --git a/lib/iprange.rb b/lib/iprange.rb index abc1234..def5678 100644 --- a/lib/iprange.rb +++ b/lib/iprange.rb @@ -10,18 +10,21 @@ end def remove(range) - @redis.irem(@redis_key, range) - @redis.del(metadata_key(range)) + @redis.pipelined do + @redis.irem(@redis_key, range) + ...
Use pipeline in Redis operations
diff --git a/lib/twilio-ruby/util.rb b/lib/twilio-ruby/util.rb index abc1234..def5678 100644 --- a/lib/twilio-ruby/util.rb +++ b/lib/twilio-ruby/util.rb @@ -1,7 +1,15 @@ module Twilio module Util def url_encode(hash) - hash.to_a.map {|p| p.map {|e| CGI.escape e.to_s}.join '='}.join '&' + hash.to_a.map...
Enforce proper date formatting for Time params
diff --git a/pg_examiner.gemspec b/pg_examiner.gemspec index abc1234..def5678 100644 --- a/pg_examiner.gemspec +++ b/pg_examiner.gemspec @@ -18,8 +18,7 @@ spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib'] - spec.add_dependency 'pg' - + spec.add_development_dependency...
Make the pg gem a development dependency so things can work on JRuby.
diff --git a/lib/graphql/query/null_context.rb b/lib/graphql/query/null_context.rb index abc1234..def5678 100644 --- a/lib/graphql/query/null_context.rb +++ b/lib/graphql/query/null_context.rb @@ -3,12 +3,18 @@ class Query # This object can be `ctx` in places where there is no query class NullContext + ...
Fix NullContext for better warden behaviors
diff --git a/lib/metasploit/cache/ephemeral.rb b/lib/metasploit/cache/ephemeral.rb index abc1234..def5678 100644 --- a/lib/metasploit/cache/ephemeral.rb +++ b/lib/metasploit/cache/ephemeral.rb @@ -7,7 +7,8 @@ # Runs transaction on `destination_class` using temporary from the connection pool that is checked in to the ...
Fix parameter name in yard docs MSP-12441
diff --git a/singleplatform.gemspec b/singleplatform.gemspec index abc1234..def5678 100644 --- a/singleplatform.gemspec +++ b/singleplatform.gemspec @@ -1,7 +1,7 @@ # coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'singleplatform/version' +req...
Add runtime and development dependencies
diff --git a/lib/roo_on_rails/railties/http.rb b/lib/roo_on_rails/railties/http.rb index abc1234..def5678 100644 --- a/lib/roo_on_rails/railties/http.rb +++ b/lib/roo_on_rails/railties/http.rb @@ -31,7 +31,7 @@ # Don't use SslEnforcer in test environment as it breaks Capybara unless Rails.env.test? ...
Change the middleware we inserted before
diff --git a/lib/tasks/spree_multi_tenant.rake b/lib/tasks/spree_multi_tenant.rake index abc1234..def5678 100644 --- a/lib/tasks/spree_multi_tenant.rake +++ b/lib/tasks/spree_multi_tenant.rake @@ -11,7 +11,10 @@ exit end - tenant = Spree::Tenant.create!({:domain => domain.dup, :code => code.dup}) + t...
Use block for multi-assignment protection
diff --git a/lib/tasks/worldwide_taxonomy.rake b/lib/tasks/worldwide_taxonomy.rake index abc1234..def5678 100644 --- a/lib/tasks/worldwide_taxonomy.rake +++ b/lib/tasks/worldwide_taxonomy.rake @@ -0,0 +1,22 @@+namespace :worldwide_taxonomy do + task redirect_world_location_translations_to_en: :environment do + base...
Add rake tasks for redirecting WorldLocations Redirect all the WorldLocation translations. They are no longer supported so are redirected to the non-translated taxon page. This will also cause them to appear unpublished to the publishing API which will remove them from the links of other content.
diff --git a/lib/vagrant/util/file_checksum.rb b/lib/vagrant/util/file_checksum.rb index abc1234..def5678 100644 --- a/lib/vagrant/util/file_checksum.rb +++ b/lib/vagrant/util/file_checksum.rb @@ -26,7 +26,7 @@ def checksum digest = @digest_klass.new - File.open(@path, "r") do |f| + File.open(@path, "rb"...
Read box file in binary mode for checksum
diff --git a/app/controllers/event_streams_controller.rb b/app/controllers/event_streams_controller.rb index abc1234..def5678 100644 --- a/app/controllers/event_streams_controller.rb +++ b/app/controllers/event_streams_controller.rb @@ -5,6 +5,6 @@ end def ids - Journal.joins(:papers => :user).where('users.id...
Update to ruby 2.0 syntax
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index abc1234..def5678 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -2,4 +2,4 @@ # Specify a serializer for the signed and encrypted cookie jars. # Valid opt...
Use JSON instead of Hybrid to serialize cookies
diff --git a/lib/pakyow/console/editors/relation_editor.rb b/lib/pakyow/console/editors/relation_editor.rb index abc1234..def5678 100644 --- a/lib/pakyow/console/editors/relation_editor.rb +++ b/lib/pakyow/console/editors/relation_editor.rb @@ -3,11 +3,13 @@ editor = view.scope(:editor)[0] editor.scoped_as = :datu...
Refactor relation editor view logic Turns out that accepting the view as an argument to `with` allows the block to be evaluated in the current context such that global helpers like `router` are available.
diff --git a/add_values.rb b/add_values.rb index abc1234..def5678 100644 --- a/add_values.rb +++ b/add_values.rb @@ -0,0 +1,11 @@+require 'csv' +Pathname.glob('validation_results/**/*.csv').each do |file| + contents = CSV.read(file, headers: true, return_headers: true) + headers = contents.select{|r| r.header_row?}.f...
Add script that added value columns
diff --git a/app/views/notifications/index.json.jbuilder b/app/views/notifications/index.json.jbuilder index abc1234..def5678 100644 --- a/app/views/notifications/index.json.jbuilder +++ b/app/views/notifications/index.json.jbuilder @@ -30,6 +30,7 @@ json.title notification.subject_title json.url notificat...
Add notification state to the JSON output
diff --git a/spec/frontable_spec.rb b/spec/frontable_spec.rb index abc1234..def5678 100644 --- a/spec/frontable_spec.rb +++ b/spec/frontable_spec.rb @@ -4,15 +4,32 @@ include Dimples::Frontable describe '#read_with_front_matter' do - let(:source_path) do - File.join(__dir__, 'sources', 'pages', 'about', ...
Add a frontable test for files without metadata
diff --git a/spec/lib/hours_spec.rb b/spec/lib/hours_spec.rb index abc1234..def5678 100644 --- a/spec/lib/hours_spec.rb +++ b/spec/lib/hours_spec.rb @@ -9,7 +9,7 @@ it "raises an error when the account or url is empty" do allow(Hours).to receive(:helpful_account).and_return "" allow(Hours).to receive(...
Fix using bare raise_error matcher This is due to receiving a deprecation warning: ```sh WARNING: Using the `raise_error` matcher without providing a specific error or message risks false positives, since `raise_error` will match -- snip -- ```
diff --git a/lib/cw/config_file.rb b/lib/cw/config_file.rb index abc1234..def5678 100644 --- a/lib/cw/config_file.rb +++ b/lib/cw/config_file.rb @@ -1,7 +1,7 @@ class ConfigFile CONFIG = ".cw_config" - CONFIGS = ['wpm'] + CONFIGS = ['wpm', 'book_name'] HERE = File.dirname(__FILE__) + '...
Add config file book_name option
diff --git a/lib/dotter/package.rb b/lib/dotter/package.rb index abc1234..def5678 100644 --- a/lib/dotter/package.rb +++ b/lib/dotter/package.rb @@ -8,30 +8,39 @@ @name = name @config = Configuration.new @our_config = @config.package_config(@name) + if self.tracked? + @repo = GitRepo.new(name) + end ...
Clean up parens and add 2 tracking-related boolean methods.
diff --git a/lib/skeptic/critic.rb b/lib/skeptic/critic.rb index abc1234..def5678 100644 --- a/lib/skeptic/critic.rb +++ b/lib/skeptic/critic.rb @@ -16,53 +16,21 @@ @tokens = Ripper.lex(code) @sexp = Ripper.sexp(code) - look_for_semicolons - analyze_nesting - analyze_method_count - ...
Reduce a bunch of repetition in Critic
diff --git a/omniauth-beatport.gemspec b/omniauth-beatport.gemspec index abc1234..def5678 100644 --- a/omniauth-beatport.gemspec +++ b/omniauth-beatport.gemspec @@ -21,6 +21,5 @@ s.add_development_dependency 'rack-test' s.add_development_dependency 'simplecov' s.add_development_dependency 'webmock' - - + s...
Add gem-release gem to dev dependencies
diff --git a/robot_name/robot_name.rb b/robot_name/robot_name.rb index abc1234..def5678 100644 --- a/robot_name/robot_name.rb +++ b/robot_name/robot_name.rb @@ -22,10 +22,10 @@ end def generate_name - name = '' - 2.times { name << ('A'..'Z').to_a.sample } - 3.times { name << rand(10).to_s } - name + ...
Change temp variable from name to temp_name I realized that 'name' is a method of this class, so it wasn't a good temporary variable name in the generate_name method. Eventually, I need to find a way to not use the temp variable at all.
diff --git a/lib/accela/api/v4/base.rb b/lib/accela/api/v4/base.rb index abc1234..def5678 100644 --- a/lib/accela/api/v4/base.rb +++ b/lib/accela/api/v4/base.rb @@ -44,8 +44,6 @@ if is_success?(response) response.parsed_response else - puts response.request.inspect - puts r...
Remove 'puts' logging when a request fails
diff --git a/lib/ap/core_ext/string.rb b/lib/ap/core_ext/string.rb index abc1234..def5678 100644 --- a/lib/ap/core_ext/string.rb +++ b/lib/ap/core_ext/string.rb @@ -11,7 +11,7 @@ define_method :"#{color}ish" do "\033[0;#{30+i}m#{self}\033[0m" end else define_method color do self end - alias_metho...
Remove rdoc comment, as the parser should no longer complain on that line.
diff --git a/spec/controllers/welcome_controller_spec.rb b/spec/controllers/welcome_controller_spec.rb index abc1234..def5678 100644 --- a/spec/controllers/welcome_controller_spec.rb +++ b/spec/controllers/welcome_controller_spec.rb @@ -1,6 +1,7 @@ require 'spec_helper' -describe WelcomeController do + +describe "Wel...
Fix for specs to run correctly. Test for WelcomeController should fail not crash.
diff --git a/spec/ruby/core/enumerator/lazy/lazy_spec.rb b/spec/ruby/core/enumerator/lazy/lazy_spec.rb index abc1234..def5678 100644 --- a/spec/ruby/core/enumerator/lazy/lazy_spec.rb +++ b/spec/ruby/core/enumerator/lazy/lazy_spec.rb @@ -0,0 +1,11 @@+# -*- encoding: us-ascii -*- + +require File.expand_path('../../../../...
Write a spec for Enumerator::Lazy
diff --git a/lib/chef_metal_vagrant.rb b/lib/chef_metal_vagrant.rb index abc1234..def5678 100644 --- a/lib/chef_metal_vagrant.rb +++ b/lib/chef_metal_vagrant.rb @@ -19,13 +19,15 @@ end class Chef - class Recipe - def with_vagrant_cluster(cluster_path, &block) - with_provisioner(ChefMetalVagrant::VagrantProv...
Move recipe DSL into Chef::DSL::Recipe
diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index abc1234..def5678 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -23,12 +23,12 @@ HTML version do - self.release = '6.3.1' + self.release = '6.4.0' self.base_url = 'https://nodejs.org/api/' ...
Update Node.js documentation (6.4.0, 4.5.0)
diff --git a/lib/rollbar/active_job.rb b/lib/rollbar/active_job.rb index abc1234..def5678 100644 --- a/lib/rollbar/active_job.rb +++ b/lib/rollbar/active_job.rb @@ -3,7 +3,7 @@ module ActiveJob def self.included(base) base.send :rescue_from, Exception do |exception| - Rollbar.error(exception, job: ...
Use old hash syntax for old Rubies
diff --git a/spec/models/image_spec.rb b/spec/models/image_spec.rb index abc1234..def5678 100644 --- a/spec/models/image_spec.rb +++ b/spec/models/image_spec.rb @@ -8,6 +8,8 @@ it 'will have a key' do image = Image.create! valid_attributes - image.key should exist + + Image.all.should have(1).item + I...
Check if image saved and a key exists
diff --git a/spec/rails_reseed_spec.rb b/spec/rails_reseed_spec.rb index abc1234..def5678 100644 --- a/spec/rails_reseed_spec.rb +++ b/spec/rails_reseed_spec.rb @@ -13,4 +13,8 @@ ['db:drop', 'db:create', 'db:migrate', 'db:seed'] ) end + + it 'outputs a message to indicate successful completion' do + ...
Add spec to test message output
diff --git a/lib/stripe/file_upload.rb b/lib/stripe/file_upload.rb index abc1234..def5678 100644 --- a/lib/stripe/file_upload.rb +++ b/lib/stripe/file_upload.rb @@ -1,5 +1,3 @@-require "tempfile" - module Stripe class FileUpload < APIResource extend Stripe::APIOperations::Create @@ -20,9 +18,9 @@ def sel...
Use duck typing to detect File-like objects
diff --git a/lib/supermarket/import.rb b/lib/supermarket/import.rb index abc1234..def5678 100644 --- a/lib/supermarket/import.rb +++ b/lib/supermarket/import.rb @@ -37,7 +37,12 @@ debug do message_header = "#{e.class}: #{e.message}\n #{raven_options.inspect}" - message_body = ([message_header] ...
Debug messages show scrubbed backtraces
diff --git a/lib/sync_issues/github.rb b/lib/sync_issues/github.rb index abc1234..def5678 100644 --- a/lib/sync_issues/github.rb +++ b/lib/sync_issues/github.rb @@ -34,7 +34,9 @@ def token path = File.expand_path('~/.config/sync_issues.yaml') raise TokenError, "#{path} does not exist" unless File.exis...
Verify that the yaml config contains a token attribute.
diff --git a/autoprefixer-rails.gemspec b/autoprefixer-rails.gemspec index abc1234..def5678 100644 --- a/autoprefixer-rails.gemspec +++ b/autoprefixer-rails.gemspec @@ -10,7 +10,7 @@ s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {spec}/*`.split("\n") - s.extra_rdoc_files ...
Fix gemspec for Markdown in Changelog
diff --git a/sg_node_mapper.gemspec b/sg_node_mapper.gemspec index abc1234..def5678 100644 --- a/sg_node_mapper.gemspec +++ b/sg_node_mapper.gemspec @@ -17,4 +17,6 @@ gem.add_dependency 'execjs', '>= 1.4' gem.add_dependency 'activesupport', '>= 3.0' + + gem.add_development_dependency 'rake', '>= 0.9' end
Add rake as a development dependency
diff --git a/app/serializers/api/admin/for_order_cycle/enterprise_serializer.rb b/app/serializers/api/admin/for_order_cycle/enterprise_serializer.rb index abc1234..def5678 100644 --- a/app/serializers/api/admin/for_order_cycle/enterprise_serializer.rb +++ b/app/serializers/api/admin/for_order_cycle/enterprise_serialize...
Refactor products_scope to make it more simple
diff --git a/gitra.gemspec b/gitra.gemspec index abc1234..def5678 100644 --- a/gitra.gemspec +++ b/gitra.gemspec @@ -5,7 +5,7 @@ gem.name = 'gitra' gem.version = "#{Gitra::VERSION}.dev" - gem.summary = "Git Route Analyzer" + gem.summary = "Git Repository Analyzer" gem.description = "Analyze branc...
Update project name in gemspec. Since I started using "repository", I will use that everywhere.
diff --git a/spec/acceptance/joining_and_leaving_spec.rb b/spec/acceptance/joining_and_leaving_spec.rb index abc1234..def5678 100644 --- a/spec/acceptance/joining_and_leaving_spec.rb +++ b/spec/acceptance/joining_and_leaving_spec.rb @@ -0,0 +1,21 @@+require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper'...
Add acceptance tests for joining and leaving groups, projects, and companies.
diff --git a/spec/defines/recovery_message_spec.rb b/spec/defines/recovery_message_spec.rb index abc1234..def5678 100644 --- a/spec/defines/recovery_message_spec.rb +++ b/spec/defines/recovery_message_spec.rb @@ -11,4 +11,15 @@ :value => title )} end + + context 'with ensure => absent' do + let(:titl...
Add spec for removing the message
diff --git a/spec/pivotal_tracker/iteration_spec.rb b/spec/pivotal_tracker/iteration_spec.rb index abc1234..def5678 100644 --- a/spec/pivotal_tracker/iteration_spec.rb +++ b/spec/pivotal_tracker/iteration_spec.rb @@ -5,15 +5,22 @@ @pivotal = PivotalTracker(:token => 'foo') @project = PivotalTracker::Project.ne...
Add stories feature to iteration
diff --git a/spec/support/generator_spec_support.rb b/spec/support/generator_spec_support.rb index abc1234..def5678 100644 --- a/spec/support/generator_spec_support.rb +++ b/spec/support/generator_spec_support.rb @@ -1,7 +1,7 @@ module GeneratorSpecSupport def assert_expectation_file(path, expectation_filepath = n...
Use examples instead of spec/generators/expectations
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,6 @@+require 'simplecov' +SimpleCov.start + ENV["RAILS_ENV"] ||= "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'
Add simple cov on test startup
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) # load Rails first @@ ...
Use AD::SystemTestCase on Rails 5.2+
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,7 +1,5 @@-if ENV['TRAVIS'] - require 'coveralls' - Coveralls.wear! -end +require 'coveralls' +Coveralls.wear_merged!('rails') ENV["RAILS_ENV"] ||= "test" require File.expa...
Fix unit test coveralls to run outside travis
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,3 @@-$:.unshift File.dirname(__FILE__) + '/../lib' -require 'rubygems' require 'simplecov' SimpleCov.start require 'twurl'
Remove unnecessary and require 'rubygems'
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,6 @@ require "minitest/autorun" require "timecop" +require "pathname" root = Pathname(__FILE__).dirname.expand_path Dir[root.join("support", "**", "*.rb")].each { |f| ...
Add missing require for pathname in test helper
diff --git a/test/test_helper.rb b/test/test_helper.rb index abc1234..def5678 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -33,10 +33,6 @@ File.join(root, path) end - def template_root - File.expand_path('../templates', __FILE__) - end - def touch(path) pathed = fs(p...
Remove unused test helper method.
diff --git a/spec/simplecov_uncovered_formatter.rb b/spec/simplecov_uncovered_formatter.rb index abc1234..def5678 100644 --- a/spec/simplecov_uncovered_formatter.rb +++ b/spec/simplecov_uncovered_formatter.rb @@ -7,11 +7,13 @@ result.groups.each_value do |files| files.each do |file| next if file.cov...
Add line numbers to SimplecovUncoveredFormatter This will make it easier to see exactly which code lacks coverage.
diff --git a/spec/models/transaction_spec.rb b/spec/models/transaction_spec.rb index abc1234..def5678 100644 --- a/spec/models/transaction_spec.rb +++ b/spec/models/transaction_spec.rb @@ -0,0 +1,11 @@+require 'rails_helper' + +describe Transaction do + context "validations" do + it { should validate_inclusion_of(:...
Add basic test suite for Transactions. At the moment, this test suite only covers associations and validations, for a 64% test coverage. More test will be forthcoming.
diff --git a/spec/swt_shoes/progress_spec.rb b/spec/swt_shoes/progress_spec.rb index abc1234..def5678 100644 --- a/spec/swt_shoes/progress_spec.rb +++ b/spec/swt_shoes/progress_spec.rb @@ -4,7 +4,7 @@ let(:text) { "TEXT" } let(:dsl) { double('dsl').as_null_object } let(:parent) { double('parent') } - let(:real...
Fix tests by adding disposed? => false to real stub in progress bar test
diff --git a/spec/watirspec/lib/watirspec.rb b/spec/watirspec/lib/watirspec.rb index abc1234..def5678 100644 --- a/spec/watirspec/lib/watirspec.rb +++ b/spec/watirspec/lib/watirspec.rb @@ -1,6 +1,6 @@ module WatirSpec class << self - attr_accessor :browser_args, :persistent_browser, :unguarded + attr_accessor ...
Add ability to set impl name manually using WatirSpec.implementation=
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 @@ -1,5 +1,6 @@ class ApplicationController < ActionController::Base protect_from_forgery + ...
Add a 404 not found error message so the logs are more clean
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 @@ -24,9 +24,10 @@ token = Integer(subclass.token) digits = Integer(shelfmark.match(...
Fix shelfmark floating number order issue
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 @@ -12,10 +12,15 @@ private def authenticate - token = request.headers['authorization...
Check if authorization header is missing
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 @@ -11,7 +11,7 @@ end def set_university - @university = Organization.root + @univ...
Fix index not to break if there are no root organizations
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 @@ -1,3 +1,17 @@ class ApplicationController < ActionController::Base protect_from_forgery +...
Allow authentication using HTTP basic
diff --git a/app/controllers/restaurants_controller.rb b/app/controllers/restaurants_controller.rb index abc1234..def5678 100644 --- a/app/controllers/restaurants_controller.rb +++ b/app/controllers/restaurants_controller.rb @@ -10,5 +10,11 @@ def create end + def update + end + + def destroy + end + end
Create skeleton for restaurants controller
diff --git a/httpi.gemspec b/httpi.gemspec index abc1234..def5678 100644 --- a/httpi.gemspec +++ b/httpi.gemspec @@ -8,7 +8,7 @@ s.version = HTTPI::VERSION s.authors = ['Daniel Harrington', 'Martin Tepper'] s.email = 'me@rubiii.com' - s.homepage = "http://github.com/savonrb/#{s.name}" + s.hom...
Use HTTPS for "homepage" in gemspec [ci skip] Also, use a literal string without interpolations, for legibility.
diff --git a/spec/unit/mongoid/extensions/symbol/inflections_spec.rb b/spec/unit/mongoid/extensions/symbol/inflections_spec.rb index abc1234..def5678 100644 --- a/spec/unit/mongoid/extensions/symbol/inflections_spec.rb +++ b/spec/unit/mongoid/extensions/symbol/inflections_spec.rb @@ -50,6 +50,15 @@ ret.operator.s...
Add spec case for $not in symbol inflections.
diff --git a/app/controllers/spree/api/braintree_client_token_controller.rb b/app/controllers/spree/api/braintree_client_token_controller.rb index abc1234..def5678 100644 --- a/app/controllers/spree/api/braintree_client_token_controller.rb +++ b/app/controllers/spree/api/braintree_client_token_controller.rb @@ -1,7 +1,...
Throw exception if Gateway is not found
diff --git a/spec/features/pm_spec.rb b/spec/features/pm_spec.rb index abc1234..def5678 100644 --- a/spec/features/pm_spec.rb +++ b/spec/features/pm_spec.rb @@ -0,0 +1,33 @@+require 'rails_helper' + +describe 'the private messaging system', type: feature do + + before(:each) do + FactoryGirl.create(:ip_cache, ip_ad...
Initialize PM topics rspec test
diff --git a/activerecord-postgresql-extensions.gemspec b/activerecord-postgresql-extensions.gemspec index abc1234..def5678 100644 --- a/activerecord-postgresql-extensions.gemspec +++ b/activerecord-postgresql-extensions.gemspec @@ -11,6 +11,7 @@ s.description = "A whole bunch of extensions the ActiveRecord PostgreSQ...
Add license details to gemspec.