aws-sdk-resources 2.2.1 → 2.2.2

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: 79188f3e64d9875b9c7564649df2e02284dec36d
4
- data.tar.gz: 903078a7f825ad182e4891bd8428c759b02ff014
3
+ metadata.gz: 2d7d5a81a230718f428c34cd8c21e99e0781d4a5
4
+ data.tar.gz: bae63ce259614c3a515aed264b21e7925cb67ba4
5
5
  SHA512:
6
- metadata.gz: afffa7e59320166a4e5b115ac1305e0a5808389fafa672e73f7ac76ac456b20450eef00fd2a256dc65c408d7406aa982e7bc7225298c44fd7309dff8cfecf7bd
7
- data.tar.gz: 6b9cbdf8ebe2ff0c4e01a5fe405c2ee0f26d2c641f80da9882a9afa82822852a27e79649b563abac3fcd1235d06327c5c958c8169467dc02597216ef8b2d4073
6
+ metadata.gz: 588c6c64599214272f14e5879c6c2e0005475c60297ec300b5b4f64b96f1a00bb31b130c288d50781e643233e6df2ca7d96141f7755510d7d88684a645ebc0e1
7
+ data.tar.gz: 790d7098714a948d791226a1fd4fd16ff3ccd8c8dbdae18ebeafe02aee300fccd532f2ff1bee57f9678ec8d9cb0167cc196456ed358387b41d67f4bafe71a4ef
@@ -22,28 +22,33 @@ module Aws
22
22
  #
23
23
  # bucket.delete!
24
24
  #
25
- # @option options [Float] :initial_wait (1.3) Initial wait time. Exponentially increased for each attempt.
26
- # [Fixnum] :max_attempts (3) Maximum number of attempts to make before raising Errors::BucketNotEmpty.
25
+ # @option options [Integer] :max_attempts (3) Maximum number of times to
26
+ # attempt to delete the empty bucket before raising
27
+ # `Aws::S3::Errors::BucketNotEmpty`.
28
+ #
29
+ # @option options [Float] :initial_wait (1.3) Seconds to wait before
30
+ # retrying the call to delete the bucket, exponentially increased for
31
+ # each attempt.
27
32
  #
28
33
  # @return [void]
29
- DELETE_BANG_DEFAULTS = { initial_wait: 1.3, max_attempts: 3 }
30
-
31
34
  def delete! options = { }
32
- options = DELETE_BANG_DEFAULTS.merge options
35
+ options = {
36
+ initial_wait: 1.3,
37
+ max_attempts: 3,
38
+ }.merge(options)
33
39
 
34
40
  attempts = 0
35
-
36
41
  begin
37
42
  clear!
38
43
  delete
39
- rescue Errors::BucketNotEmpty => e
44
+ rescue Errors::BucketNotEmpty => error
40
45
  attempts += 1
41
-
42
- raise e if attempts >= options[:max_attempts]
43
-
44
- Kernel.sleep options[:initial_wait] ** attempts
45
-
46
- retry
46
+ if attempts >= options[:max_attempts]
47
+ raise
48
+ else
49
+ Kernel.sleep(options[:initial_wait] ** attempts)
50
+ retry
51
+ end
47
52
  end
48
53
  end
49
54
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2015-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.1
19
+ version: 2.2.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.1
26
+ version: 2.2.2
27
27
  description: Provides resource oriented interfaces and other higher-level abstractions
28
28
  for many AWS services. This gem is part of the official AWS SDK for Ruby.
29
29
  email:
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.4.6
109
+ rubygems_version: 2.2.2
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: AWS SDK for Ruby - Resources