iron_titan 0.3.10 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +201 -0
  3. data/README.md +6 -5
  4. data/lib/iron_titan/api/groups_api.rb +34 -31
  5. data/lib/iron_titan/api/jobs_api.rb +140 -182
  6. data/lib/iron_titan/api/runner_api.rb +43 -47
  7. data/lib/iron_titan/api_client.rb +48 -8
  8. data/lib/iron_titan/api_error.rb +12 -1
  9. data/lib/iron_titan/configuration.rb +23 -0
  10. data/lib/iron_titan/models/complete.rb +63 -27
  11. data/lib/iron_titan/models/error.rb +59 -21
  12. data/lib/iron_titan/models/error_body.rb +61 -24
  13. data/lib/iron_titan/models/group.rb +112 -28
  14. data/lib/iron_titan/models/group_wrapper.rb +60 -21
  15. data/lib/iron_titan/models/groups_wrapper.rb +60 -21
  16. data/lib/iron_titan/models/id_status.rb +89 -28
  17. data/lib/iron_titan/models/job.rb +168 -90
  18. data/lib/iron_titan/models/job_wrapper.rb +60 -21
  19. data/lib/iron_titan/models/jobs_wrapper.rb +62 -24
  20. data/lib/iron_titan/models/new_job.rb +91 -42
  21. data/lib/iron_titan/models/new_jobs_wrapper.rb +60 -21
  22. data/lib/iron_titan/models/start.rb +59 -21
  23. data/lib/iron_titan/version.rb +13 -2
  24. data/lib/iron_titan.rb +12 -1
  25. data/spec/api/groups_api_spec.rb +16 -17
  26. data/spec/api/jobs_api_spec.rb +37 -78
  27. data/spec/api/runner_api_spec.rb +20 -21
  28. data/spec/api_client_spec.rb +296 -0
  29. data/spec/configuration_spec.rb +48 -0
  30. data/spec/models/complete_spec.rb +16 -17
  31. data/spec/models/error_body_spec.rb +15 -12
  32. data/spec/models/error_spec.rb +14 -7
  33. data/spec/models/group_spec.rb +33 -12
  34. data/spec/models/group_wrapper_spec.rb +14 -7
  35. data/spec/models/groups_wrapper_spec.rb +14 -7
  36. data/spec/models/id_status_spec.rb +18 -12
  37. data/spec/models/job_spec.rb +43 -88
  38. data/spec/models/job_wrapper_spec.rb +14 -7
  39. data/spec/models/jobs_wrapper_spec.rb +15 -12
  40. data/spec/models/new_job_spec.rb +20 -37
  41. data/spec/models/new_jobs_wrapper_spec.rb +14 -7
  42. data/spec/models/start_spec.rb +14 -7
  43. data/spec/spec_helper.rb +122 -0
  44. metadata +9 -2
@@ -3,26 +3,37 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.3.10
6
+ OpenAPI spec version: 0.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
10
21
 
11
22
  =end
12
23
 
13
24
  require 'date'
14
25
 
15
26
  module IronTitan
27
+
16
28
  class Start
17
29
  # Time when job started execution. Always in UTC.
18
30
  attr_accessor :started_at
19
31
 
32
+
20
33
  # Attribute mapping from ruby-style variable name to JSON key.
21
34
  def self.attribute_map
22
35
  {
23
-
24
36
  :'started_at' => :'started_at'
25
-
26
37
  }
27
38
  end
28
39
 
@@ -30,24 +41,38 @@ module IronTitan
30
41
  def self.swagger_types
31
42
  {
32
43
  :'started_at' => :'DateTime'
33
-
34
44
  }
35
45
  end
36
46
 
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
37
49
  def initialize(attributes = {})
38
50
  return unless attributes.is_a?(Hash)
39
51
 
40
52
  # convert string to symbol for hash key
41
- attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
53
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
42
54
 
43
-
44
- if attributes[:'started_at']
55
+ if attributes.has_key?(:'started_at')
45
56
  self.started_at = attributes[:'started_at']
46
57
  end
47
-
58
+
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properies with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ return invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ return true
48
72
  end
