mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 16:18:04 -05:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43800b4b85 | ||
|
|
baf5e00544 | ||
|
|
289dd5f221 | ||
|
|
9f5b83750e | ||
|
|
8593801130 | ||
|
|
bb879f7154 | ||
|
|
772b74a657 | ||
|
|
51bf327017 | ||
|
|
14eb1362e3 | ||
|
|
f3e8fd3baa | ||
|
|
a0ccc1cf96 | ||
|
|
b39faffde4 | ||
|
|
366a428b2c | ||
|
|
7d103bc627 | ||
|
|
bdd2e7e24f | ||
|
|
c82e4cf47b | ||
|
|
63ccdfb34a | ||
|
|
2ee0068d77 |
32
.github/workflows/test.yml
vendored
32
.github/workflows/test.yml
vendored
@@ -7,6 +7,8 @@ jobs:
|
||||
matrix:
|
||||
gemfile:
|
||||
- Gemfile
|
||||
- gemfiles/Gemfile-rails-main
|
||||
- gemfiles/Gemfile-rails-6-1
|
||||
- gemfiles/Gemfile-rails-6-0
|
||||
- gemfiles/Gemfile-rails-5-2
|
||||
- gemfiles/Gemfile-rails-5-1
|
||||
@@ -30,6 +32,10 @@ jobs:
|
||||
gemfile: Gemfile
|
||||
- ruby: 2.1
|
||||
gemfile: gemfiles/Gemfile-rails-6-0
|
||||
- ruby: 2.1
|
||||
gemfile: gemfiles/Gemfile-rails-6-1
|
||||
- ruby: 2.1
|
||||
gemfile: gemfiles/Gemfile-rails-main
|
||||
- ruby: 2.1
|
||||
gemfile: gemfiles/Gemfile-rails-5-2
|
||||
- ruby: 2.1
|
||||
@@ -40,24 +46,44 @@ jobs:
|
||||
gemfile: Gemfile
|
||||
- ruby: 2.2
|
||||
gemfile: gemfiles/Gemfile-rails-6-0
|
||||
- ruby: 2.2
|
||||
gemfile: gemfiles/Gemfile-rails-6-1
|
||||
- ruby: 2.2
|
||||
gemfile: gemfiles/Gemfile-rails-main
|
||||
- ruby: 2.2
|
||||
gemfile: gemfiles/Gemfile-rails-5-2
|
||||
- ruby: 2.3
|
||||
gemfile: Gemfile
|
||||
- ruby: 2.3
|
||||
gemfile: gemfiles/Gemfile-rails-6-0
|
||||
- ruby: 2.3
|
||||
gemfile: gemfiles/Gemfile-rails-6-1
|
||||
- ruby: 2.3
|
||||
gemfile: gemfiles/Gemfile-rails-main
|
||||
- ruby: 2.4
|
||||
gemfile: Gemfile
|
||||
- ruby: 2.4
|
||||
gemfile: gemfiles/Gemfile-rails-6-0
|
||||
- ruby: 2.4
|
||||
gemfile: gemfiles/Gemfile-rails-6-1
|
||||
- ruby: 2.4
|
||||
gemfile: gemfiles/Gemfile-rails-main
|
||||
- ruby: 2.4
|
||||
gemfile: gemfiles/Gemfile-rails-4-1
|
||||
- ruby: 2.5
|
||||
gemfile: gemfiles/Gemfile-rails-4-1
|
||||
- ruby: 2.5
|
||||
gemfile: gemfiles/Gemfile-rails-main
|
||||
- ruby: 2.5
|
||||
gemfile: Gemfile
|
||||
- ruby: 2.6
|
||||
gemfile: gemfiles/Gemfile-rails-4-1
|
||||
- ruby: 2.6
|
||||
gemfile: gemfiles/Gemfile-rails-4-2
|
||||
- ruby: 2.6
|
||||
gemfile: Gemfile
|
||||
- ruby: 2.6
|
||||
gemfile: gemfiles/Gemfile-rails-main
|
||||
- ruby: 2.7
|
||||
gemfile: gemfiles/Gemfile-rails-4-1
|
||||
- ruby: 2.7
|
||||
@@ -88,6 +114,12 @@ jobs:
|
||||
gemfile: gemfiles/Gemfile-rails-5-2
|
||||
- env: DEVISE_ORM=mongoid
|
||||
gemfile: gemfiles/Gemfile-rails-6-0
|
||||
- env: DEVISE_ORM=mongoid
|
||||
gemfile: gemfiles/Gemfile-rails-6-1
|
||||
- env: DEVISE_ORM=mongoid
|
||||
gemfile: Gemfile
|
||||
- env: DEVISE_ORM=mongoid
|
||||
gemfile: gemfiles/Gemfile-rails-main
|
||||
runs-on: ubuntu-latest
|
||||
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
||||
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
### unreleased
|
||||
### 4.8.1
|
||||
|
||||
* enhancements
|
||||
* Add support for Rails 7.0. Please note that Turbo integration is not fully supported by Devise yet.
|
||||
|
||||
### 4.8.0 - 2021-04-29
|
||||
|
||||
|
||||
2
Gemfile
2
Gemfile
@@ -4,7 +4,7 @@ source "https://rubygems.org"
|
||||
|
||||
gemspec
|
||||
|
||||
gem "rails", "~> 6.1.0"
|
||||
gem "rails", "~> 7.0.0"
|
||||
gem "omniauth"
|
||||
gem "omniauth-oauth2"
|
||||
gem "rdoc"
|
||||
|
||||
203
Gemfile.lock
203
Gemfile.lock
@@ -1,6 +1,6 @@
|
||||
GIT
|
||||
remote: https://github.com/rails/rails-controller-testing.git
|
||||
revision: bc6f3356803d7c5d373f89a44625d59953dc0cef
|
||||
revision: 36e84822ee997d69c971f03f3f3759ee4f4bdc37
|
||||
specs:
|
||||
rails-controller-testing (1.0.5)
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
@@ -10,7 +10,7 @@ GIT
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
devise (4.8.0)
|
||||
devise (4.8.1)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0)
|
||||
@@ -20,98 +20,112 @@ PATH
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actioncable (6.1.3.1)
|
||||
actionpack (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
actioncable (7.0.0)
|
||||
actionpack (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (6.1.3.1)
|
||||
actionpack (= 6.1.3.1)
|
||||
activejob (= 6.1.3.1)
|
||||
activerecord (= 6.1.3.1)
|
||||
activestorage (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
actionmailbox (7.0.0)
|
||||
actionpack (= 7.0.0)
|
||||
activejob (= 7.0.0)
|
||||
activerecord (= 7.0.0)
|
||||
activestorage (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
mail (>= 2.7.1)
|
||||
actionmailer (6.1.3.1)
|
||||
actionpack (= 6.1.3.1)
|
||||
actionview (= 6.1.3.1)
|
||||
activejob (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
actionmailer (7.0.0)
|
||||
actionpack (= 7.0.0)
|
||||
actionview (= 7.0.0)
|
||||
activejob (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (6.1.3.1)
|
||||
actionview (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
rack (~> 2.0, >= 2.0.9)
|
||||
actionpack (7.0.0)
|
||||
actionview (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
rack (~> 2.0, >= 2.2.0)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (6.1.3.1)
|
||||
actionpack (= 6.1.3.1)
|
||||
activerecord (= 6.1.3.1)
|
||||
activestorage (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
actiontext (7.0.0)
|
||||
actionpack (= 7.0.0)
|
||||
activerecord (= 7.0.0)
|
||||
activestorage (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
globalid (>= 0.6.0)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
actionview (7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||
activejob (6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
activejob (7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
activerecord (6.1.3.1)
|
||||
activemodel (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
activestorage (6.1.3.1)
|
||||
actionpack (= 6.1.3.1)
|
||||
activejob (= 6.1.3.1)
|
||||
activerecord (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
marcel (~> 1.0.0)
|
||||
mini_mime (~> 1.0.2)
|
||||
activesupport (6.1.3.1)
|
||||
activemodel (7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
activerecord (7.0.0)
|
||||
activemodel (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
activestorage (7.0.0)
|
||||
actionpack (= 7.0.0)
|
||||
activejob (= 7.0.0)
|
||||
activerecord (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
marcel (~> 1.0)
|
||||
mini_mime (>= 1.1.0)
|
||||
activesupport (7.0.0)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
zeitwerk (~> 2.3)
|
||||
bcrypt (3.1.16)
|
||||
builder (3.2.4)
|
||||
concurrent-ruby (1.1.8)
|
||||
concurrent-ruby (1.1.9)
|
||||
crass (1.0.6)
|
||||
erubi (1.10.0)
|
||||
faraday (1.3.0)
|
||||
faraday (1.8.0)
|
||||
faraday-em_http (~> 1.0)
|
||||
faraday-em_synchrony (~> 1.0)
|
||||
faraday-excon (~> 1.1)
|
||||
faraday-httpclient (~> 1.0.1)
|
||||
faraday-net_http (~> 1.0)
|
||||
faraday-net_http_persistent (~> 1.1)
|
||||
faraday-patron (~> 1.0)
|
||||
faraday-rack (~> 1.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ruby2_keywords
|
||||
ruby2_keywords (>= 0.0.4)
|
||||
faraday-em_http (1.0.0)
|
||||
faraday-em_synchrony (1.0.0)
|
||||
faraday-excon (1.1.0)
|
||||
faraday-httpclient (1.0.1)
|
||||
faraday-net_http (1.0.1)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
hashie (4.1.0)
|
||||
i18n (1.8.10)
|
||||
faraday-net_http_persistent (1.2.0)
|
||||
faraday-patron (1.0.0)
|
||||
faraday-rack (1.0.0)
|
||||
globalid (1.0.0)
|
||||
activesupport (>= 5.0)
|
||||
hashie (5.0.0)
|
||||
i18n (1.8.11)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jwt (2.2.2)
|
||||
loofah (2.9.0)
|
||||
jwt (2.3.0)
|
||||
loofah (2.13.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
marcel (1.0.0)
|
||||
marcel (1.0.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.0.3)
|
||||
mini_portile2 (2.5.0)
|
||||
minitest (5.14.4)
|
||||
mocha (1.12.0)
|
||||
mini_mime (1.1.2)
|
||||
mini_portile2 (2.6.1)
|
||||
minitest (5.15.0)
|
||||
mocha (1.13.0)
|
||||
multi_json (1.15.0)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.1.1)
|
||||
nio4r (2.5.7)
|
||||
nokogiri (1.11.2)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
nio4r (2.5.8)
|
||||
nokogiri (1.12.5)
|
||||
mini_portile2 (~> 2.6.1)
|
||||
racc (~> 1.4)
|
||||
oauth2 (1.4.7)
|
||||
faraday (>= 0.8, < 2.0)
|
||||
@@ -119,20 +133,20 @@ GEM
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
omniauth (2.0.3)
|
||||
omniauth (2.0.4)
|
||||
hashie (>= 3.4.6)
|
||||
rack (>= 1.6.2, < 3)
|
||||
rack-protection
|
||||
omniauth-facebook (8.0.0)
|
||||
omniauth-facebook (9.0.0)
|
||||
omniauth-oauth2 (~> 1.2)
|
||||
omniauth-oauth2 (1.7.1)
|
||||
omniauth-oauth2 (1.7.2)
|
||||
oauth2 (~> 1.4)
|
||||
omniauth (>= 1.9, < 3)
|
||||
omniauth-openid (2.0.1)
|
||||
omniauth (>= 1.0, < 3.0)
|
||||
rack-openid (~> 1.4.0)
|
||||
orm_adapter (0.5.0)
|
||||
racc (1.5.2)
|
||||
racc (1.6.0)
|
||||
rack (2.2.3)
|
||||
rack-openid (1.4.2)
|
||||
rack (>= 1.1.0)
|
||||
@@ -141,47 +155,40 @@ GEM
|
||||
rack
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (6.1.3.1)
|
||||
actioncable (= 6.1.3.1)
|
||||
actionmailbox (= 6.1.3.1)
|
||||
actionmailer (= 6.1.3.1)
|
||||
actionpack (= 6.1.3.1)
|
||||
actiontext (= 6.1.3.1)
|
||||
actionview (= 6.1.3.1)
|
||||
activejob (= 6.1.3.1)
|
||||
activemodel (= 6.1.3.1)
|
||||
activerecord (= 6.1.3.1)
|
||||
activestorage (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
rails (7.0.0)
|
||||
actioncable (= 7.0.0)
|
||||
actionmailbox (= 7.0.0)
|
||||
actionmailer (= 7.0.0)
|
||||
actionpack (= 7.0.0)
|
||||
actiontext (= 7.0.0)
|
||||
actionview (= 7.0.0)
|
||||
activejob (= 7.0.0)
|
||||
activemodel (= 7.0.0)
|
||||
activerecord (= 7.0.0)
|
||||
activestorage (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
bundler (>= 1.15.0)
|
||||
railties (= 6.1.3.1)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
railties (= 7.0.0)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
rails-html-sanitizer (1.4.2)
|
||||
loofah (~> 2.3)
|
||||
railties (6.1.3.1)
|
||||
actionpack (= 6.1.3.1)
|
||||
activesupport (= 6.1.3.1)
|
||||
railties (7.0.0)
|
||||
actionpack (= 7.0.0)
|
||||
activesupport (= 7.0.0)
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
rake (13.0.3)
|
||||
rdoc (6.3.0)
|
||||
zeitwerk (~> 2.5)
|
||||
rake (13.0.6)
|
||||
rdoc (6.3.3)
|
||||
responders (3.0.1)
|
||||
actionpack (>= 5.0)
|
||||
railties (>= 5.0)
|
||||
rexml (3.2.4)
|
||||
rexml (3.2.5)
|
||||
ruby-openid (2.9.2)
|
||||
ruby2_keywords (0.0.4)
|
||||
sprockets (4.0.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.2.2)
|
||||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
ruby2_keywords (0.0.5)
|
||||
sqlite3 (1.4.2)
|
||||
thor (1.1.0)
|
||||
timecop (0.9.4)
|
||||
@@ -193,10 +200,10 @@ GEM
|
||||
nokogiri (>= 1.2.0)
|
||||
rack (>= 1.0)
|
||||
rack-test (>= 0.5.3)
|
||||
websocket-driver (0.7.3)
|
||||
websocket-driver (0.7.5)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
zeitwerk (2.4.2)
|
||||
zeitwerk (2.5.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@@ -208,7 +215,7 @@ DEPENDENCIES
|
||||
omniauth-facebook
|
||||
omniauth-oauth2
|
||||
omniauth-openid
|
||||
rails (~> 6.1.0)
|
||||
rails (~> 7.0.0)
|
||||
rails-controller-testing!
|
||||
rdoc
|
||||
responders (~> 3.0)
|
||||
@@ -218,4 +225,4 @@ DEPENDENCIES
|
||||
webrat (= 0.7.3)
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.7
|
||||
2.2.33
|
||||
|
||||
@@ -14,6 +14,14 @@ Gem::Specification.new do |s|
|
||||
s.homepage = "https://github.com/heartcombo/devise"
|
||||
s.description = "Flexible authentication solution for Rails with Warden"
|
||||
s.authors = ['José Valim', 'Carlos Antônio']
|
||||
s.metadata = {
|
||||
"homepage_uri" => "https://github.com/heartcombo/devise",
|
||||
"documentation_uri" => "https://rubydoc.info/github/heartcombo/devise",
|
||||
"changelog_uri" => "https://github.com/heartcombo/devise/blob/master/CHANGELOG.md",
|
||||
"source_code_uri" => "https://github.com/heartcombo/devise",
|
||||
"bug_tracker_uri" => "https://github.com/heartcombo/devise/issues",
|
||||
"wiki_uri" => "https://github.com/heartcombo/devise/wiki"
|
||||
}
|
||||
|
||||
s.files = Dir["{app,config,lib}/**/*", "CHANGELOG.md", "MIT-LICENSE", "README.md"]
|
||||
s.require_paths = ["lib"]
|
||||
|
||||
27
gemfiles/Gemfile-rails-6-1
Normal file
27
gemfiles/Gemfile-rails-6-1
Normal file
@@ -0,0 +1,27 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
gemspec path: ".."
|
||||
|
||||
gem "rails", '~> 6.1.0'
|
||||
gem "omniauth"
|
||||
gem "omniauth-oauth2"
|
||||
gem "rdoc"
|
||||
|
||||
gem "activemodel-serializers-xml", github: "rails/activemodel-serializers-xml"
|
||||
|
||||
gem "rails-controller-testing", github: "rails/rails-controller-testing"
|
||||
|
||||
gem "responders", "~> 3.0"
|
||||
|
||||
group :test do
|
||||
gem "omniauth-facebook"
|
||||
gem "omniauth-openid"
|
||||
gem "rexml"
|
||||
gem "timecop"
|
||||
gem "webrat", "0.7.3", require: false
|
||||
gem "mocha", "~> 1.1", require: false
|
||||
end
|
||||
|
||||
platforms :ruby do
|
||||
gem "sqlite3", "~> 1.4"
|
||||
end
|
||||
27
gemfiles/Gemfile-rails-main
Normal file
27
gemfiles/Gemfile-rails-main
Normal file
@@ -0,0 +1,27 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
gemspec path: ".."
|
||||
|
||||
gem "rails", github: "rails/rails", branch: "main"
|
||||
gem "omniauth"
|
||||
gem "omniauth-oauth2"
|
||||
gem "rdoc"
|
||||
|
||||
gem "activemodel-serializers-xml", github: "rails/activemodel-serializers-xml"
|
||||
|
||||
gem "rails-controller-testing", github: "rails/rails-controller-testing"
|
||||
|
||||
gem "responders", "~> 3.0"
|
||||
|
||||
group :test do
|
||||
gem "omniauth-facebook"
|
||||
gem "omniauth-openid"
|
||||
gem "rexml"
|
||||
gem "timecop"
|
||||
gem "webrat", "0.7.3", require: false
|
||||
gem "mocha", "~> 1.1", require: false
|
||||
end
|
||||
|
||||
platforms :ruby do
|
||||
gem "sqlite3", "~> 1.4"
|
||||
end
|
||||
@@ -313,12 +313,20 @@ module Devise
|
||||
end
|
||||
|
||||
def get
|
||||
ActiveSupport::Dependencies.constantize(@name)
|
||||
# TODO: Remove AS::Dependencies usage when dropping support to Rails < 7.
|
||||
if ActiveSupport::Dependencies.respond_to?(:constantize)
|
||||
ActiveSupport::Dependencies.constantize(@name)
|
||||
else
|
||||
@name.constantize
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.ref(arg)
|
||||
ActiveSupport::Dependencies.reference(arg)
|
||||
# TODO: Remove AS::Dependencies usage when dropping support to Rails < 7.
|
||||
if ActiveSupport::Dependencies.respond_to?(:reference)
|
||||
ActiveSupport::Dependencies.reference(arg)
|
||||
end
|
||||
Getter.new(arg)
|
||||
end
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ module Devise
|
||||
#
|
||||
# == Options
|
||||
#
|
||||
# Authenticatable adds the following options to devise_for:
|
||||
# Authenticatable adds the following options to +devise+:
|
||||
#
|
||||
# * +authentication_keys+: parameters used for authentication. By default [:email].
|
||||
#
|
||||
|
||||
@@ -13,7 +13,7 @@ module Devise
|
||||
#
|
||||
# == Options
|
||||
#
|
||||
# DatabaseAuthenticatable adds the following options to devise_for:
|
||||
# DatabaseAuthenticatable adds the following options to +devise+:
|
||||
#
|
||||
# * +pepper+: a random string used to provide a more secure hash. Use
|
||||
# `rails secret` to generate new keys.
|
||||
@@ -42,7 +42,7 @@ module Devise
|
||||
def initialize(*args, &block)
|
||||
@skip_email_changed_notification = false
|
||||
@skip_password_change_notification = false
|
||||
super
|
||||
super
|
||||
end
|
||||
|
||||
# Skips sending the email changed notification after_update
|
||||
|
||||
@@ -8,11 +8,11 @@ module Devise
|
||||
#
|
||||
# == Options
|
||||
#
|
||||
# Oauthable adds the following options to devise_for:
|
||||
# Oauthable adds the following options to +devise+:
|
||||
#
|
||||
# * +omniauth_providers+: Which providers are available to this model. It expects an array:
|
||||
#
|
||||
# devise_for :database_authenticatable, :omniauthable, omniauth_providers: [:twitter]
|
||||
# devise :database_authenticatable, :omniauthable, omniauth_providers: [:twitter]
|
||||
#
|
||||
module Omniauthable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
@@ -7,7 +7,7 @@ module Devise
|
||||
#
|
||||
# ==Options
|
||||
#
|
||||
# Recoverable adds the following options to devise_for:
|
||||
# Recoverable adds the following options to +devise+:
|
||||
#
|
||||
# * +reset_password_keys+: the keys you want to use when recovering the password for an account
|
||||
# * +reset_password_within+: the time period within which the password must be reset or the token expires.
|
||||
|
||||
@@ -15,7 +15,7 @@ module Devise
|
||||
#
|
||||
# == Options
|
||||
#
|
||||
# Rememberable adds the following options in devise_for:
|
||||
# Rememberable adds the following options to +devise+:
|
||||
#
|
||||
# * +remember_for+: the time you want the user will be remembered without
|
||||
# asking for credentials. After this time the user will be blocked and
|
||||
|
||||
@@ -11,7 +11,7 @@ module Devise
|
||||
#
|
||||
# == Options
|
||||
#
|
||||
# Timeoutable adds the following options to devise_for:
|
||||
# Timeoutable adds the following options to +devise+:
|
||||
#
|
||||
# * +timeout_in+: the interval to timeout the user session without activity.
|
||||
#
|
||||
|
||||
@@ -9,7 +9,7 @@ module Devise
|
||||
#
|
||||
# == Options
|
||||
#
|
||||
# Validatable adds the following options to devise_for:
|
||||
# Validatable adds the following options to +devise+:
|
||||
#
|
||||
# * +email_regexp+: the regular expression used to validate e-mails;
|
||||
# * +password_length+: a range expressing password length. Defaults to 6..128.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Devise
|
||||
VERSION = "4.8.0".freeze
|
||||
VERSION = "4.8.1".freeze
|
||||
end
|
||||
|
||||
@@ -79,7 +79,6 @@ class FailureTest < ActiveSupport::TestCase
|
||||
'HTTP_HOST' => 'test.host',
|
||||
'REQUEST_METHOD' => 'GET',
|
||||
'warden.options' => { scope: :user },
|
||||
'rack.session' => {},
|
||||
'action_dispatch.request.formats' => Array(env_params.delete('formats') || Mime[:html]),
|
||||
'rack.input' => "",
|
||||
'warden' => OpenStruct.new(message: nil)
|
||||
|
||||
@@ -344,16 +344,12 @@ class AuthenticationSessionTest < Devise::IntegrationTest
|
||||
end
|
||||
|
||||
test 'refreshes _csrf_token' do
|
||||
ApplicationController.allow_forgery_protection = true
|
||||
|
||||
begin
|
||||
swap ApplicationController, allow_forgery_protection: true do
|
||||
get new_user_session_path
|
||||
token = request.session[:_csrf_token]
|
||||
|
||||
sign_in_as_user
|
||||
assert_not_equal request.session[:_csrf_token], token
|
||||
ensure
|
||||
ApplicationController.allow_forgery_protection = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ ActiveRecord::Base.logger = Logger.new(nil)
|
||||
ActiveRecord::Base.include_root_in_json = true
|
||||
|
||||
migrate_path = File.expand_path("../../rails_app/db/migrate/", __FILE__)
|
||||
if Devise::Test.rails6?
|
||||
if Devise::Test.rails6_and_up?
|
||||
ActiveRecord::MigrationContext.new(migrate_path, ActiveRecord::SchemaMigration).migrate
|
||||
elsif Devise::Test.rails52_and_up?
|
||||
ActiveRecord::MigrationContext.new(migrate_path).migrate
|
||||
|
||||
@@ -46,8 +46,12 @@ module RailsApp
|
||||
end
|
||||
|
||||
# Remove the first check once Rails 5.0 support is removed.
|
||||
if Devise::Test.rails52_and_up? && !Devise::Test.rails6?
|
||||
if Devise::Test.rails52_and_up? && !Devise::Test.rails6_and_up?
|
||||
Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
|
||||
end
|
||||
|
||||
if Devise::Test.rails7_and_up?
|
||||
config.active_record.legacy_connection_handling = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,9 +7,13 @@ end
|
||||
module Devise
|
||||
module Test
|
||||
# Detection for minor differences between Rails versions in tests.
|
||||
|
||||
def self.rails6?
|
||||
Rails.version.start_with? '6'
|
||||
|
||||
def self.rails7_and_up?
|
||||
Rails::VERSION::MAJOR >= 7
|
||||
end
|
||||
|
||||
def self.rails6_and_up?
|
||||
Rails::VERSION::MAJOR >= 6
|
||||
end
|
||||
|
||||
def self.rails52_and_up?
|
||||
|
||||
@@ -103,7 +103,7 @@ class TestControllerHelpersTest < Devise::ControllerTestCase
|
||||
test "returns the content type of a failure app" do
|
||||
get :index, params: { format: :json }
|
||||
|
||||
if Devise::Test.rails6?
|
||||
if Devise::Test.rails6_and_up?
|
||||
assert_includes response.media_type, 'application/json'
|
||||
else
|
||||
assert_includes response.content_type, 'application/json'
|
||||
|
||||
Reference in New Issue
Block a user