devise_castle 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c2b4dabc2c6ccb1e8fe53818425f77b4dbe28b2bc1403542fa9f59ae1f73c7
|
4
|
+
data.tar.gz: ff0d572e7d4fb76c1ce684b7bcb8aa01ec6109508f55d3cbe0eb3adc0210a437
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81b573378e0003ef76054d0ecbe5d9fc520e96b0efb060f9677f6fd15f5c97cb9733671f4ad062babedb9c2e7d6292bc8bb1511b0051eb063a6bae55360d77b9
|
7
|
+
data.tar.gz: 4fbd14eddccc5ca144bc67b7bde716fc39963af85028c9b219f19c81499464229f943332bfef5ab69d17dd09190624cc5f9849ffc38cd84fa2968a6222976e65
|
@@ -1,14 +1,15 @@
|
|
1
1
|
class DeviseCastle::PasswordsController < Devise::PasswordsController
|
2
2
|
def create
|
3
3
|
user_traits = Devise.reset_password_keys.each_with_object({}) do |key, acc|
|
4
|
-
acc[key] = resource_params[key] if resource_params.
|
4
|
+
acc[key] = resource_params[key] if resource_params.key?(key)
|
5
5
|
end
|
6
6
|
|
7
7
|
super do |resource|
|
8
8
|
unless resource.respond_to?(:castle_do_not_track?) && resource.castle_do_not_track?
|
9
9
|
begin
|
10
10
|
castle.track(
|
11
|
-
|
11
|
+
event: '$password_reset.requested',
|
12
|
+
user_traits: user_traits
|
12
13
|
)
|
13
14
|
rescue ::Castle::Error => e
|
14
15
|
if Devise.castle_error_handler.is_a?(Proc)
|
@@ -26,11 +27,13 @@ class DeviseCastle::PasswordsController < Devise::PasswordsController
|
|
26
27
|
if resource.errors.empty?
|
27
28
|
castle.track(
|
28
29
|
event: '$password_reset.succeeded',
|
29
|
-
user_id: resource._castle_id
|
30
|
+
user_id: resource._castle_id
|
31
|
+
)
|
30
32
|
else
|
31
33
|
castle.track(
|
32
34
|
event: '$password_reset.failed',
|
33
|
-
user_id: resource._castle_id
|
35
|
+
user_id: resource._castle_id
|
36
|
+
)
|
34
37
|
end
|
35
38
|
rescue ::Castle::Error => e
|
36
39
|
if Devise.castle_error_handler.is_a?(Proc)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_castle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Brissmyr
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: devise
|