diff --git a/lib/devise.rb b/lib/devise.rb index 40558900..9df03a4c 100755 --- a/lib/devise.rb +++ b/lib/devise.rb @@ -42,10 +42,10 @@ module Devise # Constants which holds devise configuration for extensions. Those should # not be modified by the "end user" (this is why they are constants). ALL = [] - CONTROLLERS = ActiveSupport::OrderedHash.new - ROUTES = ActiveSupport::OrderedHash.new - STRATEGIES = ActiveSupport::OrderedHash.new - URL_HELPERS = ActiveSupport::OrderedHash.new + CONTROLLERS = {} + ROUTES = {} + STRATEGIES = {} + URL_HELPERS = {} # Strategies that do not require user input. NO_INPUT = [] @@ -246,11 +246,11 @@ module Devise # Store scopes mappings. mattr_reader :mappings - @@mappings = ActiveSupport::OrderedHash.new + @@mappings = {} # OmniAuth configurations. mattr_reader :omniauth_configs - @@omniauth_configs = ActiveSupport::OrderedHash.new + @@omniauth_configs = {} # Define a set of modules that are called when a mapping is added. mattr_reader :helpers diff --git a/test/integration/http_authenticatable_test.rb b/test/integration/http_authenticatable_test.rb index a57901cc..56ea541c 100644 --- a/test/integration/http_authenticatable_test.rb +++ b/test/integration/http_authenticatable_test.rb @@ -65,7 +65,7 @@ class HttpAuthenticationTest < Devise::IntegrationTest end test 'it uses appropriate authentication_keys when configured with hash' do - swap Devise, authentication_keys: ActiveSupport::OrderedHash[:username, false, :email, false] do + swap Devise, authentication_keys: { username: false, email: false } do sign_in_as_new_user_with_http("usertest") assert_response :success assert_match 'user@test.com', response.body @@ -74,7 +74,7 @@ class HttpAuthenticationTest < Devise::IntegrationTest end test 'it uses the appropriate key when configured explicitly' do - swap Devise, authentication_keys: ActiveSupport::OrderedHash[:email, false, :username, false], http_authentication_key: :username do + swap Devise, authentication_keys: { email: false, username: false }, http_authentication_key: :username do sign_in_as_new_user_with_http("usertest") assert_response :success assert_match 'user@test.com', response.body