dkron-rb 0.11.2 → 1.0.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.
Files changed (73) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +0 -0
  3. data/README.md +8 -7
  4. data/Rakefile +0 -4
  5. data/dkron-rb.gemspec +10 -11
  6. data/docs/DefaultApi.md +0 -0
  7. data/docs/Execution.md +0 -0
  8. data/docs/ExecutionsApi.md +1 -1
  9. data/docs/ExecutorConfig.md +0 -0
  10. data/docs/Job.md +0 -0
  11. data/docs/JobsApi.md +60 -6
  12. data/docs/Member.md +0 -0
  13. data/docs/MembersApi.md +0 -0
  14. data/docs/Processors.md +0 -0
  15. data/docs/Status.md +3 -0
  16. data/git_push.sh +3 -3
  17. data/lib/dkron-rb.rb +2 -2
  18. data/lib/dkron-rb/api/default_api.rb +12 -21
  19. data/lib/dkron-rb/api/executions_api.rb +6 -9
  20. data/lib/dkron-rb/api/jobs_api.rb +73 -33
  21. data/lib/dkron-rb/api/members_api.rb +6 -9
  22. data/lib/dkron-rb/api_client.rb +10 -10
  23. data/lib/dkron-rb/api_error.rb +2 -2
  24. data/lib/dkron-rb/configuration.rb +3 -3
  25. data/lib/dkron-rb/models/execution.rb +7 -11
  26. data/lib/dkron-rb/models/executor_config.rb +7 -11
  27. data/lib/dkron-rb/models/job.rb +9 -13
  28. data/lib/dkron-rb/models/member.rb +7 -11
  29. data/lib/dkron-rb/models/processors.rb +7 -11
  30. data/lib/dkron-rb/models/status.rb +37 -11
  31. data/lib/dkron-rb/version.rb +3 -3
  32. data/spec/api/default_api_spec.rb +5 -8
  33. data/spec/api/executions_api_spec.rb +3 -4
  34. data/spec/api/jobs_api_spec.rb +19 -12
  35. data/spec/api/members_api_spec.rb +3 -4
  36. data/spec/api_client_spec.rb +36 -36
  37. data/spec/configuration_spec.rb +10 -10
  38. data/spec/models/execution_spec.rb +8 -9
  39. data/spec/models/executor_config_spec.rb +2 -3
  40. data/spec/models/job_spec.rb +20 -21
  41. data/spec/models/member_spec.rb +13 -14
  42. data/spec/models/processors_spec.rb +2 -3
  43. data/spec/models/status_spec.rb +20 -3
  44. data/spec/spec_helper.rb +2 -2
  45. metadata +18 -45
  46. data/Gemfile.lock +0 -67
  47. data/LICENSE +0 -201
  48. data/bin/console +0 -14
  49. data/bin/setup +0 -8
  50. data/config.json +0 -5
  51. data/docs/Agent.md +0 -7
  52. data/docs/ExecutorShell.md +0 -10
  53. data/docs/InlineResponse200.md +0 -10
  54. data/docs/MainApi.md +0 -90
  55. data/docs/ProcessorFiles.md +0 -9
  56. data/docs/ProcessorLog.md +0 -8
  57. data/docs/ProcessorSyslog.md +0 -8
  58. data/docs/Serf.md +0 -7
  59. data/docs/Tags.md +0 -7
  60. data/lib/dkron-rb/cron.rb +0 -152
  61. data/lib/dkron-rb/models/agent.rb +0 -152
  62. data/lib/dkron-rb/models/executor_shell.rb +0 -208
  63. data/lib/dkron-rb/models/inline_response_200.rb +0 -181
  64. data/lib/dkron-rb/models/processor_files.rb +0 -198
  65. data/lib/dkron-rb/models/processor_log.rb +0 -189
  66. data/lib/dkron-rb/models/processor_syslog.rb +0 -189
  67. data/lib/dkron-rb/models/serf.rb +0 -152
  68. data/lib/dkron-rb/models/tags.rb +0 -152
  69. data/lib/dkron-rb/numeric_seconds.rb +0 -48
  70. data/lib/dkron.rb +0 -9
  71. data/node_modules/isarray/build/build.js +0 -209
  72. data/node_modules/mime/build/build.js +0 -11
  73. data/node_modules/mime/build/test.js +0 -57
@@ -3,14 +3,14 @@
3
3
 
4
4
  #You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`. Dkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
5
5
 
6
- OpenAPI spec version: 0.11.2
6
+ OpenAPI spec version: 1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.2
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module Dkron
16
16
  class JobsApi