49
73
 
50
- # Check equality by comparing each attribute.
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
51
76
  def ==(o)
52
77
  return true if self.equal?(o)
53
78
  self.class == o.class &&
@@ -55,35 +80,41 @@ module IronTitan
55
80
  end
56
81
 
57
82
  # @see the `==` method
83
+ # @param [Object] Object to be compared
58
84
  def eql?(o)
59
85
  self == o
60
86
  end
61
87
 
62
- # Calculate hash code according to all attributes.
88
+ # Calculates hash code according to all attributes.
89
+ # @return [Fixnum] Hash code
63
90
  def hash
64
91
  [started_at].hash
65
92
  end
66
93
 
67
- # build the object from hash
94
+ # Builds the object from hash
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ # @return [Object] Returns the model itself
68
97
  def build_from_hash(attributes)
69
98
  return nil unless attributes.is_a?(Hash)
70
99
  self.class.swagger_types.each_pair do |key, type|
71
100
  if type =~ /^Array<(.*)>/i
101
+ # check to ensure the input is an array given that the the attribute
102
+ # is documented as an array but the input is not
72
103
  if attributes[self.class.attribute_map[key]].is_a?(Array)
73
104
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
74
- else
75
- #TODO show warning in debug mode
76
105
  end
77
106
  elsif !attributes[self.class.attribute_map[key]].nil?
78
107
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
79
- else
80
- # data not found in attributes(hash), not an issue as the data can be optional
81
- end
108
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
82
109
  end
83
110
 
84
111
  self
85
112
  end
86
113
 
114
+ # Deserializes the data based on type
115
+ # @param string type Data type
116
+ # @param string value Value to be deserialized
117
+ # @return [Object] Deserialized data
87
118
  def _deserialize(type, value)
88
119
  case type.to_sym
89
120
  when :DateTime
@@ -117,21 +148,25 @@ module IronTitan
117
148
  end
118
149
  end
119
150
  else # model
120
- _model = IronTitan.const_get(type).new
121
- _model.build_from_hash(value)
151
+ temp_model = IronTitan.const_get(type).new
152
+ temp_model.build_from_hash(value)
122
153
  end
123
154
  end
124
155
 
156
+ # Returns the string representation of the object
157
+ # @return [String] String presentation of the object
125
158
  def to_s
126
159
  to_hash.to_s
127
160
  end
128
161
 
129
- # to_body is an alias to to_body (backward compatibility))
162
+ # to_body is an alias to to_hash (backward compatibility)
163
+ # @return [Hash] Returns the object in the form of hash
130
164
  def to_body
131
165
  to_hash
132
166
  end
133
167
 
134
- # return the object in the form of hash
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
135
170
  def to_hash
136
171
  hash = {}
137
172
  self.class.attribute_map.each_pair do |attr, param|
@@ -142,8 +177,10 @@ module IronTitan
142
177
  hash
143
178
  end
144
179
 
145
- # Method to output non-array value in the form of hash
180
+ # Outputs non-array value in the form of hash
146
181
  # For object, use to_hash. Otherwise, just return the value
182
+ # @param [Object] value Any valid value
183
+ # @return [Hash] Returns the value in the form of hash
147
184
  def _to_hash(value)
148
185
  if value.is_a?(Array)
149
186
  value.compact.map{ |v| _to_hash(v) }
@@ -159,4 +196,5 @@ module IronTitan
159
196
  end
160
197
 
161
198
  end
199
+
162
200
  end
@@ -3,13 +3,24 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.3.10
6
+ OpenAPI spec version: 0.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
10
21
 
11
22
  =end
12
23
 
13
24
  module IronTitan
14
- VERSION = "0.3.10"
25
+ VERSION = "0.4.0"
15
26
  end
data/lib/iron_titan.rb CHANGED
@@ -3,10 +3,21 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.3.10
6
+ OpenAPI spec version: 0.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
10
21
 
11
22
  =end
12
23
 
@@ -3,10 +3,21 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.3.10
6
+ OpenAPI spec version: 0.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
10
21
 
