smart_proxy_dynflow 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2bb41902cd0541c6537d973025ab615df030b6f9edf9a1d7938234b0b8830f1
4
- data.tar.gz: '06059e08fb8a8bfb9b5bc2bfea93c27ad9ed343ea5ae7fd0355893b8ddbcf664'
3
+ metadata.gz: f4cbd5ee3715ae77a996375dad27d44ef2eba5bde98687c01852b63f018de384
4
+ data.tar.gz: f4852c006912c4d80e9ddd1f3aa846d17845dfc46a34ae047ec0dad6887d6c93
5
5
  SHA512:
6
- metadata.gz: bed67548c8a5b98708b02ca0b7c40a526662e57323bd28b41820b2eb15df2b0d6963f3ccfdc10e379507f4aaaa82b081d7eb4fc31804155cd52e8e9f316f93aa
7
- data.tar.gz: a701930113e81e6e9a14dad07826b239f2f73265617b9666a3610d9d19750ca2817a129f86d8741ff835cbdb68e5c1e1bfd8c907ed796e4da0069482ffe7b6d0
6
+ metadata.gz: af596d7d35ec2d1231864f0982f4af90944a723998e6666343ad0cda0fd5b1c470e3ece13e7d89b4940c3ae4c22099d3f31dbd46e58dd8c5a56f90e40e408995
7
+ data.tar.gz: be433c2faeaf439e79ef77b05c36bec2c42b44f98e524b216cc0419b2097b32481a75977aa9c34f248b21c944b5ae71a98a71e1f6b5cccf786e3d12ad14d697a
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Proxy::Dynflow::Action::Middleware
4
+ class AssembleResults < ::Dynflow::Middleware
5
+ def present
6
+ unless %i[error success skipped].include?(action.run_step&.state)
7
+ action.output[:result] = action.output_result
8
+ end
9
+ pass
10
+ end
11
+ end
12
+ end
@@ -2,12 +2,16 @@
2
2
 
3
3
  require 'smart_proxy_dynflow/action/shareable'
4
4
  require 'smart_proxy_dynflow/action/external_polling'
5
+ require 'smart_proxy_dynflow/action/middleware/assemble_results'
6
+
5
7
  module Proxy::Dynflow
6
8
  module Action
7
9
  class Runner < Shareable
8
10
  include ::Dynflow::Action::Cancellable
9
11
  include ::Proxy::Dynflow::Action::WithExternalPolling
10
12
 
13
+ middleware.use ::Proxy::Dynflow::Action::Middleware::AssembleResults
14
+
11
15
  def run(event = nil)
12
16
  case event
13
17
  when nil
@@ -72,16 +72,10 @@ module Proxy
72
72
  end
73
73
  end
74
74
 
75
- def expand_output(action)
76
- hash = action.to_hash
77
- hash[:output][:result] = action.output_result if action.is_a?(Proxy::Dynflow::Action::Runner)
78
- hash
79
- end
80
-
81
75
  def execution_plan_status(plan)
82
76
  actions = plan.actions.map do |action|
83
77
  refresh_output(plan, action)
84
- expand_output(action)
78
+ action.to_hash
85
79
  end
86
80
  plan.to_hash.merge(:actions => actions)
87
81
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Proxy
4
4
  module Dynflow
5
- VERSION = '0.9.2'
5
+ VERSION = '0.9.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_dynflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-05 00:00:00.000000000 Z
11
+ date: 2024-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow
@@ -68,6 +68,7 @@ files:
68
68
  - lib/smart_proxy_dynflow/action/batch_callback.rb
69
69
  - lib/smart_proxy_dynflow/action/batch_runner.rb
70
70
  - lib/smart_proxy_dynflow/action/external_polling.rb
71
+ - lib/smart_proxy_dynflow/action/middleware/assemble_results.rb
71
72
  - lib/smart_proxy_dynflow/action/output_collector.rb
72
73
  - lib/smart_proxy_dynflow/action/runner.rb
73
74
  - lib/smart_proxy_dynflow/action/shareable.rb