@@ -19,32 +19,29 @@ module Dkron
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
- #
24
22
  # Create or updates a new job.
25
23
  # @param body Updated job object
26
24
  # @param [Hash] opts the optional parameters
27
25
  # @return [Job]
28
26
  def create_or_update_job(body, opts = {})
29
27
  data, _status_code, _headers = create_or_update_job_with_http_info(body, opts)
30
- return data
28
+ data
31
29
  end
32
30
 
33
- #
34
31
  # Create or updates a new job.
35
32
  # @param body Updated job object
36
33
  # @param [Hash] opts the optional parameters
37
34
  # @return [Array<(Job, Fixnum, Hash)>] Job data, response status code and response headers
38
35
  def create_or_update_job_with_http_info(body, opts = {})
39
36
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: JobsApi.create_or_update_job ..."
37
+ @api_client.config.logger.debug 'Calling API: JobsApi.create_or_update_job ...'
41
38
  end
42
39
  # verify the required parameter 'body' is set
43
40
  if @api_client.config.client_side_validation && body.nil?
44
41
  fail ArgumentError, "Missing the required parameter 'body' when calling JobsApi.create_or_update_job"
45
42
  end
46
43
  # resource path
47
- local_var_path = "/jobs"
44
+ local_var_path = '/jobs'
48
45
 
49
46
  # query parameters
50
47
  query_params = {}
@@ -74,32 +71,29 @@ module Dkron
74
71
  end
75
72
  return data, status_code, headers
76
73
  end
77
-
78
- #
79
74
  # Delete a job.
80
75
  # @param job_name The job that needs to be deleted.
81
76
  # @param [Hash] opts the optional parameters
82
77
  # @return [Job]
83
78
  def delete_job(job_name, opts = {})
84
79
  data, _status_code, _headers = delete_job_with_http_info(job_name, opts)
85
- return data
80
+ data
86
81
  end
87
82
 
88
- #
89
83
  # Delete a job.
90
84
  # @param job_name The job that needs to be deleted.
91
85
  # @param [Hash] opts the optional parameters
92
86
  # @return [Array<(Job, Fixnum, Hash)>] Job data, response status code and response headers
93
87
  def delete_job_with_http_info(job_name, opts = {})
94
88
  if @api_client.config.debugging
95
- @api_client.config.logger.debug "Calling API: JobsApi.delete_job ..."
89
+ @api_client.config.logger.debug 'Calling API: JobsApi.delete_job ...'
96
90
  end
97
91
  # verify the required parameter 'job_name' is set
98
92
  if @api_client.config.client_side_validation && job_name.nil?
99
93
  fail ArgumentError, "Missing the required parameter 'job_name' when calling JobsApi.delete_job"
100
94
  end
101
95
  # resource path
102
- local_var_path = "/jobs/{job_name}".sub('{' + 'job_name' + '}', job_name.to_s)
96
+ local_var_path = '/jobs/{job_name}'.sub('{' + 'job_name' + '}', job_name.to_s)
103
97
 
104
98
  # query parameters
105
99
  query_params = {}
@@ -129,29 +123,29 @@ module Dkron
129
123
  end
130
124
  return data, status_code, headers
131
125
  end
132
-
133
- #
134
126
  # List jobs.
135
127
  # @param [Hash] opts the optional parameters
128
+ # @option opts [Array<String>] :tags Filter jobs by tags
136
129
  # @return [Array<Job>]
137
130
  def get_jobs(opts = {})
138
131
  data, _status_code, _headers = get_jobs_with_http_info(opts)
139
- return data
132
+ data
140
133
  end
141
134
 
142
- #
143
135
  # List jobs.
144
136
  # @param [Hash] opts the optional parameters
137
+ # @option opts [Array<String>] :tags Filter jobs by tags
145
138
  # @return [Array<(Array<Job>, Fixnum, Hash)>] Array<Job> data, response status code and response headers
146
139
  def get_jobs_with_http_info(opts = {})
147
140
  if @api_client.config.debugging
148
- @api_client.config.logger.debug "Calling API: JobsApi.get_jobs ..."
141
+ @api_client.config.logger.debug 'Calling API: JobsApi.get_jobs ...'
149
142
  end
150
143
  # resource path
151
- local_var_path = "/jobs"
144
+ local_var_path = '/jobs'
152
145
 
153
146
  # query parameters
154
147
  query_params = {}
148
+ query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
155
149
 
156
150
  # header parameters
157
151
  header_params = {}
@@ -178,32 +172,29 @@ module Dkron
178
172
  end
179
173
  return data, status_code, headers
180
174
  end
