abstractor 1.0.18 → 1.0.19
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzAwZGVlNDgzOTg4ODBiNWVmZTNjYjA4ZDU0YjI4MzYyZWJlMzVjYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTcwZDY2YjczZDA1Y2MxNDkyNmNiZjVhYjQ3Mjk5OTk3Y2YyM2MxOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjU2ZTJhMDY0ZTdlMGY1ZjRjMTc3YTZiYTkwMjRlZTY1OGI5MDVmZDg0MzIx
|
10
|
+
N2MyN2YxNDJhMDE3NWU3NGM2NDZiNmU1YzNhMmY3YjlmNmU0M2JkNWNhOGNj
|
11
|
+
N2FmNzU4OTQyYjZiZmUwNjYxMmI0MDlkNTZiNzI4ZGM0ZjdkNmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2NiN2RkN2U4OTY1N2U0OGE3ODY3YWE3ZjEzZDJlNzAzOTQzMmVjNzY1ZGFi
|
14
|
+
ZWVkMDBlMjM1NTdhNTVkZTNiZDYyZjdjNDNmNzNhNGNiYjM4YTg3ZGM0N2Ri
|
15
|
+
NzUzZDNhYjMxMTMzNjI2MjkwNWYxZTVjZWFiNTVmZDA0OTE2NjM=
|
@@ -35,6 +35,7 @@ module Abstractor
|
|
35
35
|
raise(ArgumentError, "abstraction_value_type argument invalid") unless Abstractor::Enum::ABSTRACTION_OTHER_VALUE_TYPES.include?(abstraction_other_value_type)
|
36
36
|
|
37
37
|
rejected_status = Abstractor::AbstractorSuggestionStatus.where(:name => 'Rejected').first
|
38
|
+
accepted_status = Abstractor::AbstractorSuggestionStatus.where(:name => 'Accepted').first
|
38
39
|
case abstraction_other_value_type
|
39
40
|
when Abstractor::Enum::ABSTRACTION_OTHER_VALUE_TYPE_UNKNOWN
|
40
41
|
unknown = true
|
@@ -48,19 +49,28 @@ module Abstractor
|
|
48
49
|
if abstraction_other_value_type
|
49
50
|
abstractor_abstractions.each do |abstractor_abstraction|
|
50
51
|
abstractor_abstraction.abstractor_suggestions.each do |abstractor_suggestion|
|
51
|
-
abstractor_suggestion.
|
52
|
-
|
52
|
+
if unknown && abstractor_suggestion.unknown
|
53
|
+
abstractor_suggestion.abstractor_suggestion_status = accepted_status
|
54
|
+
abstractor_suggestion.save!
|
55
|
+
else
|
56
|
+
set_abstractor_abstraction(abstractor_abstraction, unknown, not_applicable)
|
57
|
+
abstractor_suggestion.abstractor_suggestion_status = rejected_status
|
58
|
+
abstractor_suggestion.save!
|
59
|
+
end
|
53
60
|
end
|
54
|
-
abstractor_abstraction.value = nil
|
55
|
-
abstractor_abstraction.unknown = unknown
|
56
|
-
abstractor_abstraction.not_applicable = not_applicable
|
57
|
-
abstractor_abstraction.save!
|
58
61
|
end
|
59
62
|
end
|
60
63
|
end
|
61
64
|
end
|
62
65
|
|
63
66
|
private
|
67
|
+
def set_abstractor_abstraction(abstractor_abstraction, unknown, not_applicable)
|
68
|
+
abstractor_abstraction.value = nil
|
69
|
+
abstractor_abstraction.unknown = unknown
|
70
|
+
abstractor_abstraction.not_applicable = not_applicable
|
71
|
+
abstractor_abstraction.save!
|
72
|
+
end
|
73
|
+
|
64
74
|
def update_abstractor_abstraction_group_members
|
65
75
|
return unless deleted?
|
66
76
|
abstractor_abstraction_group_members.each do |gm|
|
data/lib/abstractor/version.rb
CHANGED