aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r--actionpack/lib/action_dispatch/middleware/callbacks.rb3
-rw-r--r--actionpack/lib/action_dispatch/middleware/cookies.rb4
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/abstract_store.rb10
3 files changed, 5 insertions, 12 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/callbacks.rb b/actionpack/lib/action_dispatch/middleware/callbacks.rb
index 1bb2ad7f67..8c0f4052ec 100644
--- a/actionpack/lib/action_dispatch/middleware/callbacks.rb
+++ b/actionpack/lib/action_dispatch/middleware/callbacks.rb
@@ -19,8 +19,7 @@ module ActionDispatch
set_callback(:call, :after, *args, &block)
end
- def initialize(app, unused = nil)
- ActiveSupport::Deprecation.warn "Passing a second argument to ActionDispatch::Callbacks.new is deprecated." unless unused.nil?
+ def initialize(app)
@app = app
end
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb
index 0057f64dd3..47c4bad489 100644
--- a/actionpack/lib/action_dispatch/middleware/cookies.rb
+++ b/actionpack/lib/action_dispatch/middleware/cookies.rb
@@ -59,7 +59,7 @@ module ActionDispatch
# The option symbols for setting cookies are:
#
# * <tt>:value</tt> - The cookie's value or list of values (as an array).
- # * <tt>:path</tt> - The path for which this cookie applies. Defaults to the root
+ # * <tt>:path</tt> - The path for which this cookie applies. Defaults to the root
# of the application.
# * <tt>:domain</tt> - The domain for which this cookie applies so you can
# restrict to the domain level. If you use a schema like www.example.com
@@ -305,7 +305,7 @@ module ActionDispatch
if secret.length < SECRET_MIN_LENGTH
raise ArgumentError, "Secret should be something secure, " +
- "like \"#{ActiveSupport::SecureRandom.hex(16)}\". The value you " +
+ "like \"#{SecureRandom.hex(16)}\". The value you " +
"provided, \"#{secret}\", is shorter than the minimum length " +
"of #{SECRET_MIN_LENGTH} characters"
end
diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
index 1a811ce1b1..a70d814749 100644
--- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
@@ -29,7 +29,7 @@ module ActionDispatch
end
def generate_sid
- sid = ActiveSupport::SecureRandom.hex(16)
+ sid = SecureRandom.hex(16)
sid.encode!('UTF-8') if sid.respond_to?(:encode!)
sid
end
@@ -73,13 +73,7 @@ module ActionDispatch
include StaleSessionCheck
def destroy_session(env, sid, options)
- ActiveSupport::Deprecation.warn "Implementing #destroy in session stores is deprecated. " <<
- "Please implement destroy_session(env, session_id, options) instead."
- destroy(env)
- end
-
- def destroy(env)
- raise '#destroy needs to be implemented.'
+ raise '#destroy_session needs to be implemented.'
end
end
end