mistral_client 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/mistral_client/execution.rb +6 -3
- data/lib/mistral_client/version.rb +1 -1
- data/lib/mistral_client/workflow.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d22291f0931609c910a1e7e3dbb3faee87cbf542
|
4
|
+
data.tar.gz: 6d7000c084ca0881f25dd1ecd59e5ae9cabaf107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce0048a15cfeb882393903411f35c47fc5bfb2dbceda87cd32dd1a809d8b282f3cd2f28099129be6e9411dc5cd5183b1555faf505e8401bf680919c186a24537
|
7
|
+
data.tar.gz: d74c8d30e74e78ec706f55f6dbf79839b66744222eeae321f1eb5c28ae34d56fe9dd7c08c27dadebfdeff3277ed831f369e05dd82ad705ee0530e0c5f9308558
|
data/CHANGELOG.md
CHANGED
@@ -5,8 +5,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [1.1.0] - 2017-12-15
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- Made the input parameter available to execute! so that users can parameterize workflows.
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
- Fixed transient spec failure in task_spec.rb
|
15
|
+
|
8
16
|
## 1.0.0 - 2017-10-09
|
9
17
|
|
10
18
|
* Initial Release
|
11
19
|
|
12
|
-
[Unreleased]: https://github.com/civisanalytics/mistral_client/compare/v1.
|
20
|
+
[Unreleased]: https://github.com/civisanalytics/mistral_client/compare/v1.1.0...HEAD
|
21
|
+
[1.1.0]: https://github.com/civisanalytics/mistral_client/compare/v1.0.0...v1.1.0
|
@@ -18,9 +18,10 @@ module MistralClient
|
|
18
18
|
include MistralClient::Mixins::Definable
|
19
19
|
include MistralClient::Mixins::Deletable
|
20
20
|
|
21
|
+
# rubocop:disable Metrics/ParameterLists
|
21
22
|
def initialize(server, workflow_id: nil, env: nil, task_name: nil,
|
22
|
-
id: nil)
|
23
|
-
set_attributes(server, workflow_id, env, task_name, id)
|
23
|
+
id: nil, input: nil)
|
24
|
+
set_attributes(server, workflow_id, env, task_name, id, input)
|
24
25
|
if @id
|
25
26
|
reload
|
26
27
|
elsif @workflow_id
|
@@ -42,12 +43,13 @@ module MistralClient
|
|
42
43
|
|
43
44
|
private
|
44
45
|
|
45
|
-
def set_attributes(server, workflow_id, env, task_name, id)
|
46
|
+
def set_attributes(server, workflow_id, env, task_name, id, input)
|
46
47
|
@server = server
|
47
48
|
@env = env
|
48
49
|
@task_name = task_name
|
49
50
|
@id = id
|
50
51
|
@workflow_id = workflow_id
|
52
|
+
@input = input
|
51
53
|
end
|
52
54
|
|
53
55
|
def create_execution
|
@@ -56,6 +58,7 @@ module MistralClient
|
|
56
58
|
params[:env] = @env if @env
|
57
59
|
params[:task_name] = @task_name if @task_name
|
58
60
|
body[:params] = params unless params.empty?
|
61
|
+
body[:input] = input unless input.nil?
|
59
62
|
|
60
63
|
resp = @server.post(PATH, body.to_json, json: true)
|
61
64
|
ivars_from_response(resp)
|
@@ -21,8 +21,12 @@ module MistralClient
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def execute!(env: nil, task_name: nil)
|
25
|
-
Execution.new(@server,
|
24
|
+
def execute!(env: nil, task_name: nil, input: nil)
|
25
|
+
Execution.new(@server,
|
26
|
+
workflow_id: @id,
|
27
|
+
env: env,
|
28
|
+
task_name: task_name,
|
29
|
+
input: input)
|
26
30
|
end
|
27
31
|
|
28
32
|
def valid?(definition)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mistral_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brennan
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-12-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|