diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-03-16 00:54:39 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-03-16 09:01:48 -0300 |
commit | c045eebd5d35259e65771de159966b7c20690d34 (patch) | |
tree | 7bac04c81569b7d6b462892e395bb7c105245750 /activesupport/lib/active_support/railtie.rb | |
parent | 2afe12f05ca870437c08dfce8d9e2afb02f8b347 (diff) | |
download | rails-c045eebd5d35259e65771de159966b7c20690d34.tar.gz rails-c045eebd5d35259e65771de159966b7c20690d34.tar.bz2 rails-c045eebd5d35259e65771de159966b7c20690d34.zip |
Remove deprecation from AS::Deprecation behavior, some minor cleanups
* Refactor log subscriber, use select! to avoid a new object
* Remove deprecation messages related to AS::Deprecation behavior
This was added about 2 years ago for Rails 3:
https://github.com/rails/rails/commit/d4c7d3fd94e5a885a6366eaeb3b908bb58ffd4db
* Remove some not used requires
* Refactor delegate to avoid string conversions and if statements inside each block
Diffstat (limited to 'activesupport/lib/active_support/railtie.rb')
-rw-r--r-- | activesupport/lib/active_support/railtie.rb | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index f696716cc8..d1c62c5087 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -8,30 +8,6 @@ module ActiveSupport initializer "active_support.deprecation_behavior" do |app| if deprecation = app.config.active_support.deprecation ActiveSupport::Deprecation.behavior = deprecation - else - defaults = {"development" => :log, - "production" => :notify, - "test" => :stderr} - - env = Rails.env - - if defaults.key?(env) - msg = "You did not specify how you would like Rails to report " \ - "deprecation notices for your #{env} environment, please " \ - "set config.active_support.deprecation to :#{defaults[env]} " \ - "at config/environments/#{env}.rb" - - warn msg - ActiveSupport::Deprecation.behavior = defaults[env] - else - msg = "You did not specify how you would like Rails to report " \ - "deprecation notices for your #{env} environment, please " \ - "set config.active_support.deprecation to :log, :notify or " \ - ":stderr at config/environments/#{env}.rb" - - warn msg - ActiveSupport::Deprecation.behavior = :stderr - end end end @@ -42,8 +18,7 @@ module ActiveSupport zone_default = Time.find_zone!(app.config.time_zone) unless zone_default - raise \ - 'Value assigned to config.time_zone not recognized.' + + raise 'Value assigned to config.time_zone not recognized. ' \ 'Run "rake -D time" for a list of tasks for finding appropriate time zone names.' end |