active_errors 1.0.0 → 1.0.1
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 +4 -4
- data/.reek.yml +8 -0
- data/bin/rake +0 -0
- data/lib/active_errors/messages.rb +5 -3
- data/lib/active_errors/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d162b2670cf12d7caa8e3c005393f39c66eb4becd5f7cb02bc8be536fe628d2
|
4
|
+
data.tar.gz: 7caecc795d6ce9f329cf5a277958ce8111af479d5c5e3cdc48ddef9997f304a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63b4308869972f19ab1f111251d515f641ede4198cbe48f7fe7e08462360c474e985858760678e011c152dac27c18e6fca173362218781def63f7b2a2b01b582
|
7
|
+
data.tar.gz: c0480525e5bc496f986195e69186e3f294f409c224813798af2bded0f18e5fe7493a0ba877c236b26247051cf12734c6e6007966d84ebf31d1297747f6a658d0
|
data/.reek.yml
CHANGED
@@ -6,16 +6,24 @@ detectors:
|
|
6
6
|
enabled: false
|
7
7
|
ControlParameter:
|
8
8
|
enabled: false
|
9
|
+
DuplicateMethodCall:
|
10
|
+
enabled: false
|
9
11
|
FeatureEnvy:
|
10
12
|
enabled: false
|
11
13
|
IrresponsibleModule:
|
12
14
|
enabled: false
|
13
15
|
ManualDispatch:
|
14
16
|
enabled: false
|
17
|
+
MissingSafeMethod:
|
18
|
+
enabled: false
|
15
19
|
NestedIterators:
|
16
20
|
max_allowed_nesting: 2
|
17
21
|
NilCheck:
|
18
22
|
enabled: false
|
23
|
+
RepeatedConditional:
|
24
|
+
enabled: false
|
25
|
+
TooManyMethods:
|
26
|
+
enabled: false
|
19
27
|
TooManyStatements:
|
20
28
|
max_statements: 10
|
21
29
|
UncommunicativeVariableName:
|
data/bin/rake
CHANGED
File without changes
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActiveErrors
|
2
4
|
class Messages
|
3
5
|
|
@@ -8,7 +10,7 @@ module ActiveErrors
|
|
8
10
|
end
|
9
11
|
|
10
12
|
def [](key)
|
11
|
-
return [] unless
|
13
|
+
return [] unless key?(key)
|
12
14
|
|
13
15
|
@errors[key]
|
14
16
|
end
|
@@ -22,7 +24,7 @@ module ActiveErrors
|
|
22
24
|
alias_method :add, :[]=
|
23
25
|
|
24
26
|
def added?(key, val)
|
25
|
-
return false unless
|
27
|
+
return false unless key?(key)
|
26
28
|
|
27
29
|
@errors[key].include?(val)
|
28
30
|
end
|
@@ -62,7 +64,7 @@ module ActiveErrors
|
|
62
64
|
alias_method :to_a, :full_messages
|
63
65
|
|
64
66
|
def full_messages_for(key)
|
65
|
-
return [] unless
|
67
|
+
return [] unless key?(key)
|
66
68
|
|
67
69
|
@errors[key].map { |val| full_message(key, val) }
|
68
70
|
end
|