allq_rest 1.2.0 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +28 -28
  3. data/README.md +7 -7
  4. data/allq_rest.gemspec +2 -2
  5. data/deploy.sh +1 -1
  6. data/docs/ActionsApi.md +11 -11
  7. data/docs/AdminApi.md +2 -2
  8. data/lib/.DS_Store +0 -0
  9. data/lib/allq_rest.rb +53 -0
  10. data/lib/{allq_client → allq_rest}/.DS_Store +0 -0
  11. data/lib/{allq_client → allq_rest}/api/actions_api.rb +0 -0
  12. data/lib/{allq_client → allq_rest}/api/admin_api.rb +0 -0
  13. data/lib/{allq_client → allq_rest}/api_client.rb +2 -1
  14. data/lib/{allq_client → allq_rest}/api_error.rb +0 -0
  15. data/lib/{allq_client → allq_rest}/configuration.rb +1 -4
  16. data/lib/{allq_client → allq_rest}/models/basic_payload.rb +0 -0
  17. data/lib/{allq_client → allq_rest}/models/basic_response.rb +0 -0
  18. data/lib/{allq_client → allq_rest}/models/job_ref.rb +0 -0
  19. data/lib/{allq_client → allq_rest}/models/job_response.rb +0 -0
  20. data/lib/{allq_client → allq_rest}/models/multiple_job_response.rb +0 -0
  21. data/lib/{allq_client → allq_rest}/models/new_job.rb +15 -4
  22. data/lib/{allq_client → allq_rest}/models/new_parent_job.rb +0 -0
  23. data/lib/{allq_client → allq_rest}/models/stats_info.rb +0 -0
  24. data/lib/{allq_client → allq_rest}/models/stats_results.rb +1 -1
  25. data/lib/{allq_client → allq_rest}/models/stats_tube.rb +0 -0
  26. data/lib/{allq_client → allq_rest}/models/throttle.rb +0 -0
  27. data/lib/{allq_client → allq_rest}/models/tube_ref.rb +0 -0
  28. data/lib/{allq_client → allq_rest}/version.rb +1 -1
  29. data/spec/api/actions_api_spec.rb +101 -91
  30. data/spec/configuration_spec.rb +5 -5
  31. data/spec/spec_helper.rb +3 -1
  32. metadata +37 -39
  33. data/allq_client-1.2.0.gem +0 -0
  34. data/allq_client.gemspec +0 -46
  35. data/lib/allq_client.rb +0 -53
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8686500c26bb7b3aed2588730c25b94afa670e69bcde92d7ca8c45fa47411b5c
4
- data.tar.gz: df4ff43537955e1f842c56a1804c8f00c0131196d666448df3bf6f4f03ecbda9
3
+ metadata.gz: edfdc643e9c8a7043876f6c202be451cb23513ed35555c70f28974acc2252b60
4
+ data.tar.gz: ea9ebce349d569b9b2d57d4fee5b0daee69dae2335d9d06208b4118ab4731bb5
5
5
  SHA512:
6
- metadata.gz: 76720a631bf7f5a2b0d7b881b7ad44d724ea5a5631e713c32f4c04e1b3e03d779d95cca316b1d73745b241234cb8ac3f5c79ea45f76ea16d649c95b8bbc2b9e8
7
- data.tar.gz: a6528bb6d7bdf5d4143f7b18d5d74bcefc5caf73c73d480aff72113519528005eea1e75e3820740396c7d75e8073a3573e0b23efbd658782547b508d3faa564e
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
- allq_client (1.0.0)
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.11.1)
12
- addressable (2.5.2)
13
- public_suffix (>= 2.0.2, < 4.0)
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.14)
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.3)
23
- ethon (0.11.0)
24
- ffi (>= 1.3.0)
25
- ffi (1.9.25)
26
- hashdiff (0.3.7)
27
- json (2.1.0)
28
- public_suffix (3.0.3)
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.8.0)
31
- rspec-core (~> 3.8.0)
32
- rspec-expectations (~> 3.8.0)
33
- rspec-mocks (~> 3.8.0)
34
- rspec-core (3.8.0)
35
- rspec-support (~> 3.8.0)
36
- rspec-expectations (3.8.2)
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.8.0)
39
- rspec-mocks (3.8.0)
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.8.0)
42
- rspec-support (3.8.0)
43
- safe_yaml (1.0.4)
44
- sys-uname (1.0.3)
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.3.0)
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
- allq_client!
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
- 1.16.2
69
+ 2.2.3
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # allq_client
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 allq_client.gemspec
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 ./allq_client-1.0.0.gem
26
+ gem install ./allq_rest-1.0.0.gem
27
27
  ```
28
- (for development, run `gem install --dev ./allq_client-1.0.0.gem` to install the development dependencies)
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 'allq_client', '~> 1.0.0'
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 'allq_client', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'
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 'allq_client'
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 "allq_client/version"
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
- #s.license = "Apache 2.0"
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
@@ -1,3 +1,3 @@
1
1
  echo "Did you update the version?"
2
2
  gem build allq_rest.gemspec
3
- gem push allq_rest-1.2.0.gem
3
+ gem push allq_rest-1.2.5.gem
data/docs/ActionsApi.md CHANGED
@@ -27,7 +27,7 @@ Bury Job
27
27
  ### Example
28
28
  ```ruby
