right_chimp 2.3.2 → 2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1bf54eceee5dc35f12ef4ca08ce3341583f2577
4
- data.tar.gz: 5df343c6073e9410bdcf29a353f3966de551af54
3
+ metadata.gz: 04449568082cfc3dcd4c7fadd2475e140b66efb1
4
+ data.tar.gz: beeb0e48b958d0240312d01b9bbfed8de239782a
5
5
  SHA512:
6
- metadata.gz: 905d3884002fbea038524868e283362a18786596209af40ce896ad02e1d51031812a159fafb12e0e267874c69184ecfedfdc4fa2b2c0dbebf6e33ba865c698aa
7
- data.tar.gz: a941e1f02e1e0dab426871e470fabfb5e72b2e2798da8725e208a6a5c49e7f62dbf634cdd43c74f38cbd0a2fdd2da4f676efd4a5d045b5105263397f1b776fd9
6
+ metadata.gz: df6e6250529d9e686dce5537d5f5a968f6f509c849020276367b3bf1cadc30f9d3cec31f94384f47d8bbefc2f8cfd207492d6b7c45407dfa6b515d27d5747464
7
+ data.tar.gz: f7200d11f07b933980fbd29d0efd894a42937755610f62ce9e49c13e6e25e078414c0b38de8330a035c59242090b71a96522342216f0ff3466e0941c5c303c33
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ Version 2.4
2
+ -------------
3
+ * Feature: We now allow to customize the polling rate for checking on tasks status.
4
+
1
5
  Version 2.3.2
2
6
  -------------
3
7
  * Bugfix: Previous version broke compatibility with RL10. Now fixed.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- right_chimp (2.3.2)
4
+ right_chimp (2.4)
5
5
  highline (~> 1.7.2)
6
6
  nokogiri (~> 1.6.7.1)
7
7
  progressbar (~> 0.11.0)
@@ -14,14 +14,14 @@ GEM
14
14
  binding_of_caller (0.7.2)
15
15
  debug_inspector (>= 0.0.1)
16
16
  coderay (1.1.1)
17
- debug_inspector (0.0.2)
18
- diff-lcs (1.2.5)
19
- domain_name (0.5.20161021)
17
+ debug_inspector (0.0.3)
18
+ diff-lcs (1.3)
19
+ domain_name (0.5.20170404)
20
20
  unf (>= 0.0.5, < 1.0.0)
21
21
  highline (1.7.8)
22
22
  http-cookie (1.0.3)
23
23
  domain_name (~> 0.5)
24
- json (1.8.3)
24
+ json (2.1.0)
25
25
  method_source (0.8.2)
26
26
  mime-types (2.99.3)
27
27
  mini_portile2 (2.0.0)
@@ -41,27 +41,27 @@ GEM
41
41
  http-cookie (>= 1.0.2, < 2.0)
42
42
  mime-types (>= 1.16, < 3.0)
43
43
  netrc (~> 0.7)
44
- right_api_client (1.6.2)
45
- json (~> 1.0)
44
+ right_api_client (1.6.3)
45
+ json (~> 2)
46
46
  mime-types (~> 2.0)
47
47
  rest-client (~> 1.6)
48
- rspec (3.5.0)
49
- rspec-core (~> 3.5.0)
50
- rspec-expectations (~> 3.5.0)
51
- rspec-mocks (~> 3.5.0)
52
- rspec-core (3.5.4)
53
- rspec-support (~> 3.5.0)
54
- rspec-expectations (3.5.0)
48
+ rspec (3.6.0)
49
+ rspec-core (~> 3.6.0)
50
+ rspec-expectations (~> 3.6.0)
51
+ rspec-mocks (~> 3.6.0)
52
+ rspec-core (3.6.0)
53
+ rspec-support (~> 3.6.0)
54
+ rspec-expectations (3.6.0)
55
55
  diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.5.0)
57
- rspec-mocks (3.5.0)
56
+ rspec-support (~> 3.6.0)
57
+ rspec-mocks (3.6.0)
58
58
  diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.5.0)
60
- rspec-support (3.5.0)
59
+ rspec-support (~> 3.6.0)
60
+ rspec-support (3.6.0)
61
61
  slop (3.6.0)
62
62
  unf (0.1.4)
63
63
  unf_ext
64
- unf_ext (0.0.7.2)
64
+ unf_ext (0.0.7.4)
65
65
 
66
66
  PLATFORMS
67
67
  ruby
@@ -73,4 +73,4 @@ DEPENDENCIES
73
73
  rspec
74
74
 
75
75
  BUNDLED WITH
76
- 1.13.6
76
+ 1.15.1
@@ -9,6 +9,11 @@ module Chimp
9
9
  attr_writer :tasker
10
10
  attr_reader :tasker
11
11
 
12
+ def initialize
13
+ rate = ENV['API_POLLING_RATE'] || 30
14
+ @api_polling_rate = rate.to_i
15
+ end
16
+
12
17
  def wait_for_state(desired_state, timeout = 900)
13
18
  while timeout > 0
14
19
  # Make compatible with RL10.
@@ -20,8 +25,9 @@ module Chimp
20
25
  if status.match('failed') || status.match('aborted')
21
26
  raise "FATAL error, #{status}\n\n Audit: #{friendly_url}\n "
22
27
  end
23
- sleep 30
24
- timeout -= 30
28
+ Log.debug "Polling again in #{@api_polling_rate}"
29
+ sleep @api_polling_rate
30
+ timeout -= @api_polling_rate
25
31
  end
26
32
  raise "FATAL: Timeout waiting for Executable to complete. State was #{status}" if timeout <= 0
27
33
  end
@@ -1,3 +1,3 @@
1
1
  module Chimp
2
- VERSION = '2.3.2'
2
+ VERSION = '2.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_chimp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: '2.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - RightScale Operations
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-22 00:00:00.000000000 Z
11
+ date: 2017-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -197,12 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.6.7
200
+ rubygems_version: 2.5.1
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: RightScale platform command-line tool
204
- test_files:
205
- - spec/chimp_daemon_client_spec.rb
206
- - spec/chimp_daemon_spec.rb
207
- - spec/exec_righscript_spec.rb
208
- - spec/spec_helper.rb
204
+ test_files: []