allq_rest 1.2.0 → 1.2.5
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 +4 -4
- data/Gemfile.lock +28 -28
- data/README.md +7 -7
- data/allq_rest.gemspec +2 -2
- data/deploy.sh +1 -1
- data/docs/ActionsApi.md +11 -11
- data/docs/AdminApi.md +2 -2
- data/lib/.DS_Store +0 -0
- data/lib/allq_rest.rb +53 -0
- data/lib/{allq_client → allq_rest}/.DS_Store +0 -0
- data/lib/{allq_client → allq_rest}/api/actions_api.rb +0 -0
- data/lib/{allq_client → allq_rest}/api/admin_api.rb +0 -0
- data/lib/{allq_client → allq_rest}/api_client.rb +2 -1
- data/lib/{allq_client → allq_rest}/api_error.rb +0 -0
- data/lib/{allq_client → allq_rest}/configuration.rb +1 -4
- data/lib/{allq_client → allq_rest}/models/basic_payload.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/basic_response.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/job_ref.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/job_response.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/multiple_job_response.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/new_job.rb +15 -4
- data/lib/{allq_client → allq_rest}/models/new_parent_job.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/stats_info.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/stats_results.rb +1 -1
- data/lib/{allq_client → allq_rest}/models/stats_tube.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/throttle.rb +0 -0
- data/lib/{allq_client → allq_rest}/models/tube_ref.rb +0 -0
- data/lib/{allq_client → allq_rest}/version.rb +1 -1
- data/spec/api/actions_api_spec.rb +101 -91
- data/spec/configuration_spec.rb +5 -5
- data/spec/spec_helper.rb +3 -1
- metadata +37 -39
- data/allq_client-1.2.0.gem +0 -0
- data/allq_client.gemspec +0 -46
- data/lib/allq_client.rb +0 -53
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: edfdc643e9c8a7043876f6c202be451cb23513ed35555c70f28974acc2252b60
|
|
4
|
+
data.tar.gz: ea9ebce349d569b9b2d57d4fee5b0daee69dae2335d9d06208b4118ab4731bb5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70691e5b359e0a440e442e0babd7680c1ce1d40643d8d4343af890230f1c3b456c0dab8b16ec94f1b7c406df1cbfaee51c9fb672019bcc5039a33da1a0875176
|
|
7
|
+
data.tar.gz: 18785fea81c30649ddda7a1d31703caf63b80d3b4c980a50c125cd2a82a9c2258046ed2959e2ad704581a7631cafce4bd7a3d80e0432601ee64c67a4345a07a8
|
data/Gemfile.lock
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
|
|
4
|
+
allq_rest (1.2.5)
|
|
5
5
|
json (~> 2.1, >= 2.1.0)
|
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
ZenTest (4.
|
|
12
|
-
addressable (2.
|
|
13
|
-
public_suffix (>= 2.0.2, <
|
|
11
|
+
ZenTest (4.12.0)
|
|
12
|
+
addressable (2.7.0)
|
|
13
|
+
public_suffix (>= 2.0.2, < 5.0)
|
|
14
14
|
autotest (4.4.6)
|
|
15
15
|
ZenTest (>= 4.4.1)
|
|
16
|
-
autotest-fsevent (0.2.
|
|
16
|
+
autotest-fsevent (0.2.17)
|
|
17
17
|
sys-uname
|
|
18
18
|
autotest-growl (0.2.16)
|
|
19
19
|
autotest-rails-pure (4.1.2)
|
|
20
20
|
crack (0.4.3)
|
|
21
21
|
safe_yaml (~> 1.0.0)
|
|
22
|
-
diff-lcs (1.
|
|
23
|
-
ethon (0.
|
|
24
|
-
ffi (>= 1.
|
|
25
|
-
ffi (1.
|
|
26
|
-
hashdiff (0.
|
|
27
|
-
json (2.1
|
|
28
|
-
public_suffix (
|
|
22
|
+
diff-lcs (1.4.4)
|
|
23
|
+
ethon (0.14.0)
|
|
24
|
+
ffi (>= 1.15.0)
|
|
25
|
+
ffi (1.15.1)
|
|
26
|
+
hashdiff (1.0.1)
|
|
27
|
+
json (2.5.1)
|
|
28
|
+
public_suffix (4.0.6)
|
|
29
29
|
rake (12.0.0)
|
|
30
|
-
rspec (3.
|
|
31
|
-
rspec-core (~> 3.
|
|
32
|
-
rspec-expectations (~> 3.
|
|
33
|
-
rspec-mocks (~> 3.
|
|
34
|
-
rspec-core (3.
|
|
35
|
-
rspec-support (~> 3.
|
|
36
|
-
rspec-expectations (3.
|
|
30
|
+
rspec (3.9.0)
|
|
31
|
+
rspec-core (~> 3.9.0)
|
|
32
|
+
rspec-expectations (~> 3.9.0)
|
|
33
|
+
rspec-mocks (~> 3.9.0)
|
|
34
|
+
rspec-core (3.9.2)
|
|
35
|
+
rspec-support (~> 3.9.3)
|
|
36
|
+
rspec-expectations (3.9.2)
|
|
37
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
38
|
-
rspec-support (~> 3.
|
|
39
|
-
rspec-mocks (3.
|
|
38
|
+
rspec-support (~> 3.9.0)
|
|
39
|
+
rspec-mocks (3.9.1)
|
|
40
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
41
|
-
rspec-support (~> 3.
|
|
42
|
-
rspec-support (3.
|
|
43
|
-
safe_yaml (1.0.
|
|
44
|
-
sys-uname (1.
|
|
41
|
+
rspec-support (~> 3.9.0)
|
|
42
|
+
rspec-support (3.9.3)
|
|
43
|
+
safe_yaml (1.0.5)
|
|
44
|
+
sys-uname (1.2.1)
|
|
45
45
|
ffi (>= 1.0.0)
|
|
46
|
-
typhoeus (1.
|
|
46
|
+
typhoeus (1.4.0)
|
|
47
47
|
ethon (>= 0.9.0)
|
|
48
48
|
vcr (3.0.3)
|
|
49
49
|
webmock (1.24.6)
|
|
@@ -55,7 +55,7 @@ PLATFORMS
|
|
|
55
55
|
ruby
|
|
56
56
|
|
|
57
57
|
DEPENDENCIES
|
|
58
|
-
|
|
58
|
+
allq_rest!
|
|
59
59
|
autotest (~> 4.4, >= 4.4.6)
|
|
60
60
|
autotest-fsevent (~> 0.2, >= 0.2.12)
|
|
61
61
|
autotest-growl (~> 0.2, >= 0.2.16)
|
|
@@ -66,4 +66,4 @@ DEPENDENCIES
|
|
|
66
66
|
webmock (~> 1.24, >= 1.24.3)
|
|
67
67
|
|
|
68
68
|
BUNDLED WITH
|
|
69
|
-
|
|
69
|
+
2.2.3
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# allq_rest
|
|
2
2
|
|
|
3
3
|
Allq - the Ruby gem for the AllQ
|
|
4
4
|
|
|
@@ -17,27 +17,27 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
|
|
17
17
|
To build the Ruby code into a gem:
|
|
18
18
|
|
|
19
19
|
```shell
|
|
20
|
-
gem build
|
|
20
|
+
gem build allq_rest.gemspec
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Then either install the gem locally:
|
|
24
24
|
|
|
25
25
|
```shell
|
|
26
|
-
gem install ./
|
|
26
|
+
gem install ./allq_rest-1.0.0.gem
|
|
27
27
|
```
|
|
28
|
-
(for development, run `gem install --dev ./
|
|
28
|
+
(for development, run `gem install --dev ./allq_rest-1.0.0.gem` to install the development dependencies)
|
|
29
29
|
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
31
31
|
|
|
32
32
|
Finally add this to the Gemfile:
|
|
33
33
|
|
|
34
|
-
gem '
|
|
34
|
+
gem 'allq_rest', '~> 1.0.0'
|
|
35
35
|
|
|
36
36
|
### Install from Git
|
|
37
37
|
|
|
38
38
|
If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:
|
|
39
39
|
|
|
40
|
-
gem '
|
|
40
|
+
gem 'allq_rest', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'
|
|
41
41
|
|
|
42
42
|
### Include the Ruby code directly
|
|
43
43
|
|
|
@@ -52,7 +52,7 @@ ruby -Ilib script.rb
|
|
|
52
52
|
Please follow the [installation](#installation) procedure and then run the following code:
|
|
53
53
|
```ruby
|
|
54
54
|
# Load the gem
|
|
55
|
-
require '
|
|
55
|
+
require 'allq_rest'
|
|
56
56
|
|
|
57
57
|
api_instance = Allq::ActionsApi.new
|
|
58
58
|
|
data/allq_rest.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
2
|
|
|
3
3
|
$:.push File.expand_path("../lib", __FILE__)
|
|
4
|
-
require "
|
|
4
|
+
require "allq_rest/version"
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "allq_rest"
|
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
|
13
13
|
s.summary = "Ruby REST client for Allq platform"
|
|
14
14
|
s.description = "Allq API Client"
|
|
15
15
|
# TODO uncommnet and update below with a proper license
|
|
16
|
-
|
|
16
|
+
s.license = "Apache 2.0"
|
|
17
17
|
s.required_ruby_version = "> 2.3"
|
|
18
18
|
|
|
19
19
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
data/deploy.sh
CHANGED
data/docs/ActionsApi.md
CHANGED
|
@@ -27,7 +27,7 @@ Bury Job
|
|
|
27
27
|
### Example
|
|
28
28
|
```ruby
|
|
29
29
|
# load the gem
|
|
30
|
-
require '
|
|
30
|
+
require 'allq_rest'
|
|
31
31
|
|
|
32
32
|
api_instance = Allq::ActionsApi.new
|
|
33
33
|
|
|
@@ -74,7 +74,7 @@ Finished Job
|
|
|
74
74
|
### Example
|
|
75
75
|
```ruby
|
|
76
76
|
# load the gem
|
|
77
|
-
require '
|
|
77
|
+
require 'allq_rest'
|
|
78
78
|
|
|
79
79
|
api_instance = Allq::ActionsApi.new
|
|
80
80
|
|
|
@@ -125,7 +125,7 @@ Get job from queue
|
|
|
125
125
|
### Example
|
|
126
126
|
```ruby
|
|
127
127
|
# load the gem
|
|
128
|
-
require '
|
|
128
|
+
require 'allq_rest'
|
|
129
129
|
|
|
130
130
|
api_instance = Allq::ActionsApi.new
|
|
131
131
|
|
|
@@ -172,7 +172,7 @@ Put job into queue
|
|
|
172
172
|
### Example
|
|
173
173
|
```ruby
|
|
174
174
|
# load the gem
|
|
175
|
-
require '
|
|
175
|
+
require 'allq_rest'
|
|
176
176
|
|
|
177
177
|
api_instance = Allq::ActionsApi.new
|
|
178
178
|
|
|
@@ -219,7 +219,7 @@ Create a parent job
|
|
|
219
219
|
### Example
|
|
220
220
|
```ruby
|
|
221
221
|
# load the gem
|
|
222
|
-
require '
|
|
222
|
+
require 'allq_rest'
|
|
223
223
|
|
|
224
224
|
api_instance = Allq::ActionsApi.new
|
|
225
225
|
|
|
@@ -266,7 +266,7 @@ Peek at next job
|
|
|
266
266
|
### Example
|
|
267
267
|
```ruby
|
|
268
268
|
# load the gem
|
|
269
|
-
require '
|
|
269
|
+
require 'allq_rest'
|
|
270
270
|
|
|
271
271
|
api_instance = Allq::ActionsApi.new
|
|
272
272
|
|
|
@@ -317,7 +317,7 @@ Releases job back into queue
|
|
|
317
317
|
### Example
|
|
318
318
|
```ruby
|
|
319
319
|
# load the gem
|
|
320
|
-
require '
|
|
320
|
+
require 'allq_rest'
|
|
321
321
|
|
|
322
322
|
api_instance = Allq::ActionsApi.new
|
|
323
323
|
|
|
@@ -364,7 +364,7 @@ When a parent job doesn't know how many children are going to be added, this is
|
|
|
364
364
|
### Example
|
|
365
365
|
```ruby
|
|
366
366
|
# load the gem
|
|
367
|
-
require '
|
|
367
|
+
require 'allq_rest'
|
|
368
368
|
|
|
369
369
|
api_instance = Allq::ActionsApi.new
|
|
370
370
|
|
|
@@ -411,7 +411,7 @@ Creates a throttle on a tube
|
|
|
411
411
|
### Example
|
|
412
412
|
```ruby
|
|
413
413
|
# load the gem
|
|
414
|
-
require '
|
|
414
|
+
require 'allq_rest'
|
|
415
415
|
|
|
416
416
|
api_instance = Allq::ActionsApi.new
|
|
417
417
|
|
|
@@ -458,7 +458,7 @@ Touch job
|
|
|
458
458
|
### Example
|
|
459
459
|
```ruby
|
|
460
460
|
# load the gem
|
|
461
|
-
require '
|
|
461
|
+
require 'allq_rest'
|
|
462
462
|
|
|
463
463
|
api_instance = Allq::ActionsApi.new
|
|
464
464
|
|
|
@@ -505,7 +505,7 @@ Delete all contents of tube
|
|
|
505
505
|
### Example
|
|
506
506
|
```ruby
|
|
507
507
|
# load the gem
|
|
508
|
-
require '
|
|
508
|
+
require 'allq_rest'
|
|
509
509
|
|
|
510
510
|
api_instance = Allq::ActionsApi.new
|
|
511
511
|
|
data/docs/AdminApi.md
CHANGED
|
@@ -18,7 +18,7 @@ Get Stats
|
|
|
18
18
|
### Example
|
|
19
19
|
```ruby
|
|
20
20
|
# load the gem
|
|
21
|
-
require '
|
|
21
|
+
require 'allq_rest'
|
|
22
22
|
|
|
23
23
|
api_instance = Allq::AdminApi.new
|
|
24
24
|
|
|
@@ -59,7 +59,7 @@ Change server URLs
|
|
|
59
59
|
### Example
|
|
60
60
|
```ruby
|
|
61
61
|
# load the gem
|
|
62
|
-
require '
|
|
62
|
+
require 'allq_rest'
|
|
63
63
|
|
|
64
64
|
api_instance = Allq::AdminApi.new
|
|
65
65
|
|
data/lib/.DS_Store
CHANGED
|
Binary file
|
data/lib/allq_rest.rb
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#AllQ
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.2
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
# Common files
|
|
14
|
+
require 'allq_rest/api_client'
|
|
15
|
+
require 'allq_rest/api_error'
|
|
16
|
+
require 'allq_rest/version'
|
|
17
|
+
require 'allq_rest/configuration'
|
|
18
|
+
|
|
19
|
+
# Models
|
|
20
|
+
require 'allq_rest/models/basic_payload'
|
|
21
|
+
require 'allq_rest/models/basic_response'
|
|
22
|
+
require 'allq_rest/models/job_ref'
|
|
23
|
+
require 'allq_rest/models/job_response'
|
|
24
|
+
require 'allq_rest/models/multiple_job_response'
|
|
25
|
+
require 'allq_rest/models/new_job'
|
|
26
|
+
require 'allq_rest/models/new_parent_job'
|
|
27
|
+
require 'allq_rest/models/stats_info'
|
|
28
|
+
require 'allq_rest/models/stats_results'
|
|
29
|
+
require 'allq_rest/models/stats_tube'
|
|
30
|
+
require 'allq_rest/models/throttle'
|
|
31
|
+
require 'allq_rest/models/tube_ref'
|
|
32
|
+
|
|
33
|
+
# APIs
|
|
34
|
+
require 'allq_rest/api/actions_api'
|
|
35
|
+
require 'allq_rest/api/admin_api'
|
|
36
|
+
|
|
37
|
+
module Allq
|
|
38
|
+
class << self
|
|
39
|
+
# Customize default settings for the SDK using block.
|
|
40
|
+
# Allq.configure do |config|
|
|
41
|
+
# config.username = "xxx"
|
|
42
|
+
# config.password = "xxx"
|
|
43
|
+
# end
|
|
44
|
+
# If no block given, return the default Configuration object.
|
|
45
|
+
def configure
|
|
46
|
+
if block_given?
|
|
47
|
+
yield(Configuration.default)
|
|
48
|
+
else
|
|
49
|
+
Configuration.default
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -30,6 +30,7 @@ module Allq
|
|
|
30
30
|
# Initializes the ApiClient
|
|
31
31
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
32
32
|
def initialize(config = Configuration.default)
|
|
33
|
+
Ethon.logger = Logger.new(nil)
|
|
33
34
|
@config = config
|
|
34
35
|
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
|
|
35
36
|
@default_headers = {
|
|
@@ -263,7 +264,7 @@ module Allq
|
|
|
263
264
|
def build_request_url(path)
|
|
264
265
|
# Add leading and trailing slashes to path
|
|
265
266
|
path = "/#{path}".gsub(/\/+/, '/')
|
|
266
|
-
|
|
267
|
+
@config.base_url + path
|
|
267
268
|
end
|
|
268
269
|
|
|
269
270
|
# Builds the HTTP request body
|
|
File without changes
|
|
@@ -10,8 +10,6 @@ Swagger Codegen version: 2.4.2
|
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
|
-
require 'uri'
|
|
14
|
-
|
|
15
13
|
module Allq
|
|
16
14
|
class Configuration
|
|
17
15
|
# Defines url scheme
|
|
@@ -144,7 +142,6 @@ module Allq
|
|
|
144
142
|
@inject_format = false
|
|
145
143
|
@force_ending_format = false
|
|
146
144
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
|
147
|
-
|
|
148
145
|
yield(self) if block_given?
|
|
149
146
|
end
|
|
150
147
|
|
|
@@ -175,7 +172,7 @@ module Allq
|
|
|
175
172
|
|
|
176
173
|
def base_url
|
|
177
174
|
url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
|
178
|
-
|
|
175
|
+
url
|
|
179
176
|
end
|
|
180
177
|
|
|
181
178
|
# Gets API key (with prefix if set).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -33,6 +33,9 @@ module Allq
|
|
|
33
33
|
# Parent job id (if applicable)
|
|
34
34
|
attr_accessor :parent_id
|
|
35
35
|
|
|
36
|
+
# Shard key (if applicable)
|
|
37
|
+
attr_accessor :shard_key
|
|
38
|
+
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
40
|
def self.attribute_map
|
|
38
41
|
{
|
|
@@ -41,7 +44,8 @@ module Allq
|
|
|
41
44
|
:'ttl' => :'ttl',
|
|
42
45
|
:'delay' => :'delay',
|
|
43
46
|
:'priority' => :'priority',
|
|
44
|
-
:'parent_id' => :'parent_id'
|
|
47
|
+
:'parent_id' => :'parent_id',
|
|
48
|
+
:'shard_key' => :'shard_key'
|
|
45
49
|
}
|
|
46
50
|
end
|
|
47
51
|
|
|
@@ -53,7 +57,8 @@ module Allq
|
|
|
53
57
|
:'ttl' => :'Integer',
|
|
54
58
|
:'delay' => :'Integer',
|
|
55
59
|
:'priority' => :'Integer',
|
|
56
|
-
:'parent_id' => :'String'
|
|
60
|
+
:'parent_id' => :'String',
|
|
61
|
+
:'shard_key' => :'String'
|
|
57
62
|
}
|
|
58
63
|
end
|
|
59
64
|
|
|
@@ -98,6 +103,11 @@ module Allq
|
|
|
98
103
|
if attributes.has_key?(:'parent_id')
|
|
99
104
|
self.parent_id = attributes[:'parent_id']
|
|
100
105
|
end
|
|
106
|
+
|
|
107
|
+
if attributes.has_key?(:'shard_key')
|
|
108
|
+
self.shard_key = attributes[:'shard_key']
|
|
109
|
+
end
|
|
110
|
+
|
|
101
111
|
end
|
|
102
112
|
|
|
103
113
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -148,7 +158,8 @@ module Allq
|
|
|
148
158
|
ttl == o.ttl &&
|
|
149
159
|
delay == o.delay &&
|
|
150
160
|
priority == o.priority &&
|
|
151
|
-
parent_id == o.parent_id
|
|
161
|
+
parent_id == o.parent_id &&
|
|
162
|
+
shard_key = o.shard_key
|
|
152
163
|
end
|
|
153
164
|
|
|
154
165
|
# @see the `==` method
|
|
@@ -160,7 +171,7 @@ module Allq
|
|
|
160
171
|
# Calculates hash code according to all attributes.
|
|
161
172
|
# @return [Fixnum] Hash code
|
|
162
173
|
def hash
|
|
163
|
-
[tube, body, ttl, delay, priority, parent_id].hash
|
|
174
|
+
[tube, body, ttl, delay, priority, parent_id, shard_key].hash
|
|
164
175
|
end
|
|
165
176
|
|
|
166
177
|
# Builds the object from hash
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -21,8 +21,16 @@ ALT_TUBE = ""
|
|
|
21
21
|
describe 'ActionsApi' do
|
|
22
22
|
before do
|
|
23
23
|
# run before each test
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
allq_conf = Allq::Configuration.new do |config|
|
|
25
|
+
config.host = ENV['ALLQ_CLIENT_LOCATION'] || 'localhost:8091'
|
|
26
|
+
end
|
|
27
|
+
raw_client = Allq::ApiClient.new(allq_conf)
|
|
28
|
+
@instance = Allq::ActionsApi.new(raw_client)
|
|
29
|
+
@admin_tools = Allq::AdminApi.new(raw_client)
|
|
30
|
+
|
|
31
|
+
@allq_tool = AllQTools.new(@instance, @admin_tools)
|
|
32
|
+
|
|
33
|
+
stats_result = @allq_tool.get_stats[0]
|
|
26
34
|
stats_result.stats.each do |stat|
|
|
27
35
|
@instance.tube_delete(stat.tube)
|
|
28
36
|
end
|
|
@@ -46,12 +54,12 @@ describe 'ActionsApi' do
|
|
|
46
54
|
# @return [BasicResponse]
|
|
47
55
|
describe 'bury_put test' do
|
|
48
56
|
it "should work" do
|
|
49
|
-
|
|
50
|
-
expect(
|
|
57
|
+
@allq_tool.add_job
|
|
58
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
51
59
|
job = @instance.job_get(DEFAULT_TUBE)
|
|
52
60
|
@instance.bury_put(job.id)
|
|
53
|
-
expect(
|
|
54
|
-
expect(
|
|
61
|
+
expect(@allq_tool.get_buried(DEFAULT_TUBE)).to eq(1)
|
|
62
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0)
|
|
55
63
|
end
|
|
56
64
|
end
|
|
57
65
|
|
|
@@ -64,11 +72,11 @@ describe 'ActionsApi' do
|
|
|
64
72
|
# @return [BasicResponse]
|
|
65
73
|
describe 'job_delete test' do
|
|
66
74
|
it "should work" do
|
|
67
|
-
|
|
68
|
-
expect(
|
|
75
|
+
@allq_tool.add_job
|
|
76
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
69
77
|
job = @instance.peek_get(DEFAULT_TUBE)
|
|
70
78
|
@instance.job_delete(job.id, tube: DEFAULT_TUBE)
|
|
71
|
-
expect(
|
|
79
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0)
|
|
72
80
|
end
|
|
73
81
|
end
|
|
74
82
|
|
|
@@ -80,9 +88,9 @@ describe 'ActionsApi' do
|
|
|
80
88
|
# @return [JobResponse]
|
|
81
89
|
describe 'job_get test' do
|
|
82
90
|
it "should work" do
|
|
83
|
-
|
|
91
|
+
@allq_tool.add_job
|
|
84
92
|
job = @instance.job_get(DEFAULT_TUBE)
|
|
85
|
-
expect(
|
|
93
|
+
expect(@allq_tool.get_reserved(DEFAULT_TUBE)).to eq(1)
|
|
86
94
|
expect(job.id).to be_truthy
|
|
87
95
|
end
|
|
88
96
|
end
|
|
@@ -96,19 +104,19 @@ describe 'ActionsApi' do
|
|
|
96
104
|
describe 'mulitple_job_get test' do
|
|
97
105
|
it "should work" do
|
|
98
106
|
1.upto(6) do
|
|
99
|
-
|
|
107
|
+
@allq_tool.add_job
|
|
100
108
|
end
|
|
101
109
|
multiple_jobs = @instance.multiple_job_get(DEFAULT_TUBE, 4)
|
|
102
110
|
expect(multiple_jobs.jobs.length).to eq(4)
|
|
103
|
-
expect(
|
|
111
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(2)
|
|
104
112
|
multiple_jobs.jobs.each do |job|
|
|
105
113
|
@instance.job_delete(job.id)
|
|
106
114
|
end
|
|
107
|
-
expect(
|
|
115
|
+
expect(@allq_tool.get_reserved(DEFAULT_TUBE)).to eq(0)
|
|
108
116
|
|
|
109
117
|
multiple_jobs = @instance.multiple_job_get(DEFAULT_TUBE, 4)
|
|
110
118
|
expect(multiple_jobs.jobs.length).to eq(2)
|
|
111
|
-
expect(
|
|
119
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0)
|
|
112
120
|
end
|
|
113
121
|
end
|
|
114
122
|
|
|
@@ -120,8 +128,8 @@ describe 'ActionsApi' do
|
|
|
120
128
|
# @return [JobRef]
|
|
121
129
|
describe 'job_post test' do
|
|
122
130
|
it "should work" do
|
|
123
|
-
|
|
124
|
-
expect(
|
|
131
|
+
@allq_tool.add_job
|
|
132
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
125
133
|
job = @instance.job_get(DEFAULT_TUBE)
|
|
126
134
|
expect(job.id).to be_truthy
|
|
127
135
|
end
|
|
@@ -144,18 +152,18 @@ describe 'ActionsApi' do
|
|
|
144
152
|
run_on_timeout: false,
|
|
145
153
|
limit: 2)
|
|
146
154
|
new_parent_job_response = @instance.parent_job_post(new_parent_job)
|
|
147
|
-
expect(
|
|
148
|
-
job =
|
|
155
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(1)
|
|
156
|
+
job = @allq_tool.new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
|
|
149
157
|
@instance.job_post(job)
|
|
150
|
-
job =
|
|
158
|
+
job = @allq_tool.new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
|
|
151
159
|
@instance.job_post(job)
|
|
152
|
-
expect(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
expect(
|
|
156
|
-
expect(
|
|
157
|
-
|
|
158
|
-
expect(
|
|
160
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(2)
|
|
161
|
+
@allq_tool.get_finish(DEFAULT_TUBE)
|
|
162
|
+
@allq_tool.get_finish(DEFAULT_TUBE)
|
|
163
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
164
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(0)
|
|
165
|
+
@allq_tool.get_finish(DEFAULT_TUBE)
|
|
166
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0)
|
|
159
167
|
end
|
|
160
168
|
end
|
|
161
169
|
|
|
@@ -176,19 +184,19 @@ describe 'ActionsApi' do
|
|
|
176
184
|
run_on_timeout: false,
|
|
177
185
|
limit: 2)
|
|
178
186
|
new_parent_job_response = @instance.parent_job_post(new_parent_job)
|
|
179
|
-
expect(
|
|
187
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(1)
|
|
180
188
|
|
|
181
|
-
job =
|
|
189
|
+
job = @allq_tool.new_job('foo', nil, new_parent_job_response.job_id)
|
|
182
190
|
@instance.job_post(job)
|
|
183
|
-
job =
|
|
191
|
+
job = @allq_tool.new_job('foo', nil, new_parent_job_response.job_id)
|
|
184
192
|
@instance.job_post(job)
|
|
185
|
-
expect(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
expect(
|
|
189
|
-
expect(
|
|
190
|
-
|
|
191
|
-
expect(
|
|
193
|
+
expect(@allq_tool.get_ready('foo')).to eq(2)
|
|
194
|
+
@allq_tool.get_finish('foo')
|
|
195
|
+
@allq_tool.get_finish('foo')
|
|
196
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
197
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(0)
|
|
198
|
+
@allq_tool.get_finish(DEFAULT_TUBE)
|
|
199
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0)
|
|
192
200
|
end
|
|
193
201
|
end
|
|
194
202
|
|
|
@@ -209,16 +217,16 @@ describe 'ActionsApi' do
|
|
|
209
217
|
run_on_timeout: true,
|
|
210
218
|
limit: 2)
|
|
211
219
|
new_parent_job_response = @instance.parent_job_post(new_parent_job)
|
|
212
|
-
expect(
|
|
220
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(1)
|
|
213
221
|
|
|
214
|
-
job =
|
|
222
|
+
job = @allq_tool.new_job('foo', nil, new_parent_job_response.job_id)
|
|
215
223
|
@instance.job_post(job)
|
|
216
|
-
expect(
|
|
217
|
-
expect(
|
|
224
|
+
expect(@allq_tool.get_ready('foo')).to eq(1)
|
|
225
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(1)
|
|
218
226
|
|
|
219
227
|
sleep(7)
|
|
220
|
-
expect(
|
|
221
|
-
expect(
|
|
228
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(0)
|
|
229
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
222
230
|
end
|
|
223
231
|
end
|
|
224
232
|
|
|
@@ -231,7 +239,7 @@ describe 'ActionsApi' do
|
|
|
231
239
|
# @return [JobResponse]
|
|
232
240
|
describe 'peek_get test' do
|
|
233
241
|
it "should work" do
|
|
234
|
-
|
|
242
|
+
@allq_tool.add_job
|
|
235
243
|
job = @instance.peek_get(DEFAULT_TUBE)
|
|
236
244
|
expect(job.id).to be_truthy
|
|
237
245
|
end
|
|
@@ -239,7 +247,7 @@ describe 'ActionsApi' do
|
|
|
239
247
|
|
|
240
248
|
describe 'peek_get buried test' do
|
|
241
249
|
it "should work" do
|
|
242
|
-
|
|
250
|
+
@allq_tool.add_job
|
|
243
251
|
job = @instance.peek_get(DEFAULT_TUBE, buried: true)
|
|
244
252
|
expect(job.id).to be_falsey
|
|
245
253
|
job = @instance.job_get(DEFAULT_TUBE)
|
|
@@ -272,20 +280,20 @@ describe 'ActionsApi' do
|
|
|
272
280
|
# @return [BasicResponse]
|
|
273
281
|
describe 'release_put test' do
|
|
274
282
|
it "should work" do
|
|
275
|
-
|
|
276
|
-
expect(
|
|
283
|
+
@allq_tool.add_job
|
|
284
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
277
285
|
job = @instance.job_get(DEFAULT_TUBE)
|
|
278
|
-
expect(
|
|
286
|
+
expect(@allq_tool.get_reserved(DEFAULT_TUBE)).to eq(1)
|
|
279
287
|
expect(job.id).to be_truthy
|
|
280
288
|
@instance.release_put(job.id)
|
|
281
|
-
expect(
|
|
289
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
282
290
|
end
|
|
283
291
|
end
|
|
284
292
|
|
|
285
293
|
describe 'release should increment release' do
|
|
286
294
|
it "should work" do
|
|
287
|
-
|
|
288
|
-
expect(
|
|
295
|
+
@allq_tool.add_job
|
|
296
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
289
297
|
job = @instance.job_get(DEFAULT_TUBE)
|
|
290
298
|
expect(job.releases).to eq(0)
|
|
291
299
|
@instance.release_put(job.id)
|
|
@@ -317,25 +325,25 @@ describe 'ActionsApi' do
|
|
|
317
325
|
run_on_timeout: false,
|
|
318
326
|
limit: nil)
|
|
319
327
|
new_parent_job_response = @instance.parent_job_post(new_parent_job)
|
|
320
|
-
expect(
|
|
321
|
-
job =
|
|
328
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(1)
|
|
329
|
+
job = @allq_tool.new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
|
|
322
330
|
@instance.job_post(job)
|
|
323
|
-
job =
|
|
331
|
+
job = @allq_tool.new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
|
|
324
332
|
@instance.job_post(job)
|
|
325
|
-
expect(
|
|
326
|
-
|
|
327
|
-
|
|
333
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(2)
|
|
334
|
+
@allq_tool.get_finish(DEFAULT_TUBE)
|
|
335
|
+
@allq_tool.get_finish(DEFAULT_TUBE)
|
|
328
336
|
# After jobs have already finished
|
|
329
|
-
expect(
|
|
337
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0)
|
|
330
338
|
# Parent still waiting
|
|
331
|
-
expect(
|
|
339
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(1)
|
|
332
340
|
# Set limit on parent
|
|
333
341
|
@instance.set_children_started_put(new_parent_job_response.job_id)
|
|
334
342
|
# Now parent gets moved to ready
|
|
335
|
-
expect(
|
|
336
|
-
expect(
|
|
337
|
-
|
|
338
|
-
expect(
|
|
343
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
344
|
+
expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(0)
|
|
345
|
+
@allq_tool.get_finish(DEFAULT_TUBE)
|
|
346
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0)
|
|
339
347
|
end
|
|
340
348
|
end
|
|
341
349
|
|
|
@@ -360,10 +368,10 @@ describe 'ActionsApi' do
|
|
|
360
368
|
# @return [TubeRef]
|
|
361
369
|
describe 'throttle_post test' do
|
|
362
370
|
it "should work" do
|
|
363
|
-
|
|
364
|
-
expect(
|
|
371
|
+
@allq_tool.add_job
|
|
372
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
365
373
|
@instance.job_get(DEFAULT_TUBE)
|
|
366
|
-
stats_result =
|
|
374
|
+
stats_result = @allq_tool.get_stats[0]
|
|
367
375
|
expect(stats_result.action_count > 1).to eq(true)
|
|
368
376
|
end
|
|
369
377
|
end
|
|
@@ -376,8 +384,8 @@ describe 'ActionsApi' do
|
|
|
376
384
|
# @return [BasicResponse]
|
|
377
385
|
describe 'touch_put test' do
|
|
378
386
|
it "should work" do
|
|
379
|
-
|
|
380
|
-
expect(
|
|
387
|
+
@allq_tool.add_job
|
|
388
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1)
|
|
381
389
|
job = @instance.job_get(DEFAULT_TUBE)
|
|
382
390
|
@instance.touch_put(job.id)
|
|
383
391
|
end
|
|
@@ -427,31 +435,31 @@ describe 'ActionsApi' do
|
|
|
427
435
|
priority: 5,
|
|
428
436
|
parent_id: nil)
|
|
429
437
|
@instance.job_post(new_job)
|
|
430
|
-
expect(
|
|
438
|
+
expect(@allq_tool.get_ready("alt_tube2")).to eq(2) # OK..it's there
|
|
431
439
|
reserved_job = @instance.job_get("alt_tube2")
|
|
432
440
|
|
|
433
441
|
# Other tube has 1 ready, 1 reserved
|
|
434
|
-
expect(
|
|
435
|
-
expect(
|
|
442
|
+
expect(@allq_tool.get_ready("alt_tube2")).to eq(1)
|
|
443
|
+
expect(@allq_tool.get_reserved("alt_tube2")).to eq(1)
|
|
436
444
|
|
|
437
445
|
# Get 1 into buried, 1 into reserved, and 1 in ready so we can clear it
|
|
438
|
-
expect(
|
|
446
|
+
expect(@allq_tool.get_ready(alt_tube_name)).to eq(3) # OK..it's there
|
|
439
447
|
reserved_job = @instance.job_get(alt_tube_name)
|
|
440
|
-
expect(
|
|
448
|
+
expect(@allq_tool.get_reserved(alt_tube_name)).to eq(1) # OK..it's there
|
|
441
449
|
reserved_job = @instance.job_get(alt_tube_name)
|
|
442
|
-
expect(
|
|
450
|
+
expect(@allq_tool.get_reserved(alt_tube_name)).to eq(2) # OK..it's there
|
|
443
451
|
@instance.bury_put(reserved_job.id)
|
|
444
|
-
expect(
|
|
452
|
+
expect(@allq_tool.get_buried(alt_tube_name)).to eq(1)
|
|
445
453
|
|
|
446
454
|
# Now check that first tube is empty
|
|
447
455
|
@instance.tube_delete(alt_tube_name)
|
|
448
|
-
expect(
|
|
449
|
-
expect(
|
|
450
|
-
expect(
|
|
456
|
+
expect(@allq_tool.get_buried(alt_tube_name)).to eq(0)
|
|
457
|
+
expect(@allq_tool.get_reserved(alt_tube_name)).to eq(0) # OK..it's there
|
|
458
|
+
expect(@allq_tool.get_ready(alt_tube_name)).to eq(0)
|
|
451
459
|
|
|
452
460
|
# ..and other tubes are fine
|
|
453
|
-
expect(
|
|
454
|
-
expect(
|
|
461
|
+
expect(@allq_tool.get_ready("alt_tube2")).to eq(1)
|
|
462
|
+
expect(@allq_tool.get_reserved("alt_tube2")).to eq(1)
|
|
455
463
|
end
|
|
456
464
|
end
|
|
457
465
|
|
|
@@ -466,9 +474,9 @@ describe 'ActionsApi' do
|
|
|
466
474
|
priority: 5,
|
|
467
475
|
parent_id: nil)
|
|
468
476
|
@instance.job_post(new_job)
|
|
469
|
-
expect(
|
|
477
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0) # Too soon to show up
|
|
470
478
|
sleep(4)
|
|
471
|
-
expect(
|
|
479
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1) # OK..it's there
|
|
472
480
|
end
|
|
473
481
|
end
|
|
474
482
|
|
|
@@ -485,18 +493,21 @@ describe 'ActionsApi' do
|
|
|
485
493
|
@instance.job_post(new_job)
|
|
486
494
|
sleep(1)
|
|
487
495
|
@instance.job_get(DEFAULT_TUBE)
|
|
488
|
-
expect(
|
|
496
|
+
expect(@allq_tool.get_reserved(DEFAULT_TUBE)).to eq(1)
|
|
489
497
|
sleep(5)
|
|
490
|
-
expect(
|
|
491
|
-
expect(
|
|
498
|
+
expect(@allq_tool.get_reserved(DEFAULT_TUBE)).to eq(0) # Should expire
|
|
499
|
+
expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(1) # ..and be back in ready
|
|
492
500
|
end
|
|
493
501
|
end
|
|
494
502
|
|
|
495
503
|
end
|
|
496
504
|
|
|
497
505
|
|
|
498
|
-
|
|
499
|
-
|
|
506
|
+
class AllQTools
|
|
507
|
+
def initialize(action_client, admin_client)
|
|
508
|
+
@action_client = action_client
|
|
509
|
+
@admin_client = admin_client
|
|
510
|
+
end
|
|
500
511
|
|
|
501
512
|
def new_job(tube = 'default', body = nil, parent_id = nil)
|
|
502
513
|
body = (0...8).map { (65 + rand(26)).chr }.join unless body
|
|
@@ -511,20 +522,20 @@ module AllQTools
|
|
|
511
522
|
end
|
|
512
523
|
|
|
513
524
|
def add_job(tube = DEFAULT_TUBE)
|
|
514
|
-
client =
|
|
525
|
+
client = @action_client
|
|
515
526
|
job = new_job(tube)
|
|
516
527
|
job = client.job_post(new_job)
|
|
517
528
|
return job
|
|
518
529
|
end
|
|
519
530
|
|
|
520
531
|
def get_finish(tube)
|
|
521
|
-
client =
|
|
532
|
+
client = @action_client
|
|
522
533
|
job = client.job_get(tube)
|
|
523
534
|
client.job_delete(job.id)
|
|
524
535
|
end
|
|
525
536
|
|
|
526
537
|
def get_stats
|
|
527
|
-
client =
|
|
538
|
+
client = @admin_client
|
|
528
539
|
client.stats_get
|
|
529
540
|
end
|
|
530
541
|
|
|
@@ -571,5 +582,4 @@ module AllQTools
|
|
|
571
582
|
end
|
|
572
583
|
end
|
|
573
584
|
end
|
|
574
|
-
end
|
|
575
585
|
end
|
data/spec/configuration_spec.rb
CHANGED
|
@@ -18,11 +18,11 @@ describe Allq::Configuration do
|
|
|
18
18
|
before(:each) do
|
|
19
19
|
# uncomment below to setup host and base_path
|
|
20
20
|
#require 'URI'
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
uri = URI.parse("http://localhost:8091")
|
|
22
|
+
Allq.configure do |c|
|
|
23
|
+
c.host = uri.host
|
|
24
|
+
c.base_path = uri.path
|
|
25
|
+
end
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
describe '#base_url' do
|
data/spec/spec_helper.rb
CHANGED
|
@@ -11,7 +11,7 @@ Swagger Codegen version: 2.3.1
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
# load the gem
|
|
14
|
-
require '
|
|
14
|
+
require 'allq_rest'
|
|
15
15
|
|
|
16
16
|
# The following was generated by the `rspec --init` command. Conventionally, all
|
|
17
17
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
|
@@ -55,6 +55,8 @@ RSpec.configure do |config|
|
|
|
55
55
|
mocks.verify_partial_doubles = true
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
config.warnings = true
|
|
59
|
+
|
|
58
60
|
# The settings below are suggested to provide a good initial experience
|
|
59
61
|
# with RSpec, but feel free to customize to your heart's content.
|
|
60
62
|
=begin
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: allq_rest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- support@blitline.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-05-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -34,42 +34,42 @@ dependencies:
|
|
|
34
34
|
name: json
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
|
-
- - ">="
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: 2.1.0
|
|
40
37
|
- - "~>"
|
|
41
38
|
- !ruby/object:Gem::Version
|
|
42
39
|
version: '2.1'
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: 2.1.0
|
|
43
43
|
type: :runtime
|
|
44
44
|
prerelease: false
|
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
|
-
- - ">="
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version: 2.1.0
|
|
50
47
|
- - "~>"
|
|
51
48
|
- !ruby/object:Gem::Version
|
|
52
49
|
version: '2.1'
|
|
50
|
+
- - ">="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: 2.1.0
|
|
53
53
|
- !ruby/object:Gem::Dependency
|
|
54
54
|
name: rspec
|
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
|
56
56
|
requirements:
|
|
57
|
-
- - ">="
|
|
58
|
-
- !ruby/object:Gem::Version
|
|
59
|
-
version: 3.6.0
|
|
60
57
|
- - "~>"
|
|
61
58
|
- !ruby/object:Gem::Version
|
|
62
59
|
version: '3.6'
|
|
60
|
+
- - ">="
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: 3.6.0
|
|
63
63
|
type: :development
|
|
64
64
|
prerelease: false
|
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
66
66
|
requirements:
|
|
67
|
-
- - ">="
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: 3.6.0
|
|
70
67
|
- - "~>"
|
|
71
68
|
- !ruby/object:Gem::Version
|
|
72
69
|
version: '3.6'
|
|
70
|
+
- - ">="
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: 3.6.0
|
|
73
73
|
- !ruby/object:Gem::Dependency
|
|
74
74
|
name: vcr
|
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -201,8 +201,6 @@ files:
|
|
|
201
201
|
- Gemfile.lock
|
|
202
202
|
- README.md
|
|
203
203
|
- Rakefile
|
|
204
|
-
- allq_client-1.2.0.gem
|
|
205
|
-
- allq_client.gemspec
|
|
206
204
|
- allq_rest.gemspec
|
|
207
205
|
- deploy.sh
|
|
208
206
|
- docs/ActionsApi.md
|
|
@@ -220,26 +218,26 @@ files:
|
|
|
220
218
|
- docs/TubeRef.md
|
|
221
219
|
- git_push.sh
|
|
222
220
|
- lib/.DS_Store
|
|
223
|
-
- lib/
|
|
224
|
-
- lib/
|
|
225
|
-
- lib/
|
|
226
|
-
- lib/
|
|
227
|
-
- lib/
|
|
228
|
-
- lib/
|
|
229
|
-
- lib/
|
|
230
|
-
- lib/
|
|
231
|
-
- lib/
|
|
232
|
-
- lib/
|
|
233
|
-
- lib/
|
|
234
|
-
- lib/
|
|
235
|
-
- lib/
|
|
236
|
-
- lib/
|
|
237
|
-
- lib/
|
|
238
|
-
- lib/
|
|
239
|
-
- lib/
|
|
240
|
-
- lib/
|
|
241
|
-
- lib/
|
|
242
|
-
- lib/
|
|
221
|
+
- lib/allq_rest.rb
|
|
222
|
+
- lib/allq_rest/.DS_Store
|
|
223
|
+
- lib/allq_rest/api/actions_api.rb
|
|
224
|
+
- lib/allq_rest/api/admin_api.rb
|
|
225
|
+
- lib/allq_rest/api_client.rb
|
|
226
|
+
- lib/allq_rest/api_error.rb
|
|
227
|
+
- lib/allq_rest/configuration.rb
|
|
228
|
+
- lib/allq_rest/models/basic_payload.rb
|
|
229
|
+
- lib/allq_rest/models/basic_response.rb
|
|
230
|
+
- lib/allq_rest/models/job_ref.rb
|
|
231
|
+
- lib/allq_rest/models/job_response.rb
|
|
232
|
+
- lib/allq_rest/models/multiple_job_response.rb
|
|
233
|
+
- lib/allq_rest/models/new_job.rb
|
|
234
|
+
- lib/allq_rest/models/new_parent_job.rb
|
|
235
|
+
- lib/allq_rest/models/stats_info.rb
|
|
236
|
+
- lib/allq_rest/models/stats_results.rb
|
|
237
|
+
- lib/allq_rest/models/stats_tube.rb
|
|
238
|
+
- lib/allq_rest/models/throttle.rb
|
|
239
|
+
- lib/allq_rest/models/tube_ref.rb
|
|
240
|
+
- lib/allq_rest/version.rb
|
|
243
241
|
- spec/.DS_Store
|
|
244
242
|
- spec/api/actions_api_spec.rb
|
|
245
243
|
- spec/api/admin_api_spec.rb
|
|
@@ -258,7 +256,8 @@ files:
|
|
|
258
256
|
- spec/models/tube_ref_spec.rb
|
|
259
257
|
- spec/spec_helper.rb
|
|
260
258
|
homepage: http://www.blitline.com
|
|
261
|
-
licenses:
|
|
259
|
+
licenses:
|
|
260
|
+
- Apache 2.0
|
|
262
261
|
metadata: {}
|
|
263
262
|
post_install_message:
|
|
264
263
|
rdoc_options: []
|
|
@@ -275,8 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
275
274
|
- !ruby/object:Gem::Version
|
|
276
275
|
version: '0'
|
|
277
276
|
requirements: []
|
|
278
|
-
|
|
279
|
-
rubygems_version: 2.7.9
|
|
277
|
+
rubygems_version: 3.2.3
|
|
280
278
|
signing_key:
|
|
281
279
|
specification_version: 4
|
|
282
280
|
summary: Ruby REST client for Allq platform
|
data/allq_client-1.2.0.gem
DELETED
|
Binary file
|
data/allq_client.gemspec
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
#
|
|
3
|
-
=begin
|
|
4
|
-
#AllQ
|
|
5
|
-
|
|
6
|
-
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
7
|
-
|
|
8
|
-
OpenAPI spec version: 1.0
|
|
9
|
-
|
|
10
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
-
Swagger Codegen version: 2.3.1
|
|
12
|
-
|
|
13
|
-
=end
|
|
14
|
-
|
|
15
|
-
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
-
require "allq_client/version"
|
|
17
|
-
|
|
18
|
-
Gem::Specification.new do |s|
|
|
19
|
-
s.name = "allq_client"
|
|
20
|
-
s.version = Allq::VERSION
|
|
21
|
-
s.platform = Gem::Platform::RUBY
|
|
22
|
-
s.authors = ["support@blitline.com"]
|
|
23
|
-
s.email = ["support@blitline.com"]
|
|
24
|
-
s.homepage = "http://www.blitline.com"
|
|
25
|
-
s.summary = "Ruby client for Allq platform"
|
|
26
|
-
s.description = "Allq API Client"
|
|
27
|
-
# TODO uncommnet and update below with a proper license
|
|
28
|
-
#s.license = "Apache 2.0"
|
|
29
|
-
s.required_ruby_version = "> 2.3"
|
|
30
|
-
|
|
31
|
-
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
32
|
-
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
|
33
|
-
|
|
34
|
-
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
35
|
-
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
|
36
|
-
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
|
37
|
-
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
|
38
|
-
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
|
39
|
-
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
|
40
|
-
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
|
41
|
-
|
|
42
|
-
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|
|
43
|
-
s.test_files = `find spec/*`.split("\n")
|
|
44
|
-
s.executables = []
|
|
45
|
-
s.require_paths = ["lib"]
|
|
46
|
-
end
|
data/lib/allq_client.rb
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#AllQ
|
|
3
|
-
|
|
4
|
-
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
|
-
|
|
6
|
-
OpenAPI spec version: 1.0
|
|
7
|
-
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.2
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
# Common files
|
|
14
|
-
require 'allq_client/api_client'
|
|
15
|
-
require 'allq_client/api_error'
|
|
16
|
-
require 'allq_client/version'
|
|
17
|
-
require 'allq_client/configuration'
|
|
18
|
-
|
|
19
|
-
# Models
|
|
20
|
-
require 'allq_client/models/basic_payload'
|
|
21
|
-
require 'allq_client/models/basic_response'
|
|
22
|
-
require 'allq_client/models/job_ref'
|
|
23
|
-
require 'allq_client/models/job_response'
|
|
24
|
-
require 'allq_client/models/multiple_job_response'
|
|
25
|
-
require 'allq_client/models/new_job'
|
|
26
|
-
require 'allq_client/models/new_parent_job'
|
|
27
|
-
require 'allq_client/models/stats_info'
|
|
28
|
-
require 'allq_client/models/stats_results'
|
|
29
|
-
require 'allq_client/models/stats_tube'
|
|
30
|
-
require 'allq_client/models/throttle'
|
|
31
|
-
require 'allq_client/models/tube_ref'
|
|
32
|
-
|
|
33
|
-
# APIs
|
|
34
|
-
require 'allq_client/api/actions_api'
|
|
35
|
-
require 'allq_client/api/admin_api'
|
|
36
|
-
|
|
37
|
-
module Allq
|
|
38
|
-
class << self
|
|
39
|
-
# Customize default settings for the SDK using block.
|
|
40
|
-
# Allq.configure do |config|
|
|
41
|
-
# config.username = "xxx"
|
|
42
|
-
# config.password = "xxx"
|
|
43
|
-
# end
|
|
44
|
-
# If no block given, return the default Configuration object.
|
|
45
|
-
def configure
|
|
46
|
-
if block_given?
|
|
47
|
-
yield(Configuration.default)
|
|
48
|
-
else
|
|
49
|
-
Configuration.default
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|