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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88289e9acf977a7ec40baba9cc607ad802dd6d7e
4
- data.tar.gz: b197dc5fb03fed5d94eae9ac6e3a740d7cb3f10a
3
+ metadata.gz: 84c40631a39bb9d0f79d2891213baf5889b88637
4
+ data.tar.gz: e0e99cf923e1bf37ead8f230f6dd22f7da187419
5
5
  SHA512:
6
- metadata.gz: 84eef3b02c2b5ca07e7562ac7fa7bb310d465618e25aaa739e94ed96d1a4e4abfcaa997d61d6ca247d7580b661b1f81a9d49229c65deae0673254f5edee02ac8
7
- data.tar.gz: e52854fb48db7795e89c3542df182842499982332a5f11c0a8f802262b3d67049f21bbed01311763f1b160e8e514077f1d75ce8c2ea8b1eb9828eba6f248f6c6
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
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- devise (4.4.0)
13
+ devise (4.4.1)
14
14
  bcrypt (~> 3.0)
15
15
  orm_adapter (~> 0.1)
16
16
  railties (>= 4.1.0, < 5.2)
@@ -190,4 +190,4 @@ DEPENDENCIES
190
190
  webrat (= 0.7.3)
191
191
 
192
192
  BUNDLED WITH
193
- 1.15.3
193
+ 1.16.0
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-2017 Plataformatec. http://plataformatec.com.br
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
@@ -1,6 +1,6 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  # frozen_string_literal: true
2
3
 
3
- # -*- encoding: utf-8 -*-
4
4
  $:.push File.expand_path("../lib", __FILE__)
5
5
  require "devise/version"
6
6
 
@@ -21,7 +21,7 @@ GIT
21
21
  PATH
22
22
  remote: ..
23
23
  specs:
24
- devise (4.4.0)
24
+ devise (4.4.1)
25
25
  bcrypt (~> 3.0)
26
26
  orm_adapter (~> 0.1)
27
27
  railties (>= 4.1.0, < 5.2)
@@ -168,4 +168,4 @@ DEPENDENCIES
168
168
  webrat (= 0.7.3)
169
169
 
170
170
  BUNDLED WITH
171
- 1.15.3
171
+ 1.16.0
@@ -57,7 +57,7 @@ GIT
57
57
  PATH
58
58
  remote: ..
59
59
  specs:
60
- devise (4.4.0)
60
+ devise (4.4.1)
61
61
  bcrypt (~> 3.0)
62
62
  orm_adapter (~> 0.1)
63
63
  railties (>= 4.1.0, < 5.2)
@@ -189,4 +189,4 @@ DEPENDENCIES
189
189
  webrat (= 0.7.3)
190
190
 
191
191
  BUNDLED WITH
192
- 1.15.3
192
+ 1.16.0
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: ..
12
12
  specs:
13
- devise (4.4.0)
13
+ devise (4.4.1)
14
14
  bcrypt (~> 3.0)
15
15
  orm_adapter (~> 0.1)
16
16
  railties (>= 4.1.0, < 5.2)
@@ -189,4 +189,4 @@ DEPENDENCIES
189
189
  webrat (= 0.7.3)
190
190
 
191
191
  BUNDLED WITH
192
- 1.15.3
192
+ 1.16.0
@@ -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. Does not run authentication hooks.
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.is_a?(ActiveRecord::Base) # ActiveRecord
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Devise
4
- VERSION = "4.4.0".freeze
4
+ VERSION = "4.4.1".freeze
5
5
  end
@@ -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.0
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: 2017-12-29 00:00:00.000000000 Z
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.8
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