easy_flow 0.36.0 → 0.37.0
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/app/models/easy_flow/digest.rb +8 -0
- data/app/models/easy_flow/inputs.rb +9 -2
- data/lib/easy_flow/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: 738d119d2cab4783784532361d52c24c2b2825066ad8970a4dfa03e8e0e3c405
|
|
4
|
+
data.tar.gz: fc233a4ea07c339f27f62f87b83ad218e771ee19bcee08a1e795cde7d1f18c10
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 95b62e84987cf90ef6eb7061165cb3a733c0a658c91901d46920bb48fcd6364d9642571b9069be6983e9c5983eaa6a97e3c98c174d34a97f83c9e20182d3b915
|
|
7
|
+
data.tar.gz: a83ed3214d6b9c161b3eaeac4d72f3552ac847f2d4bf7ca30685a3dc0861a299c96b52625398cd582a20d1c0e791e0ff7d30e0f33f83d2e08eb3630f42173169
|
|
@@ -52,6 +52,14 @@ module EasyFlow
|
|
|
52
52
|
records_a_value?(named) ? declared + CompletedAt.outputs : declared
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
+
def plain_value_is?(id, output_name)
|
|
56
|
+
named = step(id)
|
|
57
|
+
type = step_type(named)
|
|
58
|
+
return true if type.nil? || type.outputs_for(named).empty?
|
|
59
|
+
|
|
60
|
+
type.outputs.one? && type.outputs.first.name.to_s == output_name.to_s
|
|
61
|
+
end
|
|
62
|
+
|
|
55
63
|
def values_out_of(id)
|
|
56
64
|
named = step(id)
|
|
57
65
|
return [] unless named
|
|
@@ -19,14 +19,21 @@ module EasyFlow
|
|
|
19
19
|
def self.value_of(input, state, run)
|
|
20
20
|
return run&.owner_id if input["from_run_owner"]
|
|
21
21
|
|
|
22
|
-
input["step"].present? ? latest_output(input, state) : input["value"]
|
|
22
|
+
input["step"].present? ? latest_output(input, state, run) : input["value"]
|
|
23
23
|
end
|
|
24
24
|
private_class_method :value_of
|
|
25
25
|
|
|
26
|
-
def self.latest_output(input, state)
|
|
26
|
+
def self.latest_output(input, state, run)
|
|
27
27
|
latest_visit = state.keys.select { |key| key.split("@").first == input["step"] }.max_by { |key| key.split("@")[1].to_i }
|
|
28
|
+
return if unreported?(input, state[latest_visit], run)
|
|
29
|
+
|
|
28
30
|
CompletedAt.value_of(state, {}, latest_visit, input["output"])
|
|
29
31
|
end
|
|
30
32
|
private_class_method :latest_output
|
|
33
|
+
|
|
34
|
+
def self.unreported?(input, recorded, run)
|
|
35
|
+
run && input["output"].present? && !recorded.is_a?(Hash) && !run.digest.plain_value_is?(input["step"], input["output"])
|
|
36
|
+
end
|
|
37
|
+
private_class_method :unreported?
|
|
31
38
|
end
|
|
32
39
|
end
|
data/lib/easy_flow/version.rb
CHANGED