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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4cbd5ee3715ae77a996375dad27d44ef2eba5bde98687c01852b63f018de384
|
4
|
+
data.tar.gz: f4852c006912c4d80e9ddd1f3aa846d17845dfc46a34ae047ec0dad6887d6c93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
78
|
+
action.to_hash
|
85
79
|
end
|
86
80
|
plan.to_hash.merge(:actions => actions)
|
87
81
|
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.
|
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-
|
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
|