181
-
182
- #
183
175
  # Executes a job.
184
176
  # @param job_name The job that needs to be run.
185
177
  # @param [Hash] opts the optional parameters
186
178
  # @return [Job]
187
179
  def run_job(job_name, opts = {})
188
180
  data, _status_code, _headers = run_job_with_http_info(job_name, opts)
189
- return data
181
+ data
190
182
  end
191
183
 
192
- #
193
184
  # Executes a job.
194
185
  # @param job_name The job that needs to be run.
195
186
  # @param [Hash] opts the optional parameters
196
187
  # @return [Array<(Job, Fixnum, Hash)>] Job data, response status code and response headers
197
188
  def run_job_with_http_info(job_name, opts = {})
198
189
  if @api_client.config.debugging
199
- @api_client.config.logger.debug "Calling API: JobsApi.run_job ..."
190
+ @api_client.config.logger.debug 'Calling API: JobsApi.run_job ...'
200
191
  end
201
192
  # verify the required parameter 'job_name' is set
202
193
  if @api_client.config.client_side_validation && job_name.nil?
203
194
  fail ArgumentError, "Missing the required parameter 'job_name' when calling JobsApi.run_job"
204
195
  end
205
196
  # resource path
206
- local_var_path = "/jobs/{job_name}".sub('{' + 'job_name' + '}', job_name.to_s)
197
+ local_var_path = '/jobs/{job_name}'.sub('{' + 'job_name' + '}', job_name.to_s)
207
198
 
208
199
  # query parameters
209
200
  query_params = {}
@@ -233,32 +224,29 @@ module Dkron
233
224
  end
234
225
  return data, status_code, headers
235
226
  end
236
-
237
- #
238
227
  # Show a job.
239
228
  # @param job_name The job that needs to be fetched.
240
229
  # @param [Hash] opts the optional parameters
241
230
  # @return [Job]
242
231
  def show_job_by_name(job_name, opts = {})
243
232
  data, _status_code, _headers = show_job_by_name_with_http_info(job_name, opts)
244
- return data
233
+ data
245
234
  end
246
235
 
247
- #
248
236
  # Show a job.
249
237
  # @param job_name The job that needs to be fetched.
250
238
  # @param [Hash] opts the optional parameters
251
239
  # @return [Array<(Job, Fixnum, Hash)>] Job data, response status code and response headers
252
240
  def show_job_by_name_with_http_info(job_name, opts = {})
253
241
  if @api_client.config.debugging
254
- @api_client.config.logger.debug "Calling API: JobsApi.show_job_by_name ..."
242
+ @api_client.config.logger.debug 'Calling API: JobsApi.show_job_by_name ...'
255
243
  end
256
244
  # verify the required parameter 'job_name' is set
257
245
  if @api_client.config.client_side_validation && job_name.nil?
258
246
  fail ArgumentError, "Missing the required parameter 'job_name' when calling JobsApi.show_job_by_name"
259
247
  end
260
248
  # resource path
261
- local_var_path = "/jobs/{job_name}".sub('{' + 'job_name' + '}', job_name.to_s)
249
+ local_var_path = '/jobs/{job_name}'.sub('{' + 'job_name' + '}', job_name.to_s)
262
250
 
263
251
  # query parameters
264
252
  query_params = {}
@@ -288,5 +276,57 @@ module Dkron
288
276
  end
289
277
  return data, status_code, headers
290
278
  end
279
+ # Toggle a job.
280
+ # @param job_name The job that needs to be toggled.
281
+ # @param [Hash] opts the optional parameters
282
+ # @return [Job]
283
+ def toggle_job(job_name, opts = {})
284
+ data, _status_code, _headers = toggle_job_with_http_info(job_name, opts)
285
+ data
286
+ end
287
+
288
+ # Toggle a job.
289
+ # @param job_name The job that needs to be toggled.
290
+ # @param [Hash] opts the optional parameters
291
+ # @return [Array<(Job, Fixnum, Hash)>] Job data, response status code and response headers
292
+ def toggle_job_with_http_info(job_name, opts = {})
293
+ if @api_client.config.debugging
294
+ @api_client.config.logger.debug 'Calling API: JobsApi.toggle_job ...'
295
+ end
296
+ # verify the required parameter 'job_name' is set
297
+ if @api_client.config.client_side_validation && job_name.nil?
298
+ fail ArgumentError, "Missing the required parameter 'job_name' when calling JobsApi.toggle_job"
299
+ end
300
+ # resource path
301
+ local_var_path = '/jobs/{job_name}/toggle'.sub('{' + 'job_name' + '}', job_name.to_s)
302
+
303
+ # query parameters
304
+ query_params = {}
305
+
306
+ # header parameters
307
+ header_params = {}
308
+ # HTTP header 'Accept' (if needed)
309
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
310
+ # HTTP header 'Content-Type'
311
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
312
+
313
+ # form parameters
314
+ form_params = {}
315
+
316
+ # http body (model)
317
+ post_body = nil
318
+ auth_names = []
319
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
320
+ :header_params => header_params,
321
+ :query_params => query_params,
322
+ :form_params => form_params,
323
+ :body => post_body,
324
+ :auth_names => auth_names,
325
+ :return_type => 'Job')
326
+ if @api_client.config.debugging
327
+ @api_client.config.logger.debug "API called: JobsApi#toggle_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
328
+ end
329
+ return data, status_code, headers
330
+ end
291
331
  end
