aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-05-12 16:19:38 +0100
committerLouise Crow <louise.crow@gmail.com>2015-06-25 15:17:30 +0100
commit8d052d925a69a857f52bc41512eb853a767714f5 (patch)
tree0cdf2495b5270aeb8dace3216464c5ee56441e35
parent89700f017d193fc4c50f712132ad05a5294d3181 (diff)
Add deprecation notice for ruby 1.8.7add-deprecation-notice
Not in an initializer to avoid any risk of popping up in mail handling contexts.
-rw-r--r--app/controllers/application_controller.rb9
-rw-r--r--config/environments/development.rb2
2 files changed, 10 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index a76e6630a..9172cd920 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -35,6 +35,15 @@ class ApplicationController < ActionController::Base
before_filter :set_vary_header
before_filter :validate_session_timestamp
after_filter :persist_session_timestamp
+ before_filter :deprecation_notice
+
+ def deprecation_notice
+ if RUBY_VERSION.to_f >= 1.9
+ ActiveSupport::Deprecation.warn "[DEPRECATION] You are using Ruby 1.8. This will not be supported " \
+ "as of Alaveteli release 0.23. Please upgrade your ruby version."
+ end
+ end
+
def set_vary_header
response.headers['Vary'] = 'Cookie'
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 39bd98da1..9a85bf84b 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -32,7 +32,7 @@ Alaveteli::Application.configure do
# MemoryProfiler.start :string_debug => true, :delay => 10
# Print deprecation notices to the Rails logger
- config.active_support.deprecation = :log
+ config.active_support.deprecation = :stderr
# Do not compress assets
config.assets.compress = false