castle-rb 3.5.1 → 3.5.2

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: a710c22d8a912a0918f42fe092f6c3b883a4a03ad7e2b86572b17b6ee901931e
4
- data.tar.gz: e7325e9e957881ddcee78729d6274805d29b62c1f468e26fd03d34cf88286ac3
3
+ metadata.gz: 24c43b5fce4ad8c26dd2ebd12986ca7c7cd8ba8cec976dfdff4e3885c1966247
4
+ data.tar.gz: 4056b857b4352aed10385049f2bb6a2f55879493f7ddbec7a2a6c7b199bb5224
5
5
  SHA512:
6
- metadata.gz: 84f69693b63c3c52b3084348aba0bc5e28e047f6f56a5a756559abf895e8031d8c33df06f385c6383c62bcaa240dfb1b8d3550dc7bb6f9b3872b9dd1bf7851ae
7
- data.tar.gz: 24ecbd126fa6bb601acf00c442d8204c6042c87b9c47709af42e639e40409b70feca5c06f1c0fab50d7c9d0eb5ba20390229c6f7b6c74f170ab1918b5dec3b03
6
+ metadata.gz: 65344ead893ec01aa9502203f23707b5bb5288a1785b535e301c2a0dd45c7a2eacbfec4f008a422448e7ee0f847354fff392a98fb05b0ef3c9f4c5ffc30ad4e0
7
+ data.tar.gz: f3a12fdd744d44fabb08f4ceb2c61274997168ddb5600d83e1b882abd181471c57b94518cf43feafb9bba52b4112be020fb3185216cab3e4647fb9a0cd1aa65d
@@ -8,7 +8,7 @@ module Castle
8
8
  end
9
9
 
10
10
  def build(options = {})
11
- Castle::Validators::Present.call(options, %i[event user_id])
11
+ Castle::Validators::Present.call(options, %i[event])
12
12
  context = Castle::Context::Merger.call(@context, options[:context])
13
13
  context = Castle::Context::Sanitizer.call(context)
14
14
 
@@ -8,7 +8,6 @@ module Castle
8
8
  end
9
9
 
10
10
  def build(options = {})
11
- Castle::Validators::Present.call(options, %i[user_id])
12
11
  Castle::Validators::NotSupported.call(options, %i[properties])
13
12
  context = Castle::Context::Merger.call(@context, options[:context])
14
13
  context = Castle::Context::Sanitizer.call(context)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Castle
4
- VERSION = '3.5.1'
4
+ VERSION = '3.5.2'
5
5
  end
@@ -96,11 +96,7 @@ describe Castle::Commands::Authenticate do
96
96
  context 'with user_id not present' do
97
97
  let(:payload) { { event: '$login.track' } }
98
98
 
99
- it do
100
- expect do
101
- validate!
102
- end.to raise_error(Castle::InvalidParametersError, 'user_id is missing or empty')
103
- end
99
+ it { expect { validate! }.not_to raise_error }
104
100
  end
105
101
 
106
102
  context 'with event and user_id present' do
@@ -75,11 +75,7 @@ describe Castle::Commands::Identify do
75
75
  context 'with user_id not present' do
76
76
  let(:payload) { {} }
77
77
 
78
- it do
79
- expect do
80
- validate!
81
- end.to raise_error(Castle::InvalidParametersError, 'user_id is missing or empty')
82
- end
78
+ it { expect { validate! }.not_to raise_error }
83
79
  end
84
80
 
85
81
  context 'with user_id present' 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.5.1
4
+ version: 3.5.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-10-27 00:00:00.000000000 Z
11
+ date: 2019-01-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Castle protects your users from account compromise
14
14
  email: johan@castle.io