devise 4.4.0 → 4.4.1
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/devise.gemspec +1 -1
- data/gemfiles/Gemfile.rails-4.1-stable.lock +2 -2
- data/gemfiles/Gemfile.rails-4.2-stable.lock +2 -2
- data/gemfiles/Gemfile.rails-5.0-stable.lock +2 -2
- data/lib/devise/controllers/sign_in_out.rb +4 -1
- data/lib/devise/models/confirmable.rb +1 -1
- data/lib/devise/version.rb +1 -1
- data/test/models/confirmable_test.rb +11 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c40631a39bb9d0f79d2891213baf5889b88637
|
4
|
+
data.tar.gz: e0e99cf923e1bf37ead8f230f6dd22f7da187419
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f1c6c0dd5b4e8000f1736cbfb561a224fd04e07f9fc9ac8683e08d7a5edb90632808acd23a488c69674d7f64e1c8207db0f1882fdb1625a204af3051084353f
|
7
|
+
data.tar.gz: 916536faefc6dd98509d9c04f4dd95e2fc2a1000ae7c7a7091e1723e04b859cd36cdffda7246ec43d8076158b25456145824b4ae05c86abb1c5ebfc13ce9dba3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
### Unreleased
|
2
2
|
|
3
|
+
### 4.4.1 - 2018-01-23
|
4
|
+
|
5
|
+
* bug fixes
|
6
|
+
* Ensure Gemspec is loaded as utf-8. (by @segiddins)
|
7
|
+
* Fix `ActiveRecord` check on `Confirmable`. (by @tegon)
|
8
|
+
* Fix `signed_in?` docs without running auth hooks. by (@machty)
|
9
|
+
|
3
10
|
### 4.4.0 - 2017-12-29
|
4
11
|
|
5
12
|
* enhancements
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -674,6 +674,6 @@ https://github.com/plataformatec/devise/graphs/contributors
|
|
674
674
|
|
675
675
|
## License
|
676
676
|
|
677
|
-
MIT License. Copyright 2009-
|
677
|
+
MIT License. Copyright 2009-2018 Plataformatec. http://plataformatec.com.br
|
678
678
|
|
679
679
|
You are not granted rights or licenses to the trademarks of Plataformatec, including without limitation the Devise name or logo.
|
data/devise.gemspec
CHANGED
@@ -6,7 +6,10 @@ module Devise
|
|
6
6
|
# Included by default in all controllers.
|
7
7
|
module SignInOut
|
8
8
|
# Return true if the given scope is signed in session. If no scope given, return
|
9
|
-
# true if any scope is signed in.
|
9
|
+
# true if any scope is signed in. This will run authentication hooks, which may
|
10
|
+
# cause exceptions to be thrown from this method; if you simply want to check
|
11
|
+
# if a scope has already previously been authenticated without running
|
12
|
+
# authentication hooks, you can directly call `warden.authenticated?(scope: scope)`
|
10
13
|
def signed_in?(scope=nil)
|
11
14
|
[scope || Devise.mappings.keys].flatten.any? do |_scope|
|
12
15
|
warden.authenticate?(scope: _scope)
|
@@ -48,7 +48,7 @@ module Devise
|
|
48
48
|
included do
|
49
49
|
before_create :generate_confirmation_token, if: :confirmation_required?
|
50
50
|
after_create :skip_reconfirmation_in_callback!, if: :send_confirmation_notification?
|
51
|
-
if defined?(ActiveRecord) && self
|
51
|
+
if defined?(ActiveRecord) && self < ActiveRecord::Base # ActiveRecord
|
52
52
|
after_commit :send_on_create_confirmation_instructions, on: :create, if: :send_confirmation_notification?
|
53
53
|
after_commit :send_reconfirmation_instructions, on: :update, if: :reconfirmation_required?
|
54
54
|
else # Mongoid
|
data/lib/devise/version.rb
CHANGED
@@ -8,6 +8,17 @@ class ConfirmableTest < ActiveSupport::TestCase
|
|
8
8
|
setup_mailer
|
9
9
|
end
|
10
10
|
|
11
|
+
test 'should set callbacks to send the mail' do
|
12
|
+
if DEVISE_ORM == :active_record
|
13
|
+
defined_callbacks = User._commit_callbacks.map(&:filter)
|
14
|
+
assert_includes defined_callbacks, :send_on_create_confirmation_instructions
|
15
|
+
assert_includes defined_callbacks, :send_reconfirmation_instructions
|
16
|
+
elsif DEVISE_ORM == :mongoid
|
17
|
+
assert_includes User._create_callbacks.map(&:filter), :send_on_create_confirmation_instructions
|
18
|
+
assert_includes User._update_callbacks.map(&:filter), :send_reconfirmation_instructions
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
11
22
|
test 'should generate confirmation token after creating a record' do
|
12
23
|
assert_nil new_user.confirmation_token
|
13
24
|
assert_not_nil create_user.confirmation_token
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Valim
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: warden
|
@@ -379,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
379
379
|
version: '0'
|
380
380
|
requirements: []
|
381
381
|
rubyforge_project:
|
382
|
-
rubygems_version: 2.6.
|
382
|
+
rubygems_version: 2.6.13
|
383
383
|
signing_key:
|
384
384
|
specification_version: 4
|
385
385
|
summary: Flexible authentication solution for Rails with Warden
|