reinforce 0.2.1 → 0.2.2
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/lib/reinforce/factory.rb +5 -1
- data/lib/reinforce/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: 0d893233172c8657e08b8f337e8c40f524fbd4c61d2ab2468d4e15c660b9ca9c
|
4
|
+
data.tar.gz: 6161ddfb8762be431ba88353f80b7900e225226fbb1d0b0cca0490790ef1cb42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d05a0d0ad8c3d917db933e47c41308bd8e78ba767db951387040bae5fb364bae616e4cc7aeb026a37a9cc0de096b1b0880dc7f8d007a216ae7277e58228b94f
|
7
|
+
data.tar.gz: f6034c10cbcee33326ad09f342ec75b749d900e0bc0cc8472f8bf4d02a09e31b551197c469f355bfe3c7bc006d8d093e90e6ec8073049ff36a6c8c2c621111f6
|
data/lib/reinforce/factory.rb
CHANGED
@@ -94,6 +94,8 @@ module Reinforce
|
|
94
94
|
end
|
95
95
|
|
96
96
|
# rubocop:disable Metrics/AbcSize
|
97
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
98
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
97
99
|
def rectify_suspects(commands)
|
98
100
|
commands.each_with_index do |command, idx|
|
99
101
|
next unless command.suspect?
|
@@ -103,12 +105,14 @@ module Reinforce
|
|
103
105
|
relevant = remaining.take_while { |c| c.pbgid != command.pbgid }
|
104
106
|
|
105
107
|
used = relevant.any? do |c|
|
106
|
-
building_details&.produces?(c.details
|
108
|
+
building_details&.produces?(c.details&.path)
|
107
109
|
end
|
108
110
|
|
109
111
|
command.mark_legit if used
|
110
112
|
end
|
111
113
|
end
|
114
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
115
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
112
116
|
# rubocop:enable Metrics/AbcSize
|
113
117
|
end
|
114
118
|
end
|
data/lib/reinforce/version.rb
CHANGED