11
22
  =end
12
23
 
@@ -28,7 +39,7 @@ describe 'GroupsApi' do
28
39
 
29
40
  describe 'test an instance of GroupsApi' do
30
41
  it 'should create an instact of GroupsApi' do
31
- @instance.should be_a(IronTitan::GroupsApi)
42
+ expect(@instance).to be_instance_of(IronTitan::GroupsApi)
32
43
  end
33
44
  end
34
45
 
@@ -39,11 +50,7 @@ describe 'GroupsApi' do
39
50
  # @return [GroupsWrapper]
40
51
  describe 'groups_get test' do
41
52
  it "should work" do
42
- # assertion here
43
- # should be_a()
44
- # should be_nil
45
- # should ==
46
- # should_not ==
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
54
  end
48
55
  end
49
56
 
@@ -55,11 +62,7 @@ describe 'GroupsApi' do
55
62
  # @return [GroupWrapper]
56
63
  describe 'groups_name_get test' do
57
64
  it "should work" do
58
- # assertion here
59
- # should be_a()
60
- # should be_nil
61
- # should ==
62
- # should_not ==
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
66
  end
64
67
  end
65
68
 
@@ -71,11 +74,7 @@ describe 'GroupsApi' do
71
74
  # @return [GroupWrapper]
72
75
  describe 'groups_post test' do
73
76
  it "should work" do
74
- # assertion here
75
- # should be_a()
76
- # should be_nil
77
- # should ==
78
- # should_not ==
77
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
78
  end
80
79
  end
81
80
 
@@ -3,10 +3,21 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.3.10
6
+ OpenAPI spec version: 0.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
10
21
 
11
22
  =end
12
23
 
@@ -28,7 +39,7 @@ describe 'JobsApi' do
28
39
 
29
40
  describe 'test an instance of JobsApi' do
30
41
  it 'should create an instact of JobsApi' do
31
- @instance.should be_a(IronTitan::JobsApi)
42
+ expect(@instance).to be_instance_of(IronTitan::JobsApi)
32
43
  end
33
44
  end
34
45
 
@@ -42,51 +53,39 @@ describe 'JobsApi' do
42
53
  # @return [JobsWrapper]
43
54
  describe 'groups_name_jobs_get test' do
44
55
  it "should work" do
45
- # assertion here
46
- # should be_a()
47
- # should be_nil
48
- # should ==
49
- # should_not ==
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
57
  end
51
58
  end
52
59
 
53
60
  # unit tests for groups_name_jobs_id_cancel_post
54
61
  # Cancel a job.
55
- # Cancels a job in delayed, queued or running status. The worker may continue to run a running job. reason is set to `client_request`. The job&#39;s completed_at field is set to the current time on the jobserver.
62
+ # Cancels a job in delayed, queued or running status. The worker may continue to run a running job. reason is set to &#x60;client_request&#x60;. The job&#39;s completed_at field is set to the current time on the jobserver.
56
63
  # @param name Name of group for this set of jobs.
57
64
  # @param id Job id
58
65
  # @param [Hash] opts the optional parameters
59
66
  # @return [JobWrapper]
60
67
  describe 'groups_name_jobs_id_cancel_post test' do
61
68
  it "should work" do
62
- # assertion here
63
- # should be_a()
64
- # should be_nil
65
- # should ==
66
- # should_not ==
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
70
  end
68
71
  end
69
72
 
70
73
  # unit tests for groups_name_jobs_id_delete
71
74
  # Delete the job.
72
- # Delete only succeeds if job status is one of `succeeded\n| failed | cancelled`. Cancel a job if it is another state and needs to\nbe deleted. All information about the job, including the log, is\nirretrievably lost when this is invoked.\n
75
+ # Delete only succeeds if job status is one of &#x60;succeeded | failed | cancelled&#x60;. Cancel a job if it is another state and needs to be deleted. All information about the job, including the log, is irretrievably lost when this is invoked.
73
76
  # @param name Name of group for this set of jobs.
74
77
  # @param id Job id
75
78
  # @param [Hash] opts the optional parameters
76
79
  # @return [nil]
