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.
- checksums.yaml +5 -5
- data/Gemfile +0 -0
- data/README.md +8 -7
- data/Rakefile +0 -4
- data/dkron-rb.gemspec +10 -11
- data/docs/DefaultApi.md +0 -0
- data/docs/Execution.md +0 -0
- data/docs/ExecutionsApi.md +1 -1
- data/docs/ExecutorConfig.md +0 -0
- data/docs/Job.md +0 -0
- data/docs/JobsApi.md +60 -6
- data/docs/Member.md +0 -0
- data/docs/MembersApi.md +0 -0
- data/docs/Processors.md +0 -0
- data/docs/Status.md +3 -0
- data/git_push.sh +3 -3
- data/lib/dkron-rb.rb +2 -2
- data/lib/dkron-rb/api/default_api.rb +12 -21
- data/lib/dkron-rb/api/executions_api.rb +6 -9
- data/lib/dkron-rb/api/jobs_api.rb +73 -33
- data/lib/dkron-rb/api/members_api.rb +6 -9
- data/lib/dkron-rb/api_client.rb +10 -10
- data/lib/dkron-rb/api_error.rb +2 -2
- data/lib/dkron-rb/configuration.rb +3 -3
- data/lib/dkron-rb/models/execution.rb +7 -11
- data/lib/dkron-rb/models/executor_config.rb +7 -11
- data/lib/dkron-rb/models/job.rb +9 -13
- data/lib/dkron-rb/models/member.rb +7 -11
- data/lib/dkron-rb/models/processors.rb +7 -11
- data/lib/dkron-rb/models/status.rb +37 -11
- data/lib/dkron-rb/version.rb +3 -3
- data/spec/api/default_api_spec.rb +5 -8
- data/spec/api/executions_api_spec.rb +3 -4
- data/spec/api/jobs_api_spec.rb +19 -12
- data/spec/api/members_api_spec.rb +3 -4
- data/spec/api_client_spec.rb +36 -36
- data/spec/configuration_spec.rb +10 -10
- data/spec/models/execution_spec.rb +8 -9
- data/spec/models/executor_config_spec.rb +2 -3
- data/spec/models/job_spec.rb +20 -21
- data/spec/models/member_spec.rb +13 -14
- data/spec/models/processors_spec.rb +2 -3
- data/spec/models/status_spec.rb +20 -3
- data/spec/spec_helper.rb +2 -2
- metadata +18 -45
- data/Gemfile.lock +0 -67
- data/LICENSE +0 -201
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/config.json +0 -5
- data/docs/Agent.md +0 -7
- data/docs/ExecutorShell.md +0 -10
- data/docs/InlineResponse200.md +0 -10
- data/docs/MainApi.md +0 -90
- data/docs/ProcessorFiles.md +0 -9
- data/docs/ProcessorLog.md +0 -8
- data/docs/ProcessorSyslog.md +0 -8
- data/docs/Serf.md +0 -7
- data/docs/Tags.md +0 -7
- data/lib/dkron-rb/cron.rb +0 -152
- data/lib/dkron-rb/models/agent.rb +0 -152
- data/lib/dkron-rb/models/executor_shell.rb +0 -208
- data/lib/dkron-rb/models/inline_response_200.rb +0 -181
- data/lib/dkron-rb/models/processor_files.rb +0 -198
- data/lib/dkron-rb/models/processor_log.rb +0 -189
- data/lib/dkron-rb/models/processor_syslog.rb +0 -189
- data/lib/dkron-rb/models/serf.rb +0 -152
- data/lib/dkron-rb/models/tags.rb +0 -152
- data/lib/dkron-rb/numeric_seconds.rb +0 -48
- data/lib/dkron.rb +0 -9
- data/node_modules/isarray/build/build.js +0 -209
- data/node_modules/mime/build/build.js +0 -11
- data/node_modules/mime/build/test.js +0 -57
@@ -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:
|
6
|
+
OpenAPI spec version: 1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -15,7 +15,6 @@ require 'date'
|
|
15
15
|
module Dkron
|
16
16
|
# Executor plugin parameters
|
17
17
|
class ExecutorConfig
|
18
|
-
|
19
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
19
|
def self.attribute_map
|
21
20
|
{
|
@@ -34,21 +33,20 @@ module Dkron
|
|
34
33
|
return unless attributes.is_a?(Hash)
|
35
34
|
|
36
35
|
# convert string to symbol for hash key
|
37
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
38
|
-
|
36
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
39
37
|
end
|
40
38
|
|
41
39
|
# Show invalid properties with the reasons. Usually used together with valid?
|
42
40
|
# @return Array for valid properties with the reasons
|
43
41
|
def list_invalid_properties
|
44
42
|
invalid_properties = Array.new
|
45
|
-
|
43
|
+
invalid_properties
|
46
44
|
end
|
47
45
|
|
48
46
|
# Check to see if the all the properties in the model are valid
|
49
47
|
# @return true if the model is valid
|
50
48
|
def valid?
|
51
|
-
|
49
|
+
true
|
52
50
|
end
|
53
51
|
|
54
52
|
# Checks equality by comparing each attribute.
|
@@ -80,7 +78,7 @@ module Dkron
|
|
80
78
|
# check to ensure the input is an array given that the the attribute
|
81
79
|
# is documented as an array but the input is not
|
82
80
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
83
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
81
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
84
82
|
end
|
85
83
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
86
84
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -162,7 +160,7 @@ module Dkron
|
|
162
160
|
# @return [Hash] Returns the value in the form of hash
|
163
161
|
def _to_hash(value)
|
164
162
|
if value.is_a?(Array)
|
165
|
-
value.compact.map{ |v| _to_hash(v) }
|
163
|
+
value.compact.map { |v| _to_hash(v) }
|
166
164
|
elsif value.is_a?(Hash)
|
167
165
|
{}.tap do |hash|
|
168
166
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -173,7 +171,5 @@ module Dkron
|
|
173
171
|
value
|
174
172
|
end
|
175
173
|
end
|
176
|
-
|
177
174
|
end
|
178
|
-
|
179
175
|
end
|
data/lib/dkron-rb/models/job.rb
CHANGED
@@ -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:
|
6
|
+
OpenAPI spec version: 1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -67,7 +67,6 @@ module Dkron
|
|
67
67
|
|
68
68
|
attr_accessor :executor_config
|
69
69
|
|
70
|
-
|
71
70
|
# Attribute mapping from ruby-style variable name to JSON key.
|
72
71
|
def self.attribute_map
|
73
72
|
{
|
@@ -122,7 +121,7 @@ module Dkron
|
|
122
121
|
return unless attributes.is_a?(Hash)
|
123
122
|
|
124
123
|
# convert string to symbol for hash key
|
125
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
124
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
126
125
|
|
127
126
|
if attributes.has_key?(:'name')
|
128
127
|
self.name = attributes[:'name']
|
@@ -199,7 +198,6 @@ module Dkron
|
|
199
198
|
if attributes.has_key?(:'executor_config')
|
200
199
|
self.executor_config = attributes[:'executor_config']
|
201
200
|
end
|
202
|
-
|
203
201
|
end
|
204
202
|
|
205
203
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -207,14 +205,14 @@ module Dkron
|
|
207
205
|
def list_invalid_properties
|
208
206
|
invalid_properties = Array.new
|
209
207
|
if @name.nil?
|
210
|
-
invalid_properties.push(
|
208
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
211
209
|
end
|
212
210
|
|
213
211
|
if @schedule.nil?
|
214
|
-
invalid_properties.push(
|
212
|
+
invalid_properties.push('invalid value for "schedule", schedule cannot be nil.')
|
215
213
|
end
|
216
214
|
|
217
|
-
|
215
|
+
invalid_properties
|
218
216
|
end
|
219
217
|
|
220
218
|
# Check to see if the all the properties in the model are valid
|
@@ -222,7 +220,7 @@ module Dkron
|
|
222
220
|
def valid?
|
223
221
|
return false if @name.nil?
|
224
222
|
return false if @schedule.nil?
|
225
|
-
|
223
|
+
true
|
226
224
|
end
|
227
225
|
|
228
226
|
# Checks equality by comparing each attribute.
|
@@ -272,7 +270,7 @@ module Dkron
|
|
272
270
|
# check to ensure the input is an array given that the the attribute
|
273
271
|
# is documented as an array but the input is not
|
274
272
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
275
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
273
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
276
274
|
end
|
277
275
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
278
276
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -354,7 +352,7 @@ module Dkron
|
|
354
352
|
# @return [Hash] Returns the value in the form of hash
|
355
353
|
def _to_hash(value)
|
356
354
|
if value.is_a?(Array)
|
357
|
-
value.compact.map{ |v| _to_hash(v) }
|
355
|
+
value.compact.map { |v| _to_hash(v) }
|
358
356
|
elsif value.is_a?(Hash)
|
359
357
|
{}.tap do |hash|
|
360
358
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -365,7 +363,5 @@ module Dkron
|
|
365
363
|
value
|
366
364
|
end
|
367
365
|
end
|
368
|
-
|
369
366
|
end
|
370
|
-
|
371
367
|
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:
|
6
|
+
OpenAPI spec version: 1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -48,7 +48,6 @@ module Dkron
|
|
48
48
|
# Serf delegate protocol current version this node can understand or speak
|
49
49
|
attr_accessor :delegate_cur
|
50
50
|
|
51
|
-
|
52
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
53
52
|
def self.attribute_map
|
54
53
|
{
|
@@ -89,7 +88,7 @@ module Dkron
|
|
89
88
|
return unless attributes.is_a?(Hash)
|
90
89
|
|
91
90
|
# convert string to symbol for hash key
|
92
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
93
92
|
|
94
93
|
if attributes.has_key?(:'Name')
|
95
94
|
self.name = attributes[:'Name']
|
@@ -136,20 +135,19 @@ module Dkron
|
|
136
135
|
if attributes.has_key?(:'DelegateCur')
|
137
136
|
self.delegate_cur = attributes[:'DelegateCur']
|
138
137
|
end
|
139
|
-
|
140
138
|
end
|
141
139
|
|
142
140
|
# Show invalid properties with the reasons. Usually used together with valid?
|
143
141
|
# @return Array for valid properties with the reasons
|
144
142
|
def list_invalid_properties
|
145
143
|
invalid_properties = Array.new
|
146
|
-
|
144
|
+
invalid_properties
|
147
145
|
end
|
148
146
|
|
149
147
|
# Check to see if the all the properties in the model are valid
|
150
148
|
# @return true if the model is valid
|
151
149
|
def valid?
|
152
|
-
|
150
|
+
true
|
153
151
|
end
|
154
152
|
|
155
153
|
# Checks equality by comparing each attribute.
|
@@ -192,7 +190,7 @@ module Dkron
|
|
192
190
|
# check to ensure the input is an array given that the the attribute
|
193
191
|
# is documented as an array but the input is not
|
194
192
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
195
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
193
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
196
194
|
end
|
197
195
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
198
196
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -274,7 +272,7 @@ module Dkron
|
|
274
272
|
# @return [Hash] Returns the value in the form of hash
|
275
273
|
def _to_hash(value)
|
276
274
|
if value.is_a?(Array)
|
277
|
-
value.compact.map{ |v| _to_hash(v) }
|
275
|
+
value.compact.map { |v| _to_hash(v) }
|
278
276
|
elsif value.is_a?(Hash)
|
279
277
|
{}.tap do |hash|
|
280
278
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -285,7 +283,5 @@ module Dkron
|
|
285
283
|
value
|
286
284
|
end
|
287
285
|
end
|
288
|
-
|
289
286
|
end
|
290
|
-
|
291
287
|
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:
|
6
|
+
OpenAPI spec version: 1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -15,7 +15,6 @@ require 'date'
|
|
15
15
|
module Dkron
|
16
16
|
# Processor plugins used to process executions results of this job
|
17
17
|
class Processors
|
18
|
-
|
19
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
19
|
def self.attribute_map
|
21
20
|
{
|
@@ -34,21 +33,20 @@ module Dkron
|
|
34
33
|
return unless attributes.is_a?(Hash)
|
35
34
|
|
36
35
|
# convert string to symbol for hash key
|
37
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
38
|
-
|
36
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
39
37
|
end
|
40
38
|
|
41
39
|
# Show invalid properties with the reasons. Usually used together with valid?
|
42
40
|
# @return Array for valid properties with the reasons
|
43
41
|
def list_invalid_properties
|
44
42
|
invalid_properties = Array.new
|
45
|
-
|
43
|
+
invalid_properties
|
46
44
|
end
|
47
45
|
|
48
46
|
# Check to see if the all the properties in the model are valid
|
49
47
|
# @return true if the model is valid
|
50
48
|
def valid?
|
51
|
-
|
49
|
+
true
|
52
50
|
end
|
53
51
|
|
54
52
|
# Checks equality by comparing each attribute.
|
@@ -80,7 +78,7 @@ module Dkron
|
|
80
78
|
# check to ensure the input is an array given that the the attribute
|
81
79
|
# is documented as an array but the input is not
|
82
80
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
83
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
81
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
84
82
|
end
|
85
83
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
86
84
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -162,7 +160,7 @@ module Dkron
|
|
162
160
|
# @return [Hash] Returns the value in the form of hash
|
163
161
|
def _to_hash(value)
|
164
162
|
if value.is_a?(Array)
|
165
|
-
value.compact.map{ |v| _to_hash(v) }
|
163
|
+
value.compact.map { |v| _to_hash(v) }
|
166
164
|
elsif value.is_a?(Hash)
|
167
165
|
{}.tap do |hash|
|
168
166
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -173,7 +171,5 @@ module Dkron
|
|
173
171
|
value
|
174
172
|
end
|
175
173
|
end
|
176
|
-
|
177
174
|
end
|
178
|
-
|
179
175
|
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:
|
6
|
+
OpenAPI spec version: 1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -15,16 +15,30 @@ require 'date'
|
|
15
15
|
module Dkron
|
16
16
|
# Status represents details about the node.
|
17
17
|
class Status
|
18
|
+
# Node basic details
|
19
|
+
attr_accessor :agent
|
20
|
+
|
21
|
+
# Serf status
|
22
|
+
attr_accessor :serf
|
23
|
+
|
24
|
+
# Tags asociated with this node
|
25
|
+
attr_accessor :tags
|
18
26
|
|
19
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
28
|
def self.attribute_map
|
21
29
|
{
|
30
|
+
:'agent' => :'agent',
|
31
|
+
:'serf' => :'serf',
|
32
|
+
:'tags' => :'tags'
|
22
33
|
}
|
23
34
|
end
|
24
35
|
|
25
36
|
# Attribute type mapping.
|
26
37
|
def self.swagger_types
|
27
38
|
{
|
39
|
+
:'agent' => :'',
|
40
|
+
:'serf' => :'',
|
41
|
+
:'tags' => :''
|
28
42
|
}
|
29
43
|
end
|
30
44
|
|
@@ -34,28 +48,42 @@ module Dkron
|
|
34
48
|
return unless attributes.is_a?(Hash)
|
35
49
|
|
36
50
|
# convert string to symbol for hash key
|
37
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
38
52
|
|
53
|
+
if attributes.has_key?(:'agent')
|
54
|
+
self.agent = attributes[:'agent']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'serf')
|
58
|
+
self.serf = attributes[:'serf']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'tags')
|
62
|
+
self.tags = attributes[:'tags']
|
63
|
+
end
|
39
64
|
end
|
40
65
|
|
41
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
42
67
|
# @return Array for valid properties with the reasons
|
43
68
|
def list_invalid_properties
|
44
69
|
invalid_properties = Array.new
|
45
|
-
|
70
|
+
invalid_properties
|
46
71
|
end
|
47
72
|
|
48
73
|
# Check to see if the all the properties in the model are valid
|
49
74
|
# @return true if the model is valid
|
50
75
|
def valid?
|
51
|
-
|
76
|
+
true
|
52
77
|
end
|
53
78
|
|
54
79
|
# Checks equality by comparing each attribute.
|
55
80
|
# @param [Object] Object to be compared
|
56
81
|
def ==(o)
|
57
82
|
return true if self.equal?(o)
|
58
|
-
self.class == o.class
|
83
|
+
self.class == o.class &&
|
84
|
+
agent == o.agent &&
|
85
|
+
serf == o.serf &&
|
86
|
+
tags == o.tags
|
59
87
|
end
|
60
88
|
|
61
89
|
# @see the `==` method
|
@@ -67,7 +95,7 @@ module Dkron
|
|
67
95
|
# Calculates hash code according to all attributes.
|
68
96
|
# @return [Fixnum] Hash code
|
69
97
|
def hash
|
70
|
-
[].hash
|
98
|
+
[agent, serf, tags].hash
|
71
99
|
end
|
72
100
|
|
73
101
|
# Builds the object from hash
|
@@ -80,7 +108,7 @@ module Dkron
|
|
80
108
|
# check to ensure the input is an array given that the the attribute
|
81
109
|
# is documented as an array but the input is not
|
82
110
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
83
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
111
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
84
112
|
end
|
85
113
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
86
114
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -162,7 +190,7 @@ module Dkron
|
|
162
190
|
# @return [Hash] Returns the value in the form of hash
|
163
191
|
def _to_hash(value)
|
164
192
|
if value.is_a?(Array)
|
165
|
-
value.compact.map{ |v| _to_hash(v) }
|
193
|
+
value.compact.map { |v| _to_hash(v) }
|
166
194
|
elsif value.is_a?(Hash)
|
167
195
|
{}.tap do |hash|
|
168
196
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -173,7 +201,5 @@ module Dkron
|
|
173
201
|
value
|
174
202
|
end
|
175
203
|
end
|
176
|
-
|
177
204
|
end
|
178
|
-
|
179
205
|
end
|
data/lib/dkron-rb/version.rb
CHANGED
@@ -3,13 +3,13 @@
|
|
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:
|
6
|
+
OpenAPI spec version: 1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module Dkron
|
14
|
-
VERSION =
|
14
|
+
VERSION = '1.0.0'
|
15
15
|
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:
|
6
|
+
OpenAPI spec version: 1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.2
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -33,34 +33,31 @@ describe 'DefaultApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for get_leader
|
36
|
-
#
|
37
36
|
# List leader of cluster.
|
38
37
|
# @param [Hash] opts the optional parameters
|
39
38
|
# @return [Member]
|
40
39
|
describe 'get_leader test' do
|
41
|
-
it
|
40
|
+
it 'should work' do
|
42
41
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
46
45
|
# unit tests for leave
|
47
|
-
#
|
48
46
|
# Force the node to leave the cluster.
|
49
47
|
# @param [Hash] opts the optional parameters
|
50
48
|
# @return [Array<Member>]
|
51
49
|
describe 'leave test' do
|
52
|
-
it
|
50
|
+
it 'should work' do
|
53
51
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
52
|
end
|
55
53
|
end
|
56
54
|
|
57
55
|
# unit tests for status
|
58
|
-
#
|
59
56
|
# Gets `Status` object.
|
60
57
|
# @param [Hash] opts the optional parameters
|
61
58
|
# @return [Status]
|
62
59
|
describe 'status test' do
|
63
|
-
it
|
60
|
+
it 'should work' do
|
64
61
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
65
62
|
end
|
66
63
|
end
|