castle-rb 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 688cb3645a056cf00e31610ad8a89b8a0e8183775ba6bf71bbadf7334d73b0d8
4
- data.tar.gz: 9624e2f4feb4a78ef5f4eb8376688c1c839dae357d220fb9f9ddca76d277b3b7
3
+ metadata.gz: 84dd494b50643e628c57809953e2bb59fa25a5a550dd8b1d58bb712e11a81604
4
+ data.tar.gz: 56e6bb84867531074995a550573e9790e9d5a6638931ac77fb83c590cbbc5204
5
5
  SHA512:
6
- metadata.gz: 7b9343297d9d09ace02b9ed5f40f6836023ceb86329163c2e9eb5d957dc249a40a7b3af63a0c201ca759f29b7eb7deec0f37f2dedd3c3879ab7a77781e30e66a
7
- data.tar.gz: e040d6020f980521f0f4f5771bd07ac9b504db9e58e3baa8b22aa51f46e620f308ee1b8d716566cd657fccc2fdc4ebe79d2a59bb21097fe6d6909ae11d97ba7c
6
+ metadata.gz: cb4fca490621a4e3349ce70a7036e62a4fa695d45964614308eb34a2024afdb3e333402fc10468e9e66fae24a972388366c078a665e41c73136068021687b7cf
7
+ data.tar.gz: 640e52eed4f09cc4060fe6e40e38d2500849640133671fe171fb35e589df0aee27134431630e16bfd03b76b3239f6f3b5fce8b427f468b2d7a3139ce1d29b8f1
@@ -18,7 +18,7 @@ module Castle
18
18
  Castle::Command.new(
19
19
  'impersonate',
20
20
  options.merge(context: context, sent_at: Castle::Utils::Timestamp.call),
21
- :post
21
+ options[:reset] ? :delete : :post
22
22
  )
23
23
  end
24
24
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Castle
4
- VERSION = '3.4.1'
4
+ VERSION = '3.4.2'
5
5
  end
@@ -75,6 +75,13 @@ describe Castle::Commands::Impersonate do
75
75
  it { expect(command.path).to be_eql('impersonate') }
76
76
  it { expect(command.data).to be_eql(command_data) }
77
77
  end
78
+
79
+ context 'when reset' do
80
+ let(:payload) { default_payload.merge(reset: true) }
81
+
82
+ it { expect(command.method).to be_eql(:delete) }
83
+ it { expect(command.path).to be_eql('impersonate') }
84
+ end
78
85
  end
79
86
 
80
87
  describe '#validate!' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: castle-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Brissmyr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-21 00:00:00.000000000 Z
11
+ date: 2018-02-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Castle protects your users from account compromise
14
14
  email: johan@castle.io