castle-rb 7.0.0 → 7.1.0

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: ab35253e5571890b82e8fd555d8342c1c9713d35d3cf83354c19cccc030c6683
4
- data.tar.gz: 9ead0508cede4ddccaa4e58ad8c60e0a76b2f6496279eaccec99419a172af326
3
+ metadata.gz: 1194491c10ae0be7d9dbb1a0ed8c2d86765c84ff21750db3c4a991bacde13155
4
+ data.tar.gz: efbe4311bab7d72428fd18e648d25c27fea5a528ea422ae9766a223500523404
5
5
  SHA512:
6
- metadata.gz: 33f0642e24430268723c3c960b8a214646b76c3693d088b3fc2d37c4fc9ccd41f4a3b4e295ab73b8e7530184d8b35f83b38918d1b588050b33238cdbbd9e64e0
7
- data.tar.gz: 4518be516263d115b2e55e2ca058aeb5a727dbb1e82343b52bec9a93a3b589457499a51512a914675c80514222ded34f15d66e741327fa6deb1f7be09feac334
6
+ metadata.gz: 3cea34bb26091eea34a91e9ec240863cca2c199926f40af0312ca2548dbd3ed2848a8812ae4d080641a275d541cd9d1a150ee4b9efb0697407e11f254c77412c
7
+ data.tar.gz: 61ce4a2b5041efd6518367ae18eb0c064b7cfb928c2458ea125183467522d10c4f45f4b85012c586125da221f03d9c8ac5cc338ded7d00bf839f6880e6c522cc
@@ -8,7 +8,6 @@ module Castle
8
8
  # @param options [Hash]
9
9
  # @return [Castle::Command]
10
10
  def build(options = {})
11
- Castle::Validators::Present.call(options, %i[event])
12
11
  context = Castle::Context::Sanitize.call(options[:context])
13
12
 
14
13
  Castle::Command.new(
@@ -8,7 +8,6 @@ module Castle
8
8
  # @param options [Hash]
9
9
  # @return [Castle::Command]
10
10
  def build(options = {})
11
- Castle::Validators::Present.call(options, %i[event])
12
11
  context = Castle::Context::Sanitize.call(options[:context])
13
12
 
14
13
  Castle::Command.new(
@@ -8,7 +8,6 @@ module Castle
8
8
  # @param options [Hash]
9
9
  # @return [Castle::Command]
10
10
  def build(options = {})
11
- Castle::Validators::Present.call(options, %i[event])
12
11
  context = Castle::Context::Sanitize.call(options[:context])
13
12
 
14
13
  Castle::Command.new(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Castle
4
- VERSION = '7.0.0'
4
+ VERSION = '7.1.0'
5
5
  end
@@ -69,31 +69,4 @@ describe Castle::Commands::Filter do
69
69
  it { expect(command.data).to be_eql(command_data) }
70
70
  end
71
71
  end
72
-
73
- describe '#validate!' do
74
- subject(:validate!) { instance.build(payload) }
75
-
76
- context 'with event not present' do
77
- let(:payload) { {} }
78
-
79
- it do
80
- expect { validate! }.to raise_error(
81
- Castle::InvalidParametersError,
82
- 'event is missing or empty'
83
- )
84
- end
85
- end
86
-
87
- context 'with user not present' do
88
- let(:payload) { { event: '$login' } }
89
-
90
- it { expect { validate! }.not_to raise_error }
91
- end
92
-
93
- context 'with event and user present' do
94
- let(:payload) { { event: '$login', user: user } }
95
-
96
- it { expect { validate! }.not_to raise_error }
97
- end
98
- end
99
72
  end
@@ -70,31 +70,4 @@ describe Castle::Commands::Log do
70
70
  it { expect(command.data).to be_eql(command_data) }
71
71
  end
72
72
  end
73
-
74
- describe '#validate!' do
75
- subject(:validate!) { instance.build(payload) }
76
-
77
- context 'with event not present' do
78
- let(:payload) { {} }
79
-
80
- it do
81
- expect { validate! }.to raise_error(
82
- Castle::InvalidParametersError,
83
- 'event is missing or empty'
84
- )
85
- end
86
- end
87
-
88
- context 'with user not present' do
89
- let(:payload) { { event: '$login' } }
90
-
91
- it { expect { validate! }.not_to raise_error }
92
- end
93
-
94
- context 'with event and user present' do
95
- let(:payload) { { event: '$login', user: user } }
96
-
97
- it { expect { validate! }.not_to raise_error }
98
- end
99
- end
100
73
  end
@@ -70,31 +70,4 @@ describe Castle::Commands::Risk do
70
70
  it { expect(command.data).to be_eql(command_data) }
71
71
  end
72
72
  end
73
-
74
- describe '#validate!' do
75
- subject(:validate!) { instance.build(payload) }
76
-
77
- context 'with event not present' do
78
- let(:payload) { {} }
79
-
80
- it do
81
- expect { validate! }.to raise_error(
82
- Castle::InvalidParametersError,
83
- 'event is missing or empty'
84
- )
85
- end
86
- end
87
-
88
- context 'with user not present' do
89
- let(:payload) { { event: '$login' } }
90
-
91
- it { expect { validate! }.not_to raise_error }
92
- end
93
-
94
- context 'with event and user present' do
95
- let(:payload) { { event: '$login', user: user } }
96
-
97
- it { expect { validate! }.not_to raise_error }
98
- end
99
- end
100
73
  end
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: 7.0.0
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan Brissmyr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-03 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal