floe 0.11.0 → 0.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0c91f1170b6abe30e09d32d976efb4644fc3ac5e689274ef49a471bfb53ef8c
4
- data.tar.gz: 48b2b6f51342ca80771f498dec85491f3c57ed4943e26cfbbce1ef1d3ade6029
3
+ metadata.gz: 302eabcce76893426ed95920bff11ed2bba9956a7d006249d86212e30c5cc67c
4
+ data.tar.gz: 4148b20da8ef81e6e45a4ec73489cdcf956115d1f99535019aef3b561ed45e00
5
5
  SHA512:
6
- metadata.gz: 594a89242eb6e27a345b3d5f49b93c6b362d0064d62c7154ce8e554e84f6f02a669b96a815959553c3eb6239453a26cc00a2d181d5cb7b508ee219e6891a156a
7
- data.tar.gz: 519e65a57c5dd1e639705d280c89cb6868a17e05f750e7d903f8a1ae7aaae38c11839bf04fc2e7d157005fd99ca302773ddfe5cf8612c79d45efafde3de71c39
6
+ metadata.gz: 73a1a714b1d729af89dd9839655955f76c3ed69fa8814e230fc03746175d1ff243b8b58fd02dce272d683b39fe50cd88c1c3a7f05cd2e36e9aa070747f85ae6f
7
+ data.tar.gz: bf13a6c8f07a5918e78d99bb5a03c29b3a76e059c92cd6f3fec85dd64b1d701138a16a9c0e6df10ed820f4f97ef932152f1d0a61b38a60d3d344728da9ec33c7
data/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.11.2] - 2024-05-24
8
+ ### Fixed
9
+ - Output now based upon raw input not effective input ([#191](https://github.com/ManageIQ/floe/pull/191))
10
+ - Fix error raised on invalid resource scheme ([#195](https://github.com/ManageIQ/floe/pull/195))
11
+
12
+ ## [0.11.1] - 2024-05-20
13
+ ### Fixed
14
+ - Fix issue where a failed state can leave a workflow in "running" ([#182](https://github.com/ManageIQ/floe/pull/182))
15
+
16
+ ### Changed
17
+ - Drop unused Task#status ([#180](https://github.com/ManageIQ/floe/pull/180))
18
+ - Check task failed? in non_terminal_mixin ([#183](https://github.com/ManageIQ/floe/pull/183))
19
+
7
20
  ## [0.11.0] - 2024-05-02
8
21
  ### Fixed
9
22
  - Ensure the local code is loaded in exe/floe ([#173](https://github.com/ManageIQ/floe/pull/173))
@@ -19,7 +32,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
19
32
  ### Removed
20
33
  - Remove unused run! method ([#176](https://github.com/ManageIQ/floe/pull/176))
21
34
 
22
-
23
35
  ## [0.10.0] - 2024-04-05
24
36
  ### Fixed
25
37
  - Fix rubocops ([#164](https://github.com/ManageIQ/floe/pull/164))
@@ -165,7 +177,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
165
177
  ### Added
166
178
  - Initial release
167
179
 
168
- [Unreleased]: https://github.com/ManageIQ/floe/compare/v0.11.0...HEAD
180
+ [Unreleased]: https://github.com/ManageIQ/floe/compare/v0.11.2...HEAD
181
+ [0.11.2]: https://github.com/ManageIQ/floe/compare/v0.11.1...v0.11.2
182
+ [0.11.1]: https://github.com/ManageIQ/floe/compare/v0.11.0...v0.11.1
169
183
  [0.11.0]: https://github.com/ManageIQ/floe/compare/v0.10.0...v0.11.0
170
184
  [0.10.0]: https://github.com/ManageIQ/floe/compare/v0.9.0...v0.10.0
171
185
  [0.9.0]: https://github.com/ManageIQ/floe/compare/v0.8.0...v0.9.0
data/floe.gemspec CHANGED
@@ -13,6 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.required_ruby_version = ">= 2.7.0"
14
14
 
15
15
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
16
+ spec.metadata['rubygems_mfa_required'] = "true"
16
17
 
17
18
  spec.metadata["homepage_uri"] = spec.homepage
18
19
  spec.metadata["source_code_uri"] = spec.homepage
data/lib/floe/runner.rb CHANGED
@@ -17,7 +17,7 @@ module Floe
17
17
 
18
18
  private def resolve_scheme(scheme)
19
19
  runner = @runners[scheme]
20
- runner = @runners[scheme] = @runners[scheme].call if runner.is_a?(Proc)
20
+ runner = @runners[scheme] = @runners[scheme].call if runner.kind_of?(Proc)
21
21
  runner
22
22
  end
23
23
 
data/lib/floe/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Floe
4
- VERSION = "0.11.0"
4
+ VERSION = "0.11.2"
5
5
  end
@@ -3,16 +3,6 @@
3
3
  module Floe
4
4
  class Workflow
5
5
  class ReferencePath < Path
6
- class << self
7
- def get(payload, context)
8
- new(payload).get(context)
9
- end
10
-
11
- def set(payload, context, value)
12
- new(payload).set(context, value)
13
- end
14
- end
15
-
16
6
  attr_reader :path
17
7
 
18
8
  def initialize(*)
@@ -19,9 +19,8 @@ module Floe
19
19
  end
20
20
 
21
21
  def finish
22
- input = input_path.value(context, context.input)
23
- next_state = choices.detect { |choice| choice.true?(context, input) }&.next || default
24
- output = output_path.value(context, input)
22
+ output = output_path.value(context, context.input)
23
+ next_state = choices.detect { |choice| choice.true?(context, output) }&.next || default
25
24
 
26
25
  context.next_state = next_state
27
26
  context.output = output
@@ -5,7 +5,9 @@ module Floe
5
5
  module States
6
6
  module NonTerminalMixin
7
7
  def finish
8
- context.next_state = end? ? nil : @next
8
+ # If this state is failed or the End state set next_state to nil
9
+ context.next_state = end? || context.failed? ? nil : @next
10
+
9
11
  super
10
12
  end
11
13
 
@@ -25,9 +25,7 @@ module Floe
25
25
  end
26
26
 
27
27
  def finish
28
- input = process_input(context.input)
29
- context.output = process_output(input, result)
30
- context.next_state = end? ? nil : @next
28
+ context.output = process_output(context.input.dup, result)
31
29
  super
32
30
  end
33
31
 
@@ -6,10 +6,6 @@ module Floe
6
6
  class Succeed < Floe::Workflow::State
7
7
  attr_reader :input_path, :output_path
8
8
 
9
- def initialize(workflow, name, payload)
10
- super
11
- end
12
-
13
9
  def finish
14
10
  context.next_state = nil
15
11
  context.output = context.input
@@ -41,10 +41,6 @@ module Floe
41
41
  context.state["RunnerContext"] = runner_context
42
42
  end
43
43
 
44
- def status
45
- @end ? "success" : "running"
46
- end
47
-
48
44
  def finish
49
45
  output = runner.output(context.state["RunnerContext"])
50
46
 
@@ -53,7 +49,6 @@ module Floe
53
49
  context.output = process_output(context.input.dup, output)
54
50
  super
55
51
  else
56
- context.next_state = nil
57
52
  context.output = error = parse_error(output)
58
53
  super
59
54
  retry_state!(error) || catch_error!(error) || fail_workflow!(error)
@@ -147,10 +142,6 @@ module Floe
147
142
  rescue JSON::ParserError
148
143
  nil
149
144
  end
150
-
151
- def next_state
152
- end? ? nil : @next
153
- end
154
145
  end
155
146
  end
156
147
  end
data/lib/floe/workflow.rb CHANGED
@@ -110,7 +110,7 @@ module Floe
110
110
  context.state["Name"] = start_at
111
111
  context.state["Input"] = context.execution["Input"].dup
112
112
  end
113
- rescue JSON::ParserError => err
113
+ rescue StandardError => err
114
114
  raise Floe::InvalidWorkflowError, err.message
115
115
  end
116
116
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: floe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-02 00:00:00.000000000 Z
11
+ date: 2024-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_spawn
@@ -223,6 +223,7 @@ homepage: https://github.com/ManageIQ/floe
223
223
  licenses: []
224
224
  metadata:
225
225
  allowed_push_host: https://rubygems.org
226
+ rubygems_mfa_required: 'true'
226
227
  homepage_uri: https://github.com/ManageIQ/floe
227
228
  source_code_uri: https://github.com/ManageIQ/floe
228
229
  changelog_uri: https://github.com/ManageIQ/floe/blob/master/CHANGELOG.md
@@ -241,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
242
  - !ruby/object:Gem::Version
242
243
  version: '0'
243
244
  requirements: []
244
- rubygems_version: 3.4.20
245
+ rubygems_version: 3.5.10
245
246
  signing_key:
246
247
  specification_version: 4
247
248
  summary: Simple Workflow Runner.