1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #29203 from koic/bump_rubocop_and_fix_rubocop_offences

Bump RuboCop to 0.49.0 and fix offences
This commit is contained in:
Rafael França 2017-05-24 14:12:54 -04:00 committed by GitHub
commit 0fa9084a18
5 changed files with 9 additions and 9 deletions

View file

@ -233,6 +233,7 @@ GEM
mini_portile2 (~> 2.1.0)
nokogiri (1.7.1-x86-mingw32)
mini_portile2 (~> 2.1.0)
parallel (1.11.2)
parser (2.4.0.0)
ast (~> 2.2)
pg (0.19.0)
@ -262,7 +263,8 @@ GEM
nokogiri (~> 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rainbow (2.2.1)
rainbow (2.2.2)
rake
rake (12.0.0)
rb-fsevent (0.9.8)
rdoc (5.1.0)
@ -281,7 +283,8 @@ GEM
redis (~> 3.3)
resque (~> 1.26)
rufus-scheduler (~> 3.2)
rubocop (0.48.1)
rubocop (0.49.0)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)

View file

@ -110,7 +110,6 @@ module ActiveRecord
end
end
module ClassMethods
# Defines your model's +to_param+ method to generate "pretty" URLs
# using +method_name+, which can be any attribute or method that

View file

@ -71,9 +71,9 @@ module ActiveRecord
@tasks[pattern] = task
end
register_task(/mysql/, 'ActiveRecord::Tasks::MySQLDatabaseTasks')
register_task(/postgresql/, 'ActiveRecord::Tasks::PostgreSQLDatabaseTasks')
register_task(/sqlite/, 'ActiveRecord::Tasks::SQLiteDatabaseTasks')
register_task(/mysql/, "ActiveRecord::Tasks::MySQLDatabaseTasks")
register_task(/postgresql/, "ActiveRecord::Tasks::PostgreSQLDatabaseTasks")
register_task(/sqlite/, "ActiveRecord::Tasks::SQLiteDatabaseTasks")
def db_dir
@db_dir ||= Rails.application.config.paths["db"].first

View file

@ -128,7 +128,7 @@ class AssociationCallbacksTest < ActiveRecord::TestCase
assert ar.developers_log.empty?
alice = Developer.new(name: "alice")
ar.developers_with_callbacks << alice
assert_equal"after_adding#{alice.id}", ar.developers_log.last
assert_equal "after_adding#{alice.id}", ar.developers_log.last
bob = ar.developers_with_callbacks.create(name: "bob")
assert_equal "after_adding#{bob.id}", ar.developers_log.last

View file

@ -536,7 +536,6 @@ module ActiveSupport
end
end
# Prefixes a key with the namespace. Namespace and key will be delimited
# with a colon.
def normalize_key(key, options)
@ -587,7 +586,6 @@ module ActiveSupport
ActiveSupport::Notifications.instrument("cache_#{operation}.active_support", payload) { yield(payload) }
end
def log
return unless logger && logger.debug? && !silence?
logger.debug(yield)