29
29
  # load the gem
30
- require 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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 'allq_client'
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
- URI.encode(@config.base_url + path)
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
- URI.encode(url)
175
+ url
179
176
  end
180
177
 
181
178
  # Gets API key (with prefix if set).
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
@@ -202,7 +202,7 @@ module Allq
202
202
  end
203
203
  end
204
204
  else # model
205
- temp_model = SwaggerClient.const_get(type).new
205
+ temp_model = Allq.const_get(type).new
206
206
  temp_model.build_from_hash(value)
207
207
  end
208
208
  end
File without changes
File without changes
File without changes
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.2
11
11
  =end
12
12
 
13
13
  module Allq
14
- VERSION = '1.2.0'
14
+ VERSION = '1.2.5'
15
15
  end
@@ -21,8 +21,16 @@ ALT_TUBE = ""
21
21
  describe 'ActionsApi' do
22
22
  before do
23
23
  # run before each test
24
- @instance = Allq::ActionsApi.new
25
- stats_result = AllQTools::get_stats[0]
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
- AllQTools::add_job
50
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_buried(DEFAULT_TUBE)).to eq(1)
54
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(0)
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
- AllQTools::add_job
68
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_ready(DEFAULT_TUBE)).to eq(0)
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
- AllQTools::add_job
91
+ @allq_tool.add_job
84
92
  job = @instance.job_get(DEFAULT_TUBE)
85
- expect(AllQTools::get_reserved(DEFAULT_TUBE)).to eq(1)
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
- AllQTools::add_job
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(AllQTools::get_ready(DEFAULT_TUBE)).to eq(2)
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(AllQTools::get_reserved(DEFAULT_TUBE)).to eq(0)
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(AllQTools::get_ready(DEFAULT_TUBE)).to eq(0)
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
- AllQTools::add_job
124
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_parents(DEFAULT_TUBE)).to eq(1)
148
- job = AllQTools::new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
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 = AllQTools::new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
158
+ job = @allq_tool.new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
151
159
  @instance.job_post(job)
152
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(2)
153
- AllQTools::get_finish(DEFAULT_TUBE)
154
- AllQTools::get_finish(DEFAULT_TUBE)
155
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
156
- expect(AllQTools::get_parents(DEFAULT_TUBE)).to eq(0)
157
- AllQTools::get_finish(DEFAULT_TUBE)
158
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(0)
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(AllQTools::get_parents(DEFAULT_TUBE)).to eq(1)
187
+ expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(1)
180
188
 
181
- job = AllQTools::new_job('foo', nil, new_parent_job_response.job_id)
189
+ job = @allq_tool.new_job('foo', nil, new_parent_job_response.job_id)
182
190
  @instance.job_post(job)
183
- job = AllQTools::new_job('foo', nil, new_parent_job_response.job_id)
191
+ job = @allq_tool.new_job('foo', nil, new_parent_job_response.job_id)
184
192
  @instance.job_post(job)
185
- expect(AllQTools::get_ready('foo')).to eq(2)
186
- AllQTools::get_finish('foo')
187
- AllQTools::get_finish('foo')
188
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
189
- expect(AllQTools::get_parents(DEFAULT_TUBE)).to eq(0)
190
- AllQTools::get_finish(DEFAULT_TUBE)
191
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(0)
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(AllQTools::get_parents(DEFAULT_TUBE)).to eq(1)
220
+ expect(@allq_tool.get_parents(DEFAULT_TUBE)).to eq(1)
213
221
 
214
- job = AllQTools::new_job('foo', nil, new_parent_job_response.job_id)
222
+ job = @allq_tool.new_job('foo', nil, new_parent_job_response.job_id)
215
223
  @instance.job_post(job)
216
- expect(AllQTools::get_ready('foo')).to eq(1)
217
- expect(AllQTools::get_parents(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_parents(DEFAULT_TUBE)).to eq(0)
221
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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
- AllQTools::add_job
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
- AllQTools::add_job
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
- AllQTools::add_job
276
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_reserved(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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
- AllQTools::add_job
288
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_parents(DEFAULT_TUBE)).to eq(1)
321
- job = AllQTools::new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
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 = AllQTools::new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
331
+ job = @allq_tool.new_job(DEFAULT_TUBE, nil, new_parent_job_response.job_id)
324
332
  @instance.job_post(job)
325
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(2)
326
- AllQTools::get_finish(DEFAULT_TUBE)
327
- AllQTools::get_finish(DEFAULT_TUBE)
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(AllQTools::get_ready(DEFAULT_TUBE)).to eq(0)
337
+ expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0)
330
338
  # Parent still waiting
331
- expect(AllQTools::get_parents(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
336
- expect(AllQTools::get_parents(DEFAULT_TUBE)).to eq(0)
337
- AllQTools::get_finish(DEFAULT_TUBE)
338
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(0)
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
- AllQTools::add_job
364
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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 = AllQTools::get_stats[0]
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
- AllQTools::add_job
380
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1)
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(AllQTools::get_ready("alt_tube2")).to eq(2) # OK..it's there
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(AllQTools::get_ready("alt_tube2")).to eq(1)
435
- expect(AllQTools::get_reserved("alt_tube2")).to eq(1)
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(AllQTools::get_ready(alt_tube_name)).to eq(3) # OK..it's there
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(AllQTools::get_reserved(alt_tube_name)).to eq(1) # OK..it's there
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(AllQTools::get_reserved(alt_tube_name)).to eq(2) # OK..it's there
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(AllQTools::get_buried(alt_tube_name)).to eq(1)
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(AllQTools::get_buried(alt_tube_name)).to eq(0)
449
- expect(AllQTools::get_reserved(alt_tube_name)).to eq(0) # OK..it's there
450
- expect(AllQTools::get_ready(alt_tube_name)).to eq(0)
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(AllQTools::get_ready("alt_tube2")).to eq(1)
454
- expect(AllQTools::get_reserved("alt_tube2")).to eq(1)
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(AllQTools::get_ready(DEFAULT_TUBE)).to eq(0) # Too soon to show up
477
+ expect(@allq_tool.get_ready(DEFAULT_TUBE)).to eq(0) # Too soon to show up
470
478
  sleep(4)
471
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1) # OK..it's there
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(AllQTools::get_reserved(DEFAULT_TUBE)).to eq(1)
496
+ expect(@allq_tool.get_reserved(DEFAULT_TUBE)).to eq(1)
489
497
  sleep(5)
490
- expect(AllQTools::get_reserved(DEFAULT_TUBE)).to eq(0) # Should expire
491
- expect(AllQTools::get_ready(DEFAULT_TUBE)).to eq(1) # ..and be back in ready
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
- module AllQTools
499
- class << self
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 = Allq::ActionsApi.new
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 = Allq::ActionsApi.new
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 = Allq::AdminApi.new
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
@@ -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
- #uri = URI.parse("http://localhost:8090")
22
- #Allq.configure do |c|
23
- # c.host = uri.host
24
- # c.base_path = uri.path
25
- #end
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 'allq_client'
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.0
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: 2020-09-05 00:00:00.000000000 Z
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/allq_client.rb
224
- - lib/allq_client/.DS_Store
225
- - lib/allq_client/api/actions_api.rb
226
- - lib/allq_client/api/admin_api.rb
227
- - lib/allq_client/api_client.rb
228
- - lib/allq_client/api_error.rb
229
- - lib/allq_client/configuration.rb
230
- - lib/allq_client/models/basic_payload.rb
231
- - lib/allq_client/models/basic_response.rb
232
- - lib/allq_client/models/job_ref.rb
233
- - lib/allq_client/models/job_response.rb
234
- - lib/allq_client/models/multiple_job_response.rb
235
- - lib/allq_client/models/new_job.rb
236
- - lib/allq_client/models/new_parent_job.rb
237
- - lib/allq_client/models/stats_info.rb
238
- - lib/allq_client/models/stats_results.rb
239
- - lib/allq_client/models/stats_tube.rb
240
- - lib/allq_client/models/throttle.rb
241
- - lib/allq_client/models/tube_ref.rb
242
- - lib/allq_client/version.rb
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
- rubyforge_project:
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
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