292
332
  end
@@ -3,14 +3,14 @@
3
3
 
4
4
  #You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`. Dkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
5
5
 
6
- OpenAPI spec version: 0.11.2
6
+ OpenAPI spec version: 1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.2
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module Dkron
16
16
  class MembersApi
@@ -19,26 +19,23 @@ module Dkron
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
- #
24
22
  # List members.
25
23
  # @param [Hash] opts the optional parameters
26
24
  # @return [Array<Member>]
27
25
  def get_member(opts = {})
28
26
  data, _status_code, _headers = get_member_with_http_info(opts)
29
- return data
27
+ data
30
28
  end
31
29
 
32
- #
33
30
  # List members.
34
31
  # @param [Hash] opts the optional parameters
35
32
  # @return [Array<(Array<Member>, Fixnum, Hash)>] Array<Member> data, response status code and response headers
36
33
  def get_member_with_http_info(opts = {})
37
34
  if @api_client.config.debugging
38
- @api_client.config.logger.debug "Calling API: MembersApi.get_member ..."
35
+ @api_client.config.logger.debug 'Calling API: MembersApi.get_member ...'
39
36
  end
40
37
  # resource path
41
- local_var_path = "/members"
38
+ local_var_path = '/members'
42
39
 
43
40
  # query parameters
44
41
  query_params = {}
@@ -3,10 +3,10 @@
3
3
 
4
4
  #You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`. Dkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
5
5
 
6
- OpenAPI spec version: 0.11.2
6
+ OpenAPI spec version: 1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.2
10
10
 
11
11
  =end
12
12
 
@@ -33,7 +33,7 @@ module Dkron
33
33
  @config = config
34
34
  @user_agent = "Swagger-Codegen/#{VERSION}/ruby"
35
35
  @default_headers = {
36
- 'Content-Type' => "application/json",
36
+ 'Content-Type' => 'application/json',
37
37
  'User-Agent' => @user_agent
38
38
  }
39
39
  end
@@ -136,7 +136,7 @@ module Dkron
136
136
  # @param [String] mime MIME
137
137
  # @return [Boolean] True if the MIME is application/json
138
138
  def json_mime?(mime)