77
80
  describe 'groups_name_jobs_id_delete test' do
78
81
  it "should work" do
79
- # assertion here
80
- # should be_a()
81
- # should be_nil
82
- # should ==
83
- # should_not ==
82
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
84
83
  end
85
84
  end
86
85
 
87
86
  # unit tests for groups_name_jobs_id_error_post
88
87
  # Mark job as failed.
89
- # Job is marked as failed if it was in a valid state. Job&#39;s `finished_at` time is initialized.
88
+ # Job is marked as failed if it was in a valid state. Job&#39;s &#x60;finished_at&#x60; time is initialized.
90
89
  # @param name Name of group for this set of jobs.
91
90
  # @param id Job id
92
91
  # @param body
@@ -94,11 +93,7 @@ describe 'JobsApi' do
94
93
  # @return [JobWrapper]
95
94
  describe 'groups_name_jobs_id_error_post test' do
96
95
  it "should work" do
97
- # assertion here
98
- # should be_a()
99
- # should be_nil
100
- # should ==
101
- # should_not ==
96
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
102
97
  end
103
98
  end
104
99
 
@@ -111,11 +106,7 @@ describe 'JobsApi' do
111
106
  # @return [JobWrapper]
112
107
  describe 'groups_name_jobs_id_get test' do
113
108
  it "should work" do
114
- # assertion here
115
- # should be_a()
116
- # should be_nil
117
- # should ==
118
- # should_not ==
109
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
119
110
  end
120
111
  end
121
112
 
@@ -128,11 +119,7 @@ describe 'JobsApi' do
128
119
  # @return [String]
129
120
  describe 'groups_name_jobs_id_log_get test' do
130
121
  it "should work" do
131
- # assertion here
132
- # should be_a()
133
- # should be_nil
134
- # should ==
135
- # should_not ==
122
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
136
123
  end
137
124
  end
138
125
 
@@ -141,39 +128,31 @@ describe 'JobsApi' do
141
128
  # Logs are sent after a job completes since they may be very large and the runner can process the next job.
142
129
  # @param name Name of group for this set of jobs.
143
130
  # @param id Job id
144
- # @param log Output log for the job. Content-Type must be \&quot;text/plain; charset=utf-8\&quot;.
131
+ # @param log Output log for the job. Content-Type must be \&quot;text/plain; charset&#x3D;utf-8\&quot;.
145
132
  # @param [Hash] opts the optional parameters
146
133
  # @return [JobWrapper]
147
134
  describe 'groups_name_jobs_id_log_post test' do
148
135
  it "should work" do
149
- # assertion here
150
- # should be_a()
151
- # should be_nil
152
- # should ==
153
- # should_not ==
136
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
154
137
  end
155
138
  end
156
139
 
157
140
  # unit tests for groups_name_jobs_id_retry_post
158
141
  # Retry a job.
159
- # \&quot;The /retry endpoint can be used to force a retry of jobs\nwith status succeeded or cancelled. It can also be used to retry jobs\nthat in the failed state, but whose max_retries field is 0. The retried\njob will continue to have max_retries = 0.\&quot;\n
142
+ # \&quot;The /retry endpoint can be used to force a retry of jobs with status succeeded or cancelled. It can also be used to retry jobs that in the failed state, but whose max_retries field is 0. The retried job will continue to have max_retries &#x3D; 0.\&quot;
160
143
  # @param name Name of group for this set of jobs.
161
144
  # @param id Job id
162
145
  # @param [Hash] opts the optional parameters
163
146
  # @return [JobWrapper]
164
147
  describe 'groups_name_jobs_id_retry_post test' do
165
148
  it "should work" do
166
- # assertion here
167
- # should be_a()
168
- # should be_nil
169
- # should ==
170
- # should_not ==
149
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
171
150
  end
172
151
  end
173
152
 
174
153
  # unit tests for groups_name_jobs_id_start_post
