ruby_aem 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4aeb1fe97514d136bf71c865801a2fd01ee6171d
4
- data.tar.gz: 239284f42251a5b5bf498217be67a8ec79ce4589
3
+ metadata.gz: f1040bfc91374ad32876e37979e14d127f15863e
4
+ data.tar.gz: f2bdb8461462ac3cba13faba6be57d76e8b347bd
5
5
  SHA512:
6
- metadata.gz: b9349cc5c4baeeaef1ee58a3e6b7af79b09d178ce0d3c2c724702d1b398424bdb32b8ffc66b2edabe105acdb3474dd434d1346ba5e744d1fa3aba770fa2f7c23
7
- data.tar.gz: ae96390118a070803f81ff2e519d6ff45b27e8a126082055644628ef472053bd6559fb1e8bc26a83e754cb5e40d20d43fcd3e4e1e6e8186bbf97cfc4b28d6d4a
6
+ metadata.gz: a34f54ded219719ab4b1d4def2d1e46d6a7b3b7b558411175b43084cd6e698015d71ca10bac899e001efcd6941327ba3690e29ed715a5c0a5b95c826c2492ef1
7
+ data.tar.gz: b401b22dd6476051f1053b690c1d5e85f4e3d5e82bab9ffcc183a2fb0ee99dd77531a77f4aa01ac23664b8b5d5e9dc07e72b94d009db2ed6525394a0eafc5354
@@ -58,6 +58,11 @@ module RubyAem
58
58
  opts[:_retries][:base_sleep_seconds] ||= 2
59
59
  opts[:_retries][:max_sleep_seconds] ||= 2
60
60
 
61
+ # ensure integer retries setting (Puppet 3 passes numeric string)
62
+ opts[:_retries][:max_tries] = opts[:_retries][:max_tries].to_i
63
+ opts[:_retries][:base_sleep_seconds] = opts[:_retries][:base_sleep_seconds].to_i
64
+ opts[:_retries][:max_sleep_seconds] = opts[:_retries][:max_sleep_seconds].to_i
65
+
61
66
  result = nil
62
67
  with_retries(:max_tries => opts[:_retries][:max_tries], :base_sleep_seconds => opts[:_retries][:base_sleep_seconds], :max_sleep_seconds => opts[:_retries][:max_sleep_seconds]) { |retries_count|
63
68
  begin
@@ -208,6 +208,11 @@ module RubyAem
208
208
  opts[:_retries][:base_sleep_seconds] ||= 2
209
209
  opts[:_retries][:max_sleep_seconds] ||= 2
210
210
 
211
+ # ensure integer retries setting (Puppet 3 passes numeric string)
212
+ opts[:_retries][:max_tries] = opts[:_retries][:max_tries].to_i
213
+ opts[:_retries][:base_sleep_seconds] = opts[:_retries][:base_sleep_seconds].to_i
214
+ opts[:_retries][:max_sleep_seconds] = opts[:_retries][:max_sleep_seconds].to_i
215
+
211
216
  result = upload(file_path, opts)
212
217
  with_retries(:max_tries => opts[:_retries][:max_tries], :base_sleep_seconds => opts[:_retries][:base_sleep_seconds], :max_sleep_seconds => opts[:_retries][:max_sleep_seconds]) { |retries_count|
213
218
  check_result = is_uploaded()
@@ -237,6 +242,11 @@ module RubyAem
237
242
  opts[:_retries][:base_sleep_seconds] ||= 2
238
243
  opts[:_retries][:max_sleep_seconds] ||= 2
239
244
 
245
+ # ensure integer retries setting (Puppet 3 passes numeric string)
246
+ opts[:_retries][:max_tries] = opts[:_retries][:max_tries].to_i
247
+ opts[:_retries][:base_sleep_seconds] = opts[:_retries][:base_sleep_seconds].to_i
248
+ opts[:_retries][:max_sleep_seconds] = opts[:_retries][:max_sleep_seconds].to_i
249
+
240
250
  result = install()
241
251
  with_retries(:max_tries => opts[:_retries][:max_tries], :base_sleep_seconds => opts[:_retries][:base_sleep_seconds], :max_sleep_seconds => opts[:_retries][:max_sleep_seconds]) { |retries_count|
242
252
  check_result = is_installed()
@@ -248,6 +258,40 @@ module RubyAem
248
258
  result
249
259
  end
250
260
 
261
+ # Delete the package and wait until the package status states it is not uploaded.
262
+ #
263
+ # @param opts optional parameters:
264
+ # - _retries: retries library's options (http://www.rubydoc.info/gems/retries/0.0.5#Usage), restricted to max_trie, base_sleep_seconds, max_sleep_seconds
265
+ # @return RubyAem::Result
266
+ def delete_wait_until_ready(
267
+ opts = {
268
+ _retries: {
269
+ max_tries: 30,
270
+ base_sleep_seconds: 2,
271
+ max_sleep_seconds: 2
272
+ }
273
+ })
274
+ opts[:_retries] ||= {}
275
+ opts[:_retries][:max_tries] ||= 30
276
+ opts[:_retries][:base_sleep_seconds] ||= 2
277
+ opts[:_retries][:max_sleep_seconds] ||= 2
278
+
279
+ # ensure integer retries setting (Puppet 3 passes numeric string)
280
+ opts[:_retries][:max_tries] = opts[:_retries][:max_tries].to_i
281
+ opts[:_retries][:base_sleep_seconds] = opts[:_retries][:base_sleep_seconds].to_i
282
+ opts[:_retries][:max_sleep_seconds] = opts[:_retries][:max_sleep_seconds].to_i
283
+
284
+ result = delete()
285
+ with_retries(:max_tries => opts[:_retries][:max_tries], :base_sleep_seconds => opts[:_retries][:base_sleep_seconds], :max_sleep_seconds => opts[:_retries][:max_sleep_seconds]) { |retries_count|
286
+ check_result = is_uploaded()
287
+ puts 'Delete check #%d: %s - %s' % [retries_count, !check_result.data, check_result.message]
288
+ if check_result.data == true
289
+ raise StandardError.new(check_result.message)
290
+ end
291
+ }
292
+ result
293
+ end
294
+
251
295
  end
252
296
  end
253
297
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_aem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shine Solutions
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-08 00:00:00.000000000 Z
12
+ date: 2017-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri