aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/abstract_store.rb40
-rw-r--r--actionpack/test/dispatch/session/test_session_test.rb12
2 files changed, 6 insertions, 46 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
index dddedc832f..977185d754 100644
--- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
@@ -22,13 +22,6 @@ module ActionDispatch
@loaded = false
end
- def session_id
- ActiveSupport::Deprecation.warn(
- "ActionDispatch::Session::AbstractStore::SessionHash#session_id " +
- "has been deprecated. Please use request.session_options[:id] instead.", caller)
- @env[ENV_SESSION_OPTIONS_KEY][:id]
- end
-
def [](key)
load! unless @loaded
super(key.to_s)
@@ -45,35 +38,14 @@ module ActionDispatch
h
end
- def update(hash = nil)
- if hash.nil?
- ActiveSupport::Deprecation.warn('use replace instead', caller)
- replace({})
- else
- load! unless @loaded
- super(hash.stringify_keys)
- end
- end
-
- def delete(key = nil)
- if key.nil?
- ActiveSupport::Deprecation.warn('use clear instead', caller)
- clear
- else
- load! unless @loaded
- super(key.to_s)
- end
- end
-
- def data
- ActiveSupport::Deprecation.warn(
- "ActionDispatch::Session::AbstractStore::SessionHash#data " +
- "has been deprecated. Please use #to_hash instead.", caller)
- to_hash
+ def update(hash)
+ load! unless @loaded
+ super(hash.stringify_keys)
end
- def close
- ActiveSupport::Deprecation.warn('sessions should no longer be closed', caller)
+ def delete(key)
+ load! unless @loaded
+ super(key.to_s)
end
def inspect
diff --git a/actionpack/test/dispatch/session/test_session_test.rb b/actionpack/test/dispatch/session/test_session_test.rb
index c8dc4ab461..31ce97a25b 100644
--- a/actionpack/test/dispatch/session/test_session_test.rb
+++ b/actionpack/test/dispatch/session/test_session_test.rb
@@ -2,18 +2,6 @@ require 'abstract_unit'
require 'stringio'
class ActionController::TestSessionTest < ActiveSupport::TestCase
- def test_calling_delete_without_parameters_raises_deprecation_warning_and_calls_to_clear_test_session
- assert_deprecated(/use clear instead/){ ActionController::TestSession.new.delete }
- end
-
- def test_calling_update_without_parameters_raises_deprecation_warning_and_calls_to_clear_test_session
- assert_deprecated(/use replace instead/){ ActionController::TestSession.new.update }
- end
-
- def test_calling_close_raises_deprecation_warning
- assert_deprecated(/sessions should no longer be closed/){ ActionController::TestSession.new.close }
- end
-
def test_ctor_allows_setting
session = ActionController::TestSession.new({:one => 'one', :two => 'two'})
assert_equal('one', session[:one])