175
- # Mark job as started, ie: status = &#39;running&#39;
176
- # Job status is changed to &#39;running&#39; if it was in a valid state before. Job&#39;s `started_at` time is initialized.
154
+ # Mark job as started, ie: status &#x3D; &#39;running&#39;
155
+ # Job status is changed to &#39;running&#39; if it was in a valid state before. Job&#39;s &#x60;started_at&#x60; time is initialized.
177
156
  # @param name Name of group for this set of jobs.
178
157
  # @param id Job id
179
158
  # @param body
@@ -181,17 +160,13 @@ describe 'JobsApi' do
181
160
  # @return [JobWrapper]
182
161
  describe 'groups_name_jobs_id_start_post test' do
183
162
  it "should work" do
184
- # assertion here
185
- # should be_a()
186
- # should be_nil
187
- # should ==
188
- # should_not ==
163
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
189
164
  end
190
165
  end
191
166
 
192
167
  # unit tests for groups_name_jobs_id_success_post
193
168
  # Mark job as succeeded.
194
- # Job status is changed to succeeded if it was in a valid state before. Job&#39;s `completed_at` time is initialized.
169
+ # Job status is changed to succeeded if it was in a valid state before. Job&#39;s &#x60;completed_at&#x60; time is initialized.
195
170
  # @param name Name of group for this set of jobs.
196
171
  # @param id Job id
197
172
  # @param body
@@ -199,61 +174,45 @@ describe 'JobsApi' do
199
174
  # @return [JobWrapper]
200
175
  describe 'groups_name_jobs_id_success_post test' do
201
176
  it "should work" do
202
- # assertion here
203
- # should be_a()
204
- # should be_nil
205
- # should ==
206
- # should_not ==
177
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
207
178
  end
208
179
  end
209
180
 
210
181
  # unit tests for groups_name_jobs_id_touch_post
211
182
  # Extend job timeout.
212
- # Consumers can sometimes take a while to run the task after accepting it. An example is when the runner does not have the docker image locally, it can spend a significant time downloading the image.\nIf the timeout is small, the job may never get to run, or run but not be accepted by Titan. Consumers can touch the job before it times out. Titan will reset the timeout, giving the consumer another timeout seconds to run the job.\nTouch is only valid while the job is in a running state. If touch fails, the runner may stop running the job.\n
183
+ # Consumers can sometimes take a while to run the task after accepting it. An example is when the runner does not have the docker image locally, it can spend a significant time downloading the image. If the timeout is small, the job may never get to run, or run but not be accepted by Titan. Consumers can touch the job before it times out. Titan will reset the timeout, giving the consumer another timeout seconds to run the job. Touch is only valid while the job is in a running state. If touch fails, the runner may stop running the job.
213
184
  # @param name Name of group for this set of jobs.
214
185
  # @param id Job id
215
186
  # @param [Hash] opts the optional parameters
216
187
  # @return [nil]
217
188
  describe 'groups_name_jobs_id_touch_post test' do
218
189
  it "should work" do
219
- # assertion here
220
- # should be_a()
221
- # should be_nil
222
- # should ==
223
- # should_not ==
190
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
224
191
  end
225
192
  end
226
193
 
227
194
  # unit tests for groups_name_jobs_post
228
195
  # Enqueue Job
229
- # Enqueues job(s). If any of the jobs is invalid, none of the jobs are enqueued.\n
196
+ # Enqueues job(s). If any of the jobs is invalid, none of the jobs are enqueued.
230
197
  # @param name name of the group.
231
198
  # @param body Array of jobs to post.
232
199
  # @param [Hash] opts the optional parameters
233
200
  # @return [JobsWrapper]
234
201
  describe 'groups_name_jobs_post test' do
235
202
  it "should work" do
236
- # assertion here
237
- # should be_a()
238
- # should be_nil
239
- # should ==
240
- # should_not ==
203
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
241
204
  end
242
205
  end
243
206
 
244
207
  # unit tests for jobs_get
245
208
  # Get next job.
246
- # Gets the next job in the queue, ready for processing. Titan may return &lt;=n jobs. Consumers should start processing jobs in order. Each returned job is set to `status` \&quot;running\&quot; and `started_at` is set to the current time. No other consumer can retrieve this job.
209
+ # Gets the next job in the queue, ready for processing. Titan may return &lt;&#x3D;n jobs. Consumers should start processing jobs in order. Each returned job is set to &#x60;status&#x60; \&quot;running\&quot; and &#x60;started_at&#x60; is set to the current time. No other consumer can retrieve this job.
247
210
  # @param [Hash] opts the optional parameters
248
211
  # @option opts [Integer] :n Number of jobs to return.
249
212
  # @return [JobsWrapper]
250
213
  describe 'jobs_get test' do
251
214
  it "should work" do
252
- # assertion here
253
- # should be_a()
254
- # should be_nil
255
- # should ==
256
- # should_not ==
215
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
257
216
  end
258
217
  end
259
218
 
@@ -3,10 +3,21 @@ Titan API
3
3
 
4
4
  The ultimate, language agnostic, container based job processing framework.
5
5
 
6
- OpenAPI spec version: 0.3.10
6
+ OpenAPI spec version: 0.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
10
21
 
11
22
  =end
12
23
 
@@ -28,13 +39,13 @@ describe 'RunnerApi' do
28
39
 
29
40
  describe 'test an instance of RunnerApi' do
30
41
  it 'should create an instact of RunnerApi' do
31
- @instance.should be_a(IronTitan::RunnerApi)
42
+ expect(@instance).to be_instance_of(IronTitan::RunnerApi)
32
43
  end
33
44
  end
34
45
 
35
46
  # unit tests for groups_name_jobs_id_error_post
36
47
  # Mark job as failed.
37
- # Job is marked as failed if it was in a valid state. Job&#39;s `finished_at` time is initialized.
48
+ # Job is marked as failed if it was in a valid state. Job&#39;s &#x60;finished_at&#x60; time is initialized.
38
49
  # @param name Name of group for this set of jobs.
39
50
  # @param id Job id
40
51
  # @param body
@@ -42,17 +53,13 @@ describe 'RunnerApi' do
42
53
  # @return [JobWrapper]
43
54
  describe 'groups_name_jobs_id_error_post test' do
44
55
  it "should work" do
45
- # assertion here
46
- # should be_a()
47
- # should be_nil
48
- # should ==
49
- # should_not ==
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
57
  end
51
58
  end
52
59
 
53
60
  # unit tests for groups_name_jobs_id_start_post
54
- # Mark job as started, ie: status = &#39;running&#39;
55
- # Job status is changed to &#39;running&#39; if it was in a valid state before. Job&#39;s `started_at` time is initialized.
61
+ # Mark job as started, ie: status &#x3D; &#39;running&#39;
62
+ # Job status is changed to &#39;running&#39; if it was in a valid state before. Job&#39;s &#x60;started_at&#x60; time is initialized.
56
63
  # @param name Name of group for this set of jobs.
57
64
  # @param id Job id
58
65
  # @param body
@@ -60,17 +67,13 @@ describe 'RunnerApi' do
60
67
  # @return [JobWrapper]
61
68
  describe 'groups_name_jobs_id_start_post test' do
62
69
  it "should work" do
63
- # assertion here
64
- # should be_a()
65
- # should be_nil
66
- # should ==
67
- # should_not ==
70
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
71
  end
69
72
  end
70
73
 
71
74
  # unit tests for groups_name_jobs_id_success_post
72
75
  # Mark job as succeeded.
73
- # Job status is changed to succeeded if it was in a valid state before. Job&#39;s `completed_at` time is initialized.
76
+ # Job status is changed to succeeded if it was in a valid state before. Job&#39;s &#x60;completed_at&#x60; time is initialized.
74
77
  # @param name Name of group for this set of jobs.
75
78
  # @param id Job id
76
79
  # @param body
@@ -78,11 +81,7 @@ describe 'RunnerApi' do
78
81
  # @return [JobWrapper]
79
82
  describe 'groups_name_jobs_id_success_post test' do
80
83
  it "should work" do
81
- # assertion here
82
- # should be_a()
83
- # should be_nil
84
- # should ==
85
- # should_not ==
84
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
85
  end
87
86
  end
88
87