castle-rb 3.5.1 → 3.5.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24c43b5fce4ad8c26dd2ebd12986ca7c7cd8ba8cec976dfdff4e3885c1966247
|
|
4
|
+
data.tar.gz: 4056b857b4352aed10385049f2bb6a2f55879493f7ddbec7a2a6c7b199bb5224
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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)
|
data/lib/castle/version.rb
CHANGED
|
@@ -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
|
|
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
|
|
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.
|
|
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:
|
|
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
|