serega 0.1.0 → 0.1.1
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: d35551791e1f846527be7fa3176db641f292dae4e5d8108464e52af67cd5025d
|
4
|
+
data.tar.gz: 729261f9aa1a2734e40390ea0a253bd7e931a7bd31665cbd7846394b51042fa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 878c59b774c71dabfe9ebf745a0349ebd25fb329e44cd9cba53e2f405844e6639d6f153813e0c475fc03f158b5c04a3fdfad4f41c952d1cd4afcddaed251fbcb
|
7
|
+
data.tar.gz: 4fac4c3293292a6644c2976cfbb65ba91c2b8aa0ed8dddd5e24b3ac9ed01b9c954973cce94095a63c377c373f3a26c0ac6ee397109b5f79414f1ef6b0e066632
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
class Serega
|
4
4
|
class Attribute
|
5
|
-
class
|
5
|
+
class CheckOptKey
|
6
6
|
#
|
7
|
-
# Checks attribute :
|
7
|
+
# Checks attribute :key option
|
8
8
|
#
|
9
9
|
# @param opts [Hash] Attribute options
|
10
10
|
#
|
@@ -13,12 +13,12 @@ class Serega
|
|
13
13
|
# @return [void]
|
14
14
|
#
|
15
15
|
def self.call(opts)
|
16
|
-
return unless opts.key?(:
|
16
|
+
return unless opts.key?(:key)
|
17
17
|
|
18
|
-
value = opts[:
|
18
|
+
value = opts[:key]
|
19
19
|
return if value.is_a?(String) || value.is_a?(Symbol)
|
20
20
|
|
21
|
-
raise Error, "Invalid option :
|
21
|
+
raise Error, "Invalid option :key => #{value.inspect}. Must be a String or a Symbol"
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/lib/serega.rb
CHANGED
@@ -27,7 +27,7 @@ require_relative "serega/validations/check_opt_is_hash"
|
|
27
27
|
require_relative "serega/validations/attribute/check_block"
|
28
28
|
require_relative "serega/validations/attribute/check_name"
|
29
29
|
require_relative "serega/validations/attribute/check_opt_hide"
|
30
|
-
require_relative "serega/validations/attribute/
|
30
|
+
require_relative "serega/validations/attribute/check_opt_key"
|
31
31
|
require_relative "serega/validations/attribute/check_opt_many"
|
32
32
|
require_relative "serega/validations/attribute/check_opt_serializer"
|
33
33
|
require_relative "serega/validations/attribute/check_opts"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serega
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Glushkov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -57,8 +57,8 @@ files:
|
|
57
57
|
- lib/serega/validations/attribute/check_block.rb
|
58
58
|
- lib/serega/validations/attribute/check_name.rb
|
59
59
|
- lib/serega/validations/attribute/check_opt_hide.rb
|
60
|
+
- lib/serega/validations/attribute/check_opt_key.rb
|
60
61
|
- lib/serega/validations/attribute/check_opt_many.rb
|
61
|
-
- lib/serega/validations/attribute/check_opt_method.rb
|
62
62
|
- lib/serega/validations/attribute/check_opt_serializer.rb
|
63
63
|
- lib/serega/validations/attribute/check_opts.rb
|
64
64
|
- lib/serega/validations/check_allowed_keys.rb
|