139
- (mime == "*/*") || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
139
+ (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
140
140
  end
141
141
 
142
142
  # Deserialize the response to the given return type.
@@ -200,12 +200,12 @@ module Dkron
200
200
  when /\AArray<(.+)>\z/
201
201
  # e.g. Array<Pet>
202
202
  sub_type = $1
203
- data.map {|item| convert_to_type(item, sub_type) }
203
+ data.map { |item| convert_to_type(item, sub_type) }
204
204
  when /\AHash\<String, (.+)\>\z/
205
205
  # e.g. Hash<String, Integer>
206
206
  sub_type = $1
207
207
  {}.tap do |hash|
208
- data.each {|k, v| hash[k] = convert_to_type(v, sub_type) }
208
+ data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
209
209
  end
210
210
  else
211
211
  # models, e.g. Pet
@@ -227,7 +227,7 @@ module Dkron
227
227
  encoding = nil
228
228
  request.on_headers do |response|
229
229
  content_disposition = response.headers['Content-Disposition']
230
- if content_disposition and content_disposition =~ /filename=/i
230
+ if content_disposition && content_disposition =~ /filename=/i
231
231
  filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
232
232
  prefix = sanitize_filename(filename)
233
233
  else
@@ -326,7 +326,7 @@ module Dkron
326
326
  return nil if accepts.nil? || accepts.empty?
327
327
  # use JSON when present, otherwise use all of the provided
328
328
  json_accept = accepts.find { |s| json_mime?(s) }
329
- return json_accept || accepts.join(',')
329
+ json_accept || accepts.join(',')
330
330
  end
331
331
 
332
332
  # Return Content-Type header based on an array of content types provided.
@@ -337,7 +337,7 @@ module Dkron
337
337
  return 'application/json' if content_types.nil? || content_types.empty?
338
338
  # use JSON when present, otherwise use the first one
339
339
  json_content_type = content_types.find { |s| json_mime?(s) }
340
- return json_content_type || content_types.first
340
+ json_content_type || content_types.first
341
341
  end
342
342
 
343
343
  # Convert object (array, hash, object, etc) to JSON string.
@@ -347,7 +347,7 @@ module Dkron
347
347
  return model if model.nil? || model.is_a?(String)
348
348
  local_body = nil
349
349
  if model.is_a?(Array)
350
- local_body = model.map{|m| object_to_hash(m) }
350
+ local_body = model.map { |m| object_to_hash(m) }
351
351
  else
352
352
  local_body = object_to_hash(model)
353
353
  end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`. Dkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
5
5
 
6
- OpenAPI spec version: 0.11.2
6
+ OpenAPI spec version: 1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.2
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`. Dkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
5
5
 
6
- OpenAPI spec version: 0.11.2
6
+ OpenAPI spec version: 1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.2
10
10
 
11
11
  =end
12
12
 
@@ -170,7 +170,7 @@ module Dkron
170
170
  def base_path=(base_path)
171
171
  # Add leading and trailing slashes to base_path
172
172
  @base_path = "/#{base_path}".gsub(/\/+/, '/')
173
- @base_path = "" if @base_path == "/"
173
+ @base_path = '' if @base_path == '/'
174
174
  end
175
175
 
176
176
  def base_url
@@ -3,10 +3,10 @@
3
3
 
4
4
  #You can communicate with Dkron using a RESTful JSON API over HTTP. Dkron nodes usually listen on port `8080` for API requests. All examples in this section assume that you've found a running leader at `localhost:8080`. Dkron implements a RESTful JSON API over HTTP to communicate with software clients. Dkron listens in port `8080` by default. All examples in this section assume that you're using the default port. Default API responses are unformatted JSON add the `pretty=true` param to format the response.
5
5
 
6
- OpenAPI spec version: 0.11.2
6
+ OpenAPI spec version: 1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.2
10
10
 
11
11
  =end
12
12
 
@@ -33,7 +33,6 @@ module Dkron
33
33
  # name of the node that executed the command
34
34
  attr_accessor :node_name
35
35
 
36
-
37
36
  # Attribute mapping from ruby-style variable name to JSON key.
38
37
  def self.attribute_map
39
38
  {
@@ -64,7 +63,7 @@ module Dkron
64
63
  return unless attributes.is_a?(Hash)
65
64
 
66
65
  # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
66
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
67
 
69
68
  if attributes.has_key?(:'job_name')
70
69
  self.job_name = attributes[:'job_name']
@@ -89,20 +88,19 @@ module Dkron
89
88
  if attributes.has_key?(:'node_name')
90
89
  self.node_name = attributes[:'node_name']
91
90
  end
92
-
93
91
  end
94
92
 
95
93
  # Show invalid properties with the reasons. Usually used together with valid?
96
94
  # @return Array for valid properties with the reasons
97
95
  def list_invalid_properties
98
96
  invalid_properties = Array.new
99
- return invalid_properties
97
+ invalid_properties
100
98
  end
101
99
 
102
100
  # Check to see if the all the properties in the model are valid
103
101
  # @return true if the model is valid
104
102
  def valid?
105
- return true
103
+ true
106
104
  end
107
105
 
108
106
  # Checks equality by comparing each attribute.
@@ -140,7 +138,7 @@ module Dkron
140
138
  # check to ensure the input is an array given that the the attribute
141
139
  # is documented as an array but the input is not
142
140
  if attributes[self.class.attribute_map[key]].is_a?(Array)
143
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
142
  end
145
143
  elsif !attributes[self.class.attribute_map[key]].nil?
146
144
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -222,7 +220,7 @@ module Dkron
222
220
  # @return [Hash] Returns the value in the form of hash
223
221
  def _to_hash(value)
224
222
  if value.is_a?(Array)
225
- value.compact.map{ |v| _to_hash(v) }
223
+ value.compact.map { |v| _to_hash(v) }
226
224
  elsif value.is_a?(Hash)
227
225
  {}.tap do |hash|
228
226
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -233,7 +231,5 @@ module Dkron
233
231
  value
234
232
  end
235
233
  end
236
-
237
234
  end
238
-
239
235
  end