servactory 1.5.1 → 1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f9511d2fb9a463c46f04ba4e6f005b14f9048039524a1aed476ee1a4fa997ef
|
4
|
+
data.tar.gz: f5e03fa8943d3a5fd4735ec3817528202ce3b2e06106d81f0ad08fde2e4e4baf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 406a99f8386dc97033fd28231e8b11438aa8827878ee332b11efa43747b92f7fcc993b547413733651a93bc0d1f59f6799f4b7e70778038f685d91206ff35be9
|
7
|
+
data.tar.gz: 2895de4a4fc256dcec75cddaddc0ff92b70e9cf42de13309acde95447b0466d4afa8103d52b6ec66e219109065f7f9ffea022c7c41789e88383f32cf08a5e8bb
|
@@ -37,10 +37,13 @@ module Servactory
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def check
|
40
|
-
|
40
|
+
inclusion_in, message = @input.inclusion.values_at(:in, :message)
|
41
|
+
|
42
|
+
return if inclusion_in.nil?
|
43
|
+
return if inclusion_in.include?(@value)
|
41
44
|
|
42
45
|
add_error(
|
43
|
-
DEFAULT_MESSAGE,
|
46
|
+
message.presence || DEFAULT_MESSAGE,
|
44
47
|
service_class_name: @context.class.name,
|
45
48
|
input: @input,
|
46
49
|
value: @value
|
data/lib/servactory/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: servactory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sokolov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|