devise 2.2.8 → 3.0.0.rc
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of devise might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/.travis.yml +2 -17
- data/CHANGELOG.rdoc +4 -20
- data/Gemfile +3 -4
- data/Gemfile.lock +68 -64
- data/README.md +50 -30
- data/app/controllers/devise/confirmations_controller.rb +1 -2
- data/app/controllers/devise/passwords_controller.rb +1 -1
- data/app/controllers/devise/registrations_controller.rb +13 -6
- data/app/controllers/devise/sessions_controller.rb +5 -1
- data/app/controllers/devise/unlocks_controller.rb +1 -1
- data/app/controllers/devise_controller.rb +4 -21
- data/devise.gemspec +1 -1
- data/gemfiles/{Gemfile.rails-3.1.x → Gemfile.rails-3.2.x} +3 -7
- data/gemfiles/{Gemfile.rails-3.1.x.lock → Gemfile.rails-3.2.x.lock} +47 -58
- data/lib/devise.rb +8 -10
- data/lib/devise/controllers/helpers.rb +11 -0
- data/lib/devise/controllers/rememberable.rb +0 -1
- data/lib/devise/models/authenticatable.rb +0 -1
- data/lib/devise/models/confirmable.rb +5 -0
- data/lib/devise/parameter_sanitizer.rb +59 -0
- data/lib/devise/rails/warden_compat.rb +2 -9
- data/lib/devise/strategies/database_authenticatable.rb +3 -6
- data/lib/devise/version.rb +1 -1
- data/lib/generators/active_record/devise_generator.rb +1 -4
- data/lib/generators/templates/devise.rb +0 -6
- data/test/controllers/helpers_test.rb +1 -1
- data/test/controllers/internal_helpers_test.rb +13 -3
- data/test/controllers/passwords_controller_test.rb +1 -1
- data/test/generators/active_record_generator_test.rb +1 -3
- data/test/integration/authenticatable_test.rb +3 -17
- data/test/integration/http_authenticatable_test.rb +1 -1
- data/test/integration/recoverable_test.rb +11 -1
- data/test/integration/registerable_test.rb +8 -6
- data/test/integration/rememberable_test.rb +13 -15
- data/test/models/database_authenticatable_test.rb +0 -13
- data/test/models/validatable_test.rb +12 -2
- data/test/omniauth/url_helpers_test.rb +4 -1
- data/test/orm/active_record.rb +1 -0
- data/test/parameter_sanitizer_test.rb +51 -0
- data/test/rails_app/Rakefile +0 -4
- data/test/rails_app/app/mongoid/shim.rb +2 -3
- data/test/rails_app/bin/bundle +3 -0
- data/test/rails_app/bin/rails +4 -0
- data/test/rails_app/bin/rake +4 -0
- data/test/rails_app/config/application.rb +1 -2
- data/test/rails_app/config/boot.rb +3 -3
- data/test/rails_app/config/environment.rb +2 -2
- data/test/rails_app/config/environments/development.rb +23 -7
- data/test/rails_app/config/environments/production.rb +68 -17
- data/test/rails_app/config/environments/test.rb +18 -15
- data/test/rails_app/config/initializers/secret_token.rb +8 -2
- data/test/rails_app/config/initializers/session_store.rb +1 -0
- data/test/rails_app/config/routes.rb +1 -1
- data/test/rails_app/lib/shared_user.rb +0 -1
- data/test/routes_test.rb +22 -20
- data/test/test_helper.rb +7 -0
- data/test/test_models.rb +0 -1
- metadata +31 -27
- data/lib/devise/hooks/csrf_cleaner.rb +0 -5
- data/test/rails_app/script/rails +0 -10
@@ -2,7 +2,6 @@ require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
3
3
|
require "action_controller/railtie"
|
4
4
|
require "action_mailer/railtie"
|
5
|
-
require "active_resource/railtie"
|
6
5
|
require "rails/test_unit/railtie"
|
7
6
|
|
8
7
|
Bundler.require :default, DEVISE_ORM
|
@@ -17,7 +16,7 @@ require "devise"
|
|
17
16
|
module RailsApp
|
18
17
|
class Application < Rails::Application
|
19
18
|
# Add additional load paths for your own custom dirs
|
20
|
-
config.autoload_paths.reject!{ |p| p =~ /\/app\/(\w+)$/ && !%w(controllers helpers views).include?($1) }
|
19
|
+
config.autoload_paths.reject!{ |p| p =~ /\/app\/(\w+)$/ && !%w(controllers helpers mailers views).include?($1) }
|
21
20
|
config.autoload_paths += [ "#{config.root}/app/#{DEVISE_ORM}" ]
|
22
21
|
|
23
22
|
# Configure generators values. Many other options are available, be sure to check the documentation.
|
@@ -2,7 +2,7 @@ unless defined?(DEVISE_ORM)
|
|
2
2
|
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
3
3
|
end
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
# Set up gems listed in the Gemfile.
|
6
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
7
7
|
|
8
|
-
|
8
|
+
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
@@ -1,18 +1,34 @@
|
|
1
1
|
RailsApp::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
5
|
-
# every request.
|
6
|
-
# since you don't have to restart the
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
|
-
#
|
10
|
-
config.
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
11
|
|
12
|
-
# Show full error reports and disable caching
|
12
|
+
# Show full error reports and disable caching.
|
13
13
|
config.consider_all_requests_local = true
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
|
-
# Don't care if the mailer can't send
|
16
|
+
# Don't care if the mailer can't send.
|
17
17
|
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers.
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Log the query plan for queries taking more than this (works
|
26
|
+
# with SQLite, MySQL, and PostgreSQL).
|
27
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
28
|
+
|
29
|
+
# Raise an error on page load if there are pending migrations
|
30
|
+
config.active_record.migration_error = :page_load
|
31
|
+
|
32
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
33
|
+
config.assets.debug = true
|
18
34
|
end
|
@@ -1,33 +1,84 @@
|
|
1
1
|
RailsApp::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
|
-
#
|
5
|
-
# Code is not reloaded between requests
|
4
|
+
# Code is not reloaded between requests.
|
6
5
|
config.cache_classes = true
|
7
6
|
|
8
|
-
#
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both thread web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
9
14
|
config.consider_all_requests_local = false
|
10
15
|
config.action_controller.perform_caching = true
|
11
16
|
|
12
|
-
#
|
13
|
-
#
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
14
21
|
|
15
|
-
#
|
16
|
-
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_assets = false
|
17
24
|
|
18
|
-
#
|
19
|
-
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
20
28
|
|
21
|
-
#
|
22
|
-
|
23
|
-
|
29
|
+
# Whether to fallback to assets pipeline if a precompiled asset is missed.
|
30
|
+
config.assets.compile = false
|
31
|
+
|
32
|
+
# Generate digests for assets URLs.
|
33
|
+
config.assets.digest = true
|
34
|
+
|
35
|
+
# Version of your assets, change this if you want to expire all your assets.
|
36
|
+
config.assets.version = '1.0'
|
37
|
+
|
38
|
+
# Specifies the header that your server uses for sending files.
|
39
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
40
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
41
|
+
|
42
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
|
+
# config.force_ssl = true
|
44
|
+
|
45
|
+
# Set to :debug to see everything in the log.
|
46
|
+
config.log_level = :info
|
24
47
|
|
25
|
-
#
|
48
|
+
# Prepend all log lines with the following tags.
|
49
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
50
|
+
|
51
|
+
# Use a different logger for distributed setups.
|
52
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
53
|
+
|
54
|
+
# Use a different cache store in production.
|
55
|
+
# config.cache_store = :mem_cache_store
|
56
|
+
|
57
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
26
58
|
# config.action_controller.asset_host = "http://assets.example.com"
|
27
59
|
|
28
|
-
#
|
60
|
+
# Precompile additional assets.
|
61
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
62
|
+
# config.assets.precompile += %w( search.js )
|
63
|
+
|
64
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
65
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
29
66
|
# config.action_mailer.raise_delivery_errors = false
|
30
67
|
|
31
|
-
# Enable
|
32
|
-
#
|
68
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
69
|
+
# the I18n.default_locale when a translation can not be found).
|
70
|
+
config.i18n.fallbacks = true
|
71
|
+
|
72
|
+
# Send deprecation notices to registered listeners.
|
73
|
+
config.active_support.deprecation = :notify
|
74
|
+
|
75
|
+
# Log the query plan for queries taking more than this (works
|
76
|
+
# with SQLite, MySQL, and PostgreSQL).
|
77
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
78
|
+
|
79
|
+
# Disable automatic flushing of the log to improve performance.
|
80
|
+
# config.autoflush_log = false
|
81
|
+
|
82
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
83
|
+
config.log_formatter = ::Logger::Formatter.new
|
33
84
|
end
|
@@ -1,33 +1,36 @@
|
|
1
1
|
RailsApp::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite.
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
6
|
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs.
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
|
-
#
|
11
|
-
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
12
14
|
|
13
|
-
#
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_assets = true
|
17
|
+
config.static_cache_control = "public, max-age=3600"
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
14
20
|
config.consider_all_requests_local = true
|
15
21
|
config.action_controller.perform_caching = false
|
16
22
|
|
17
|
-
#
|
18
|
-
config.
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
19
28
|
|
20
29
|
# Tell Action Mailer not to deliver emails to the real world.
|
21
30
|
# The :test delivery method accumulates sent emails in the
|
22
31
|
# ActionMailer::Base.deliveries array.
|
23
32
|
config.action_mailer.delivery_method = :test
|
24
33
|
|
25
|
-
#
|
26
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
27
|
-
# like if you have constraints or database-specific column types
|
28
|
-
# config.active_record.schema_format = :sql
|
29
|
-
|
30
|
-
config.action_dispatch.show_exceptions = false
|
31
|
-
|
34
|
+
# Print deprecation notices to the stderr.
|
32
35
|
config.active_support.deprecation = :stderr
|
33
36
|
end
|
@@ -1,2 +1,8 @@
|
|
1
|
-
Rails.application.config
|
2
|
-
|
1
|
+
config = Rails.application.config
|
2
|
+
|
3
|
+
if Devise.rails4?
|
4
|
+
config.secret_key_base = 'd588e99efff13a86461fd6ab82327823ad2f8feb5dc217ce652cdd9f0dfc5eb4b5a62a92d24d2574d7d51dfb1ea8dd453ea54e00cf672159a13104a135422a10'
|
5
|
+
else
|
6
|
+
config.secret_token = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
|
7
|
+
config.session_store :cookie_store, :key => "_my_app"
|
8
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
RailsApp::Application.config.session_store :cookie_store, key: '_rails_app_session'
|
@@ -7,7 +7,6 @@ module SharedUser
|
|
7
7
|
:trackable, :validatable, :omniauthable
|
8
8
|
|
9
9
|
attr_accessor :other_key
|
10
|
-
attr_accessible :username, :email, :password, :password_confirmation, :remember_me, :confirmation_sent_at
|
11
10
|
|
12
11
|
# They need to be included after Devise is called.
|
13
12
|
extend ExtendMethods
|
data/test/routes_test.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
+
ExpectedRoutingError = Devise.rails4? ? MiniTest::Assertion : ActionController::RoutingError
|
4
|
+
|
3
5
|
class DefaultRoutingTest < ActionController::TestCase
|
4
6
|
test 'map new user session' do
|
5
7
|
assert_recognizes({:controller => 'devise/sessions', :action => 'new'}, {:path => 'users/sign_in', :method => :get})
|
@@ -101,7 +103,7 @@ class DefaultRoutingTest < ActionController::TestCase
|
|
101
103
|
assert_recognizes({:controller => 'users/omniauth_callbacks', :action => 'google'}, {:path => 'users/auth/google/callback', :method => :post})
|
102
104
|
assert_named_route "/users/auth/google/callback", :user_omniauth_callback_path, :google
|
103
105
|
|
104
|
-
assert_raise
|
106
|
+
assert_raise ExpectedRoutingError do
|
105
107
|
assert_recognizes({:controller => 'ysers/omniauth_callbacks', :action => 'twitter'}, {:path => 'users/auth/twitter/callback', :method => :get})
|
106
108
|
end
|
107
109
|
end
|
@@ -123,7 +125,7 @@ class CustomizedRoutingTest < ActionController::TestCase
|
|
123
125
|
end
|
124
126
|
|
125
127
|
test 'does not map admin password' do
|
126
|
-
assert_raise
|
128
|
+
assert_raise ExpectedRoutingError do
|
127
129
|
assert_recognizes({:controller => 'devise/passwords', :action => 'new'}, 'admin_area/password/new')
|
128
130
|
end
|
129
131
|
end
|
@@ -133,7 +135,7 @@ class CustomizedRoutingTest < ActionController::TestCase
|
|
133
135
|
end
|
134
136
|
|
135
137
|
test 'does only map reader password' do
|
136
|
-
assert_raise
|
138
|
+
assert_raise ExpectedRoutingError do
|
137
139
|
assert_recognizes({:controller => 'devise/sessions', :action => 'new'}, 'reader/sessions/new')
|
138
140
|
end
|
139
141
|
assert_recognizes({:controller => 'devise/passwords', :action => 'new'}, 'reader/password/new')
|
@@ -161,14 +163,14 @@ class CustomizedRoutingTest < ActionController::TestCase
|
|
161
163
|
|
162
164
|
test 'map deletes with :sign_out_via option' do
|
163
165
|
assert_recognizes({:controller => 'devise/sessions', :action => 'destroy'}, {:path => '/sign_out_via/deletes/sign_out', :method => :delete})
|
164
|
-
assert_raise
|
166
|
+
assert_raise ExpectedRoutingError do
|
165
167
|
assert_recognizes({:controller => 'devise/sessions', :action => 'destroy'}, {:path => '/sign_out_via/deletes/sign_out', :method => :get})
|
166
168
|
end
|
167
169
|
end
|
168
170
|
|
169
171
|
test 'map posts with :sign_out_via option' do
|
170
172
|
assert_recognizes({:controller => 'devise/sessions', :action => 'destroy'}, {:path => '/sign_out_via/posts/sign_out', :method => :post})
|
171
|
-
assert_raise
|
173
|
+
assert_raise ExpectedRoutingError do
|
172
174
|
assert_recognizes({:controller => 'devise/sessions', :action => 'destroy'}, {:path => '/sign_out_via/posts/sign_out', :method => :get})
|
173
175
|
end
|
174
176
|
end
|
@@ -176,56 +178,56 @@ class CustomizedRoutingTest < ActionController::TestCase
|
|
176
178
|
test 'map delete_or_posts with :sign_out_via option' do
|
177
179
|
assert_recognizes({:controller => 'devise/sessions', :action => 'destroy'}, {:path => '/sign_out_via/delete_or_posts/sign_out', :method => :post})
|
178
180
|
assert_recognizes({:controller => 'devise/sessions', :action => 'destroy'}, {:path => '/sign_out_via/delete_or_posts/sign_out', :method => :delete})
|
179
|
-
assert_raise
|
181
|
+
assert_raise ExpectedRoutingError do
|
180
182
|
assert_recognizes({:controller => 'devise/sessions', :action => 'destroy'}, {:path => '/sign_out_via/delete_or_posts/sign_out', :method => :get})
|
181
183
|
end
|
182
184
|
end
|
183
|
-
|
185
|
+
|
184
186
|
test 'map with constraints defined in hash' do
|
185
187
|
assert_recognizes({:controller => 'devise/registrations', :action => 'new'}, {:path => 'http://192.168.1.100/headquarters/sign_up', :method => :get})
|
186
|
-
assert_raise
|
188
|
+
assert_raise ExpectedRoutingError do
|
187
189
|
assert_recognizes({:controller => 'devise/registrations', :action => 'new'}, {:path => 'http://10.0.0.100/headquarters/sign_up', :method => :get})
|
188
190
|
end
|
189
191
|
end
|
190
|
-
|
192
|
+
|
191
193
|
test 'map with constraints defined in block' do
|
192
194
|
assert_recognizes({:controller => 'devise/registrations', :action => 'new'}, {:path => 'http://192.168.1.100/homebase/sign_up', :method => :get})
|
193
|
-
assert_raise
|
195
|
+
assert_raise ExpectedRoutingError do
|
194
196
|
assert_recognizes({:controller => 'devise/registrations', :action => 'new'}, {:path => 'http://10.0.0.100//homebase/sign_up', :method => :get})
|
195
197
|
end
|
196
198
|
end
|
197
|
-
|
199
|
+
|
198
200
|
test 'map with format false for sessions' do
|
199
201
|
assert_recognizes({:controller => 'devise/sessions', :action => 'new'}, {:path => '/htmlonly_admin/sign_in', :method => :get})
|
200
|
-
assert_raise
|
202
|
+
assert_raise ExpectedRoutingError do
|
201
203
|
assert_recognizes({:controller => 'devise/sessions', :action => 'new'}, {:path => '/htmlonly_admin/sign_in.xml', :method => :get})
|
202
204
|
end
|
203
205
|
end
|
204
|
-
|
206
|
+
|
205
207
|
test 'map with format false for passwords' do
|
206
208
|
assert_recognizes({:controller => 'devise/passwords', :action => 'create'}, {:path => '/htmlonly_admin/password', :method => :post})
|
207
|
-
assert_raise
|
209
|
+
assert_raise ExpectedRoutingError do
|
208
210
|
assert_recognizes({:controller => 'devise/passwords', :action => 'create'}, {:path => '/htmlonly_admin/password.xml', :method => :post})
|
209
211
|
end
|
210
212
|
end
|
211
|
-
|
213
|
+
|
212
214
|
test 'map with format false for registrations' do
|
213
215
|
assert_recognizes({:controller => 'devise/registrations', :action => 'new'}, {:path => '/htmlonly_admin/sign_up', :method => :get})
|
214
|
-
assert_raise
|
216
|
+
assert_raise ExpectedRoutingError do
|
215
217
|
assert_recognizes({:controller => 'devise/registrations', :action => 'new'}, {:path => '/htmlonly_admin/sign_up.xml', :method => :get})
|
216
218
|
end
|
217
219
|
end
|
218
|
-
|
220
|
+
|
219
221
|
test 'map with format false for confirmations' do
|
220
222
|
assert_recognizes({:controller => 'devise/confirmations', :action => 'show'}, {:path => '/htmlonly_users/confirmation', :method => :get})
|
221
|
-
assert_raise
|
223
|
+
assert_raise ExpectedRoutingError do
|
222
224
|
assert_recognizes({:controller => 'devise/confirmations', :action => 'show'}, {:path => '/htmlonly_users/confirmation.xml', :method => :get})
|
223
225
|
end
|
224
226
|
end
|
225
|
-
|
227
|
+
|
226
228
|
test 'map with format false for unlocks' do
|
227
229
|
assert_recognizes({:controller => 'devise/unlocks', :action => 'show'}, {:path => '/htmlonly_users/unlock', :method => :get})
|
228
|
-
assert_raise
|
230
|
+
assert_raise ExpectedRoutingError do
|
229
231
|
assert_recognizes({:controller => 'devise/unlocks', :action => 'show'}, {:path => '/htmlonly_users/unlock.xml', :method => :get})
|
230
232
|
end
|
231
233
|
end
|
data/test/test_helper.rb
CHANGED
@@ -4,6 +4,13 @@ DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
|
4
4
|
$:.unshift File.dirname(__FILE__)
|
5
5
|
puts "\n==> Devise.orm = #{DEVISE_ORM.inspect}"
|
6
6
|
|
7
|
+
module Devise
|
8
|
+
# Detection for minor differences between Rails 3.2 and 4 in tests.
|
9
|
+
def self.rails4?
|
10
|
+
Rails.version.start_with? '4'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
7
14
|
require "rails_app/config/environment"
|
8
15
|
require "rails/test_help"
|
9
16
|
require "orm/#{DEVISE_ORM}"
|
data/test/test_models.rb
CHANGED
@@ -15,7 +15,6 @@ end
|
|
15
15
|
class UserWithVirtualAttributes < User
|
16
16
|
devise :case_insensitive_keys => [ :email, :email_confirmation ]
|
17
17
|
validates :email, :presence => true, :confirmation => {:on => :create}
|
18
|
-
attr_accessible :email, :email_confirmation
|
19
18
|
end
|
20
19
|
|
21
20
|
class Several < Admin
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 3.0.0.rc
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- José Valim
|
@@ -10,12 +9,11 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-05-07 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: warden
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ~>
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,7 +21,6 @@ dependencies:
|
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ~>
|
29
26
|
- !ruby/object:Gem::Version
|
@@ -31,7 +28,6 @@ dependencies:
|
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: orm_adapter
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
@@ -39,7 +35,6 @@ dependencies:
|
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
39
|
- - ~>
|
45
40
|
- !ruby/object:Gem::Version
|
@@ -47,7 +42,6 @@ dependencies:
|
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: bcrypt-ruby
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
46
|
- - ~>
|
53
47
|
- !ruby/object:Gem::Version
|
@@ -55,7 +49,6 @@ dependencies:
|
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
53
|
- - ~>
|
61
54
|
- !ruby/object:Gem::Version
|
@@ -63,19 +56,23 @@ dependencies:
|
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: railties
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- -
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 3.2.6
|
63
|
+
- - <
|
69
64
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
65
|
+
version: '5'
|
71
66
|
type: :runtime
|
72
67
|
prerelease: false
|
73
68
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
69
|
requirements:
|
76
|
-
- -
|
70
|
+
- - '>='
|
77
71
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
72
|
+
version: 3.2.6
|
73
|
+
- - <
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '5'
|
79
76
|
description: Flexible authentication solution for Rails with Warden
|
80
77
|
email: contact@plataformatec.com.br
|
81
78
|
executables: []
|
@@ -116,8 +113,8 @@ files:
|
|
116
113
|
- config/locales/en.yml
|
117
114
|
- devise.gemspec
|
118
115
|
- devise.png
|
119
|
-
- gemfiles/Gemfile.rails-3.
|
120
|
-
- gemfiles/Gemfile.rails-3.
|
116
|
+
- gemfiles/Gemfile.rails-3.2.x
|
117
|
+
- gemfiles/Gemfile.rails-3.2.x.lock
|
121
118
|
- lib/devise.rb
|
122
119
|
- lib/devise/controllers/helpers.rb
|
123
120
|
- lib/devise/controllers/rememberable.rb
|
@@ -126,7 +123,6 @@ files:
|
|
126
123
|
- lib/devise/delegator.rb
|
127
124
|
- lib/devise/failure_app.rb
|
128
125
|
- lib/devise/hooks/activatable.rb
|
129
|
-
- lib/devise/hooks/csrf_cleaner.rb
|
130
126
|
- lib/devise/hooks/forgetable.rb
|
131
127
|
- lib/devise/hooks/lockable.rb
|
132
128
|
- lib/devise/hooks/rememberable.rb
|
@@ -154,6 +150,7 @@ files:
|
|
154
150
|
- lib/devise/orm/active_record.rb
|
155
151
|
- lib/devise/orm/mongoid.rb
|
156
152
|
- lib/devise/param_filter.rb
|
153
|
+
- lib/devise/parameter_sanitizer.rb
|
157
154
|
- lib/devise/rails.rb
|
158
155
|
- lib/devise/rails/routes.rb
|
159
156
|
- lib/devise/rails/warden_compat.rb
|
@@ -234,6 +231,7 @@ files:
|
|
234
231
|
- test/omniauth/url_helpers_test.rb
|
235
232
|
- test/orm/active_record.rb
|
236
233
|
- test/orm/mongoid.rb
|
234
|
+
- test/parameter_sanitizer_test.rb
|
237
235
|
- test/rails_app/Rakefile
|
238
236
|
- test/rails_app/app/active_record/admin.rb
|
239
237
|
- test/rails_app/app/active_record/shim.rb
|
@@ -262,6 +260,9 @@ files:
|
|
262
260
|
- test/rails_app/app/views/users/index.html.erb
|
263
261
|
- test/rails_app/app/views/users/mailer/confirmation_instructions.erb
|
264
262
|
- test/rails_app/app/views/users/sessions/new.html.erb
|
263
|
+
- test/rails_app/bin/bundle
|
264
|
+
- test/rails_app/bin/rails
|
265
|
+
- test/rails_app/bin/rake
|
265
266
|
- test/rails_app/config.ru
|
266
267
|
- test/rails_app/config/application.rb
|
267
268
|
- test/rails_app/config/boot.rb
|
@@ -274,6 +275,7 @@ files:
|
|
274
275
|
- test/rails_app/config/initializers/devise.rb
|
275
276
|
- test/rails_app/config/initializers/inflections.rb
|
276
277
|
- test/rails_app/config/initializers/secret_token.rb
|
278
|
+
- test/rails_app/config/initializers/session_store.rb
|
277
279
|
- test/rails_app/config/routes.rb
|
278
280
|
- test/rails_app/db/migrate/20100401102949_create_tables.rb
|
279
281
|
- test/rails_app/db/schema.rb
|
@@ -283,7 +285,6 @@ files:
|
|
283
285
|
- test/rails_app/public/422.html
|
284
286
|
- test/rails_app/public/500.html
|
285
287
|
- test/rails_app/public/favicon.ico
|
286
|
-
- test/rails_app/script/rails
|
287
288
|
- test/routes_test.rb
|
288
289
|
- test/support/assertions.rb
|
289
290
|
- test/support/helpers.rb
|
@@ -296,27 +297,26 @@ files:
|
|
296
297
|
homepage: http://github.com/plataformatec/devise
|
297
298
|
licenses:
|
298
299
|
- MIT
|
300
|
+
metadata: {}
|
299
301
|
post_install_message:
|
300
302
|
rdoc_options: []
|
301
303
|
require_paths:
|
302
304
|
- lib
|
303
305
|
required_ruby_version: !ruby/object:Gem::Requirement
|
304
|
-
none: false
|
305
306
|
requirements:
|
306
|
-
- -
|
307
|
+
- - '>='
|
307
308
|
- !ruby/object:Gem::Version
|
308
309
|
version: '0'
|
309
310
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
310
|
-
none: false
|
311
311
|
requirements:
|
312
|
-
- -
|
312
|
+
- - '>'
|
313
313
|
- !ruby/object:Gem::Version
|
314
|
-
version:
|
314
|
+
version: 1.3.1
|
315
315
|
requirements: []
|
316
316
|
rubyforge_project: devise
|
317
|
-
rubygems_version:
|
317
|
+
rubygems_version: 2.0.3
|
318
318
|
signing_key:
|
319
|
-
specification_version:
|
319
|
+
specification_version: 4
|
320
320
|
summary: Flexible authentication solution for Rails with Warden
|
321
321
|
test_files:
|
322
322
|
- test/controllers/custom_strategy_test.rb
|
@@ -368,6 +368,7 @@ test_files:
|
|
368
368
|
- test/omniauth/url_helpers_test.rb
|
369
369
|
- test/orm/active_record.rb
|
370
370
|
- test/orm/mongoid.rb
|
371
|
+
- test/parameter_sanitizer_test.rb
|
371
372
|
- test/rails_app/Rakefile
|
372
373
|
- test/rails_app/app/active_record/admin.rb
|
373
374
|
- test/rails_app/app/active_record/shim.rb
|
@@ -396,6 +397,9 @@ test_files:
|
|
396
397
|
- test/rails_app/app/views/users/index.html.erb
|
397
398
|
- test/rails_app/app/views/users/mailer/confirmation_instructions.erb
|
398
399
|
- test/rails_app/app/views/users/sessions/new.html.erb
|
400
|
+
- test/rails_app/bin/bundle
|
401
|
+
- test/rails_app/bin/rails
|
402
|
+
- test/rails_app/bin/rake
|
399
403
|
- test/rails_app/config.ru
|
400
404
|
- test/rails_app/config/application.rb
|
401
405
|
- test/rails_app/config/boot.rb
|
@@ -408,6 +412,7 @@ test_files:
|
|
408
412
|
- test/rails_app/config/initializers/devise.rb
|
409
413
|
- test/rails_app/config/initializers/inflections.rb
|
410
414
|
- test/rails_app/config/initializers/secret_token.rb
|
415
|
+
- test/rails_app/config/initializers/session_store.rb
|
411
416
|
- test/rails_app/config/routes.rb
|
412
417
|
- test/rails_app/db/migrate/20100401102949_create_tables.rb
|
413
418
|
- test/rails_app/db/schema.rb
|
@@ -417,7 +422,6 @@ test_files:
|
|
417
422
|
- test/rails_app/public/422.html
|
418
423
|
- test/rails_app/public/500.html
|
419
424
|
- test/rails_app/public/favicon.ico
|
420
|
-
- test/rails_app/script/rails
|
421
425
|
- test/routes_test.rb
|
422
426
|
- test/support/assertions.rb
|
423
427
|
- test/support/helpers.rb
|