diff options
author | Richard Schneeman <richard.schneeman+no-recruiters@gmail.com> | 2018-07-25 16:00:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 16:00:33 -0500 |
commit | 91fd679710118482f718ea710710561f1cfb0b70 (patch) | |
tree | 9169aa6ea2315b16f77e530dd2c6a4eda1816769 /railties/lib/rails | |
parent | ab8847c92092a57df6433f4fc72682074359531f (diff) | |
parent | d108288c2f684233298f97f18ac00de0b016deaa (diff) | |
download | rails-91fd679710118482f718ea710710561f1cfb0b70.tar.gz rails-91fd679710118482f718ea710710561f1cfb0b70.tar.bz2 rails-91fd679710118482f718ea710710561f1cfb0b70.zip |
Merge pull request #32381 from q-centrix/update-codeclimate-configs
Turn on performance based cops
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application.rb | 8 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/configuration.rb | 8 | ||||
-rw-r--r-- | railties/lib/rails/generators.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 2 |
5 files changed, 6 insertions, 18 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 76a8ccb8f1..31d0d65a30 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -373,9 +373,7 @@ module Rails @config ||= Application::Configuration.new(self.class.find_root(self.class.called_from)) end - def config=(configuration) #:nodoc: - @config = configuration - end + attr_writer :config # Returns secrets added to config/secrets.yml. # @@ -413,9 +411,7 @@ module Rails end end - def secrets=(secrets) #:nodoc: - @secrets = secrets - end + attr_writer :secrets # The secret_key_base is used as the input secret to the application's key generator, which in turn # is used to create all MessageVerifiers/MessageEncryptors, including the ones that sign and encrypt cookies. diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index bba573499d..9c54cc1f37 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -146,9 +146,7 @@ module Rails @debug_exception_response_format || :default end - def debug_exception_response_format=(value) - @debug_exception_response_format = value - end + attr_writer :debug_exception_response_format def paths @paths ||= begin diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index d3a54d9364..e8741a50ba 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -79,13 +79,7 @@ module Rails end protected - def operations - @operations - end - - def delete_operations - @delete_operations - end + attr_reader :operations, :delete_operations end class Generators #:nodoc: diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 2a41403557..ed672ae48e 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -126,7 +126,7 @@ module Rails ) if ARGV.first == "mailer" - options[:rails].merge!(template_engine: :erb) + options[:rails][:template_engine] = :erb end end diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index d85bbfb03e..ae395708cb 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -298,7 +298,7 @@ module Rails sudo = options[:sudo] && !Gem.win_platform? ? "sudo " : "" config = { verbose: false } - config.merge!(capture: options[:capture]) if options[:capture] + config[:capture] = options[:capture] if options[:capture] in_root { run("#{sudo}#{extify(executor)} #{command} RAILS_ENV=#{env}", config) } end |