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: aa81dd6aeae73a0e57f33b846b3e7b776bbf65bd2e43ba83c2f45d330b3e42c1
4
- data.tar.gz: 7d573076b55c64bd65145fe4326bafe5182e8efd6175d45f771805dc43349c68
3
+ metadata.gz: a9c2b4dabc2c6ccb1e8fe53818425f77b4dbe28b2bc1403542fa9f59ae1f73c7
4
+ data.tar.gz: ff0d572e7d4fb76c1ce684b7bcb8aa01ec6109508f55d3cbe0eb3adc0210a437
5
5
  SHA512:
6
- metadata.gz: e0ee13d07f74d6bea5d0ed5eedec68eba66ca5de33b0cb09bc038acdb71953a6b24780f4a7e67523475a7dc607ddd63de06864c714596592c86a1ec7ac4c0cfc
7
- data.tar.gz: b7a171552e5b54324a67ef6db6e2008642c0b89c033bd878dac17c504a8805e9e8d16d0d753a82a9fe897cb00d68de3a069e5c68c52c9a07b866be4df25d76de
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.has?(key)
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
- { event: '$password_reset.requested' }.merge({ user_traits: user_traits })
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)
@@ -1,3 +1,3 @@
1
1
  module DeviseCastle
2
- VERSION = "2.1.0".freeze
2
+ VERSION = "2.1.1".freeze
3
3
  end
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.0
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-09-07 00:00:00.000000000 Z
12
+ date: 2018-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: devise