mistral_client 1.0.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0746e5658fe10edda68289b63a11f8e8306f939d
4
- data.tar.gz: fb5750de1c4bc90795b0b3bc49e06267f284c1d1
3
+ metadata.gz: d22291f0931609c910a1e7e3dbb3faee87cbf542
4
+ data.tar.gz: 6d7000c084ca0881f25dd1ecd59e5ae9cabaf107
5
5
  SHA512:
6
- metadata.gz: 15483eea25a2f62af9a40b7efce8d7bfdaa2b1896ce905b2d55d48655114805ee9b29fb350d28bb28e827f9830ddf0f65dc500e50b38d8b878716eaad5665847
7
- data.tar.gz: f246cac33c6292e134d8f1f56805ef90bf3721fd7987316085733293f6683e1dcbb62627de47c86267345cf91a379d1845ce3e440e567c836024bf257cb164d2
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.0.0...HEAD
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)
@@ -1,3 +1,3 @@
1
1
  module MistralClient
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
@@ -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, workflow_id: @id, env: env, task_name: task_name)
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.0.0
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-10-13 00:00:00.000000000 Z
13
+ date: 2017-12-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty