attempt 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f0a8fa37fd280121c41746a996a7cb580aa445e6
4
+ data.tar.gz: 6bf3f7d60a87a1776fc94f862813f64c6a975960
5
+ SHA512:
6
+ metadata.gz: 7363a53147eaa6d0369e2665dd669cf39b28649bc16f89f64144de4a0e8f5d3fe5424b57b6d415dfb3d4a26647fc2bcf8e2e7c5b0f961101ebc44fa1884c4796
7
+ data.tar.gz: 3472ef9f158ffb6ef130c1300bbafd6df46b09cc993b9f7c8d9fd81ef6d9fce100fa314be466128cf7348a46afa47542cfb6838e9a938e8642cbde77254b9956
Binary file
Binary file
data/CHANGES CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.2.1 - 13-Dec-2015
2
+ * This gem is now signed.
3
+ * Updates to the Rakefile and gemspec.
4
+ * Added a caveat regarding the timeout module to the README.
5
+
1
6
  == 0.2.0 - 26-Sep-2009
2
7
  * Now requires and uses the structured_warnings gem. If a block of code fails
3
8
  prior to reaching the maximum number of tries, and warnings are on, then
data/MANIFEST CHANGED
@@ -3,5 +3,6 @@
3
3
  * README
4
4
  * Rakefile
5
5
  * attempt.gemspec
6
+ * certs/djberg96_pub.pem
6
7
  * lib/attempt.rb
7
8
  * test/test_attempt.rb
data/README CHANGED
@@ -1,61 +1,64 @@
1
1
  == Description
2
- A thin wrapper for begin + rescue + sleep + retry.
2
+ A thin wrapper for begin + rescue + sleep + retry.
3
3
 
4
- == Prerequisites
5
- Ruby 1.8.0 or later.
6
-
7
4
  == Installation
8
- rake test (optional)
9
- rake install (non-gem) or rake install_gem (gem)
10
-
5
+ gem install attempt
6
+
11
7
  == Synopsis
12
- require 'attempt'
8
+ require 'attempt'
13
9
 
14
- # Attempt to ftp to some host, trying 3 times with 30 seconds between
15
- # attempts before finally raising an error.
16
- #
17
- attempt(3, 30){
18
- Net::FTP.open(host, user, passwd){ ... }
19
- }
10
+ # Attempt to ftp to some host, trying 3 times with 30 seconds between
11
+ # attempts before finally raising an error.
12
+ #
13
+ attempt(3, 30){
14
+ Net::FTP.open(host, user, passwd){ ... }
15
+ }
20
16
 
21
- # Or, do things the long way...
22
- code = Attempt.new{ |a|
23
- a.tries = 3
24
- a.interval = 30
25
- }
17
+ # Or, do things the long way...
18
+ code = Attempt.new{ |a|
19
+ a.tries = 3
20
+ a.interval = 30
21
+ }
26
22
 
27
- code.attempt{
28
- Net::FTP.open(host, user, passwd){ ... }
29
- }
30
-
31
- == Future Plans
32
- Add the ability to set an absolute maximum number of seconds to prevent
33
- nested sleep/retry from delaying attempts longer than expected.
23
+ code.attempt{
24
+ Net::FTP.open(host, user, passwd){ ... }
25
+ }
34
26
 
35
27
  == Known Bugs
36
- None that I'm aware of. If you find any bugs, please log them on the
37
- project page at http://www.rubyforge.org/projects/shards.
28
+ None that I'm aware of. If you find any bugs, please log them on the
29
+ project page at:
30
+
31
+ https://github.com/djberg96/attempt
32
+
33
+ == Caveats
34
+ Use with caution. Specifically, make sure you aren't inadvertantly
35
+ wrapping code that already performs sleep + retry. Otherwise, you'll
36
+ end up with a series of nested retry's that could take much longer to
37
+ work than you expect.
38
+
39
+ Also, this library uses the timeout library internally, which has some
40
+ known issues. See Future Plans, below.
41
+
42
+ == Future Plans
43
+ Add the ability to set an absolute maximum number of seconds to prevent
44
+ nested sleep/retry from delaying attempts longer than expected.
38
45
 
39
- == Notes From the Author
40
- Use with caution. Specifically, make sure you aren't inadvertantly
41
- wrapping code that already performs sleep + retry. Otherwise, you'll
42
- end up with a series of nested retry's that could take much longer to
43
- work than you expect.
46
+ Replace the timeout library with a self selecting pipe if possible.
44
47
 
45
48
  == Acknowledgements
46
- This library is partially based on Mark Fowler's 'Attempt' Perl module.
49
+ This library is partially based on Mark Fowler's 'Attempt' Perl module.
47
50
 
48
51
  == Warranty
49
- This package is provided "as is" and without any express or
50
- implied warranties, including, without limitation, the implied
51
- warranties of merchantability and fitness for a particular purpose.
52
+ This package is provided "as is" and without any express or
53
+ implied warranties, including, without limitation, the implied
54
+ warranties of merchantability and fitness for a particular purpose.
52
55
 
53
56
  == License
54
- Artistic 2.0
57
+ Artistic 2.0
55
58
 
56
59
  == Copyright
57
- (C) 2006-2009, Daniel J. Berger
58
- All Rights Reserved
60
+ (C) 2006-2015, Daniel J. Berger
61
+ All Rights Reserved
59
62
 
60
63
  == Author
61
- Daniel J. Berger
64
+ Daniel J. Berger
data/Rakefile CHANGED
@@ -1,23 +1,29 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
-
4
- desc "Install the attempt library (non-gem)"
5
- task :install do
6
- cp 'lib/attempt.rb', Config::CONFIG['sitelibdir'], :verbose => true
7
- end
8
-
9
- desc 'Build the gem'
10
- task :gem do
11
- spec = eval(IO.read('attempt.gemspec'))
12
- Gem::Builder.new(spec).build
13
-
14
- desc "Install the attempt library as a gem"
15
- task :install_gem => [:gem] do
16
- file = Dir["*.gem"].first
17
- sh "gem install #{file}"
18
- end
19
-
20
- Rake::TestTask.new do |t|
21
- t.warning = true
22
- t.verbose = true
23
- end
1
+ require 'rake'
2
+ require 'rake/clean'
3
+ require 'rake/testtask'
4
+
5
+ CLEAN.include('**/*.gem', '**/*.rbc')
6
+
7
+ namespace :gem do
8
+ desc 'Build the attempt gem'
9
+ task :create => [:clean] do
10
+ require 'rubygems/package'
11
+ spec = eval(IO.read('attempt.gemspec'))
12
+ spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
13
+ Gem::Package.build(spec, true)
14
+ end
15
+
16
+ desc "Install the attempt gem"
17
+ task :install => [:create] do
18
+ file = Dir["*.gem"].first
19
+ sh "gem install -l #{file}"
20
+ end
21
+ end
22
+
23
+ Rake::TestTask.new do |t|
24
+ task :test => :clean
25
+ t.warning = true
26
+ t.verbose = true
27
+ end
28
+
29
+ task :default => :test
@@ -1,28 +1,27 @@
1
1
  require 'rubygems'
2
2
 
3
- Gem::Specification.new do |gem|
4
- gem.name = 'attempt'
5
- gem.version = '0.2.0'
6
- gem.author = 'Daniel J. Berger'
7
- gem.license = 'Artistic 2.0'
8
- gem.email = 'djberg96@gmail.com'
9
- gem.homepage = 'http://www.rubyforge.org/projects/shards'
10
- gem.summary = 'A thin wrapper for begin + rescue + sleep + retry'
11
- gem.test_file = 'test/test_attempt.rb'
12
- gem.has_rdoc = true
13
- gem.files = Dir['**/*'].reject{ |f| f.include?('CVS') }
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'attempt'
5
+ spec.version = '0.2.1'
6
+ spec.author = 'Daniel J. Berger'
7
+ spec.license = 'Artistic 2.0'
8
+ spec.email = 'djberg96@gmail.com'
9
+ spec.homepage = 'http://github.com/djberg96/attempt'
10
+ spec.summary = 'A thin wrapper for begin + rescue + sleep + retry'
11
+ spec.test_file = 'test/test_attempt.rb'
12
+ spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
13
+ spec.cert_chain = Dir['certs/*']
14
+
15
+ spec.extra_rdoc_files = ['README','CHANGES','MANIFEST']
14
16
 
15
- gem.extra_rdoc_files = ['README','CHANGES','MANIFEST']
16
- gem.rubyforge_project = 'shards'
17
+ spec.add_dependency('structured_warnings')
18
+ spec.add_development_dependency('test-unit')
17
19
 
18
- gem.add_dependency('structured_warnings')
19
- gem.add_development_dependency('test-unit', '>= 2.0.3')
20
-
21
- gem.description = <<-EOF
22
- The attempt library provides a thin wrapper for the typical
23
- begin/rescue/sleep/retry dance. Use this in order to robustly
24
- handle blocks of code that could briefly flake out, such as a socket
25
- or database connection, where it's often better to try again after
26
- a brief period rather than fail immediately.
27
- EOF
20
+ spec.description = <<-EOF
21
+ The attempt library provides a thin wrapper for the typical
22
+ begin/rescue/sleep/retry dance. Use this in order to robustly
23
+ handle blocks of code that could briefly flake out, such as a socket
24
+ or database connection, where it's often better to try again after
25
+ a brief period rather than fail immediately.
26
+ EOF
28
27
  end
@@ -0,0 +1,21 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
3
+ cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
4
+ MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
5
+ ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
6
+ bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
7
+ Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
8
+ S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV6M
9
+ gr0lV/alUr7TNVBDngbXEfTWscyXh1qd7xZ4EcOdsDktCe5G45N/o3662tPQvJsi
10
+ FOF0CM/KuBsa/HL1/eoEmF4B3EKIRfTHrQ3hu20Kv3RJ88QM4ec2+0dd97uX693O
11
+ zv6981fyEg+aXLkxrkViM/tz2qR2ZE0jPhHTREPYeMEgptRkTmWSKAuLVWrJEfgl
12
+ DtkCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFEwe
13
+ nn6bfJADmuIDiMSOzedOrL+xMB0GA1UdEQQWMBSBEmRqYmVyZzk2QGdtYWlsLmNv
14
+ bTAdBgNVHRIEFjAUgRJkamJlcmc5NkBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
15
+ ggEBAHmNOCWoDVD75zHFueY0viwGDVP1BNGFC+yXcb7u2GlK+nEMCORqzURbYPf7
16
+ tL+/hzmePIRz7i30UM//64GI1NLv9jl7nIwjhPpXpf7/lu2I9hOTsvwSumb5UiKC
17
+ /sqBxI3sfj9pr79Wpv4MuikX1XPik7Ncb7NPsJPw06Lvyc3Hkg5X2XpPtLtS+Gr2
18
+ wKJnmzb5rIPS1cmsqv0M9LPWflzfwoZ/SpnmhagP+g05p8bRNKjZSA2iImM/GyYZ
19
+ EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
20
+ tGSHgAmcLlkdGgan182qsE/4kKM=
21
+ -----END CERTIFICATE-----
@@ -4,100 +4,100 @@ require 'structured_warnings'
4
4
  # The Attempt class encapsulates methods related to multiple attempts at
5
5
  # running the same method before actually failing.
6
6
  class Attempt
7
-
8
- # The version of the attempt library.
9
- VERSION = '0.2.0'
10
7
 
11
- # Warning raised if an attempt fails before the maximum number of tries
12
- # has been reached.
13
- class Warning < StandardWarning; end
14
-
15
- # Number of attempts to make before failing. The default is 3.
16
- attr_accessor :tries
17
-
18
- # Number of seconds to wait between attempts. The default is 60.
19
- attr_accessor :interval
20
-
21
- # A boolean value that determines whether errors that would have been
22
- # raised should be sent to STDERR as warnings. The default is true.
23
- attr_accessor :warnings
24
-
25
- # If you provide an IO handle to this option then errors that would
26
- # have been raised are sent to that handle.
27
- attr_accessor :log
28
-
29
- # If set, this increments the interval with each failed attempt by that
30
- # number of seconds.
31
- attr_accessor :increment
32
-
33
- # If set, the code block is further wrapped in a timeout block.
34
- attr_accessor :timeout
35
-
36
- # Determines which exception level to check when looking for errors to
37
- # retry. The default is 'Exception' (i.e. all errors).
38
- attr_accessor :level
39
-
40
- # :call-seq:
41
- # Attempt.new{ |a| ... }
42
- #
43
- # Creates and returns a new +Attempt+ object. Use a block to set the
44
- # accessors.
45
- #
46
- def initialize
47
- @tries = 3 # Reasonable default
48
- @interval = 60 # Reasonable default
49
- @log = nil # Should be an IO handle, if provided
50
- @increment = nil # Should be an int, if provided
51
- @timeout = nil # Wrap the code in a timeout block if provided
52
- @level = Exception # Level of exception to be caught
53
- @warnings = true # Errors sent to STDERR as warnings if true
54
-
55
- yield self if block_given?
8
+ # The version of the attempt library.
9
+ VERSION = '0.2.1'
10
+
11
+ # Warning raised if an attempt fails before the maximum number of tries
12
+ # has been reached.
13
+ class Warning < StandardWarning; end
14
+
15
+ # Number of attempts to make before failing. The default is 3.
16
+ attr_accessor :tries
17
+
18
+ # Number of seconds to wait between attempts. The default is 60.
19
+ attr_accessor :interval
20
+
21
+ # A boolean value that determines whether errors that would have been
22
+ # raised should be sent to STDERR as warnings. The default is true.
23
+ attr_accessor :warnings
24
+
25
+ # If you provide an IO handle to this option then errors that would
26
+ # have been raised are sent to that handle.
27
+ attr_accessor :log
28
+
29
+ # If set, this increments the interval with each failed attempt by that
30
+ # number of seconds.
31
+ attr_accessor :increment
32
+
33
+ # If set, the code block is further wrapped in a timeout block.
34
+ attr_accessor :timeout
35
+
36
+ # Determines which exception level to check when looking for errors to
37
+ # retry. The default is 'Exception' (i.e. all errors).
38
+ attr_accessor :level
39
+
40
+ # :call-seq:
41
+ # Attempt.new{ |a| ... }
42
+ #
43
+ # Creates and returns a new +Attempt+ object. Use a block to set the
44
+ # accessors.
45
+ #
46
+ def initialize
47
+ @tries = 3 # Reasonable default
48
+ @interval = 60 # Reasonable default
49
+ @log = nil # Should be an IO handle, if provided
50
+ @increment = nil # Should be an int, if provided
51
+ @timeout = nil # Wrap the code in a timeout block if provided
52
+ @level = Exception # Level of exception to be caught
53
+ @warnings = true # Errors sent to STDERR as warnings if true
54
+
55
+ yield self if block_given?
56
56
  end
57
-
58
- # Attempt to perform the operation in the provided block up to +tries+
59
- # times, sleeping +interval+ between each try.
60
- #
61
- # You will not typically use this method directly, but the Kernel#attempt
62
- # method instead.
63
- #
64
- def attempt
65
- count = 1
66
- begin
67
- if @timeout
68
- Timeout.timeout(@timeout){ yield }
69
- else
70
- yield
71
- end
72
- rescue @level => error
73
- @tries -= 1
74
- if @tries > 0
75
- msg = "Error on attempt # #{count}: #{error}; retrying"
76
- count += 1
77
- warn Warning, msg if @warnings
78
- @log.puts msg if @log
79
- @interval += @increment if @increment
80
- sleep @interval
81
- retry
82
- end
83
- raise
57
+
58
+ # Attempt to perform the operation in the provided block up to +tries+
59
+ # times, sleeping +interval+ between each try.
60
+ #
61
+ # You will not typically use this method directly, but the Kernel#attempt
62
+ # method instead.
63
+ #
64
+ def attempt
65
+ count = 1
66
+ begin
67
+ if @timeout
68
+ Timeout.timeout(@timeout){ yield }
69
+ else
70
+ yield
84
71
  end
85
- end
72
+ rescue @level => error
73
+ @tries -= 1
74
+ if @tries > 0
75
+ msg = "Error on attempt # #{count}: #{error}; retrying"
76
+ count += 1
77
+ warn Warning, msg if @warnings
78
+ @log.puts msg if @log
79
+ @interval += @increment if @increment
80
+ sleep @interval
81
+ retry
82
+ end
83
+ raise
84
+ end
85
+ end
86
86
  end
87
87
 
88
88
  module Kernel
89
89
  # :call-seq:
90
90
  # attempt(tries = 3, interval = 60, timeout = nil){ # some op }
91
- #
91
+ #
92
92
  # Attempt to perform the operation in the provided block up to +tries+
93
93
  # times, sleeping +interval+ between each try. By default the number
94
94
  # of tries defaults to 3, the interval defaults to 60 seconds, and there
95
95
  # is no timeout specified.
96
- #
96
+ #
97
97
  # If +timeout+ is provided then the operation is wrapped in a Timeout
98
98
  # block as well. This is handy for those rare occasions when an IO
99
99
  # connection could hang indefinitely, for example.
100
- #
100
+ #
101
101
  # If the operation still fails the (last) error is then re-raised.
102
102
  #
103
103
  # This is really just a wrapper for Attempt.new where the simple case is
@@ -108,7 +108,7 @@ module Kernel
108
108
  #
109
109
  # # Make 3 attempts to connect to the database, 60 seconds apart.
110
110
  # attempt{ DBI.connect(dsn, user, passwd) }
111
- #
111
+ #
112
112
  def attempt(tries = 3, interval = 60, timeout = nil, &block)
113
113
  raise 'no block given' unless block_given?
114
114
  Attempt.new{ |a|
@@ -6,47 +6,59 @@
6
6
  #
7
7
  # TODO: Test that an Attempt::Warning is raised.
8
8
  #####################################################################
9
- require 'rubygems'
10
- gem 'test-unit'
11
-
12
- require 'test/unit'
9
+ require 'test-unit'
13
10
  require 'attempt'
14
11
  require 'stringio'
15
12
 
16
13
  class TC_Attempt < Test::Unit::TestCase
17
- def self.startup
18
- $stderr = StringIO.new
19
- end
20
-
21
- def setup
22
- @tries = 2
23
- @interval = 0.1
24
- @timeout = 0.1
25
- end
26
-
27
- def test_version
28
- assert_equal('0.2.0', Attempt::VERSION)
29
- end
30
-
31
- def test_attempt_basic
32
- assert_nothing_raised{ attempt{ 2 + 2 } }
33
- assert_nothing_raised{ attempt(@tries){ 2 + 2 } }
34
- assert_nothing_raised{ attempt(@tries, @interval){ 2 + 2 } }
35
- assert_nothing_raised{ attempt(@tries, @interval, @timeout){ 2 + 2 } }
36
- end
37
-
38
- def test_attempt_expected_errors
39
- assert_raises(Timeout::Error){ attempt(1, 1, @timeout){ sleep 5 } }
40
- assert_raises(RuntimeError){ attempt(2, 2){ raise } }
41
- end
42
-
43
- def teardown
44
- @tries = nil
45
- @interval = nil
46
- @timeout = nil
47
- end
48
-
49
- def self.shutdown
50
- $stderr = STDERR
51
- end
14
+ def self.startup
15
+ $stderr = StringIO.new
16
+ end
17
+
18
+ def setup
19
+ @tries = 2
20
+ @interval = 0.1
21
+ @timeout = 0.1
22
+ $value = 0
23
+ end
24
+
25
+ test "version constant is set to expected value" do
26
+ assert_equal('0.2.1', Attempt::VERSION)
27
+ end
28
+
29
+ test "attempt works as expected without arguments" do
30
+ assert_nothing_raised{ attempt{ 2 + 2 } }
31
+ end
32
+
33
+ test "attempt retries the number of times specified" do
34
+ assert_nothing_raised{ attempt(@tries){ $value += 1; raise if $value < 2 } }
35
+ assert_equal(2, $value)
36
+ end
37
+
38
+ test "attempt retries the number of times specified with interval" do
39
+ assert_nothing_raised{ attempt(@tries, @interval){ $value += 1; raise if $value < 2 } }
40
+ end
41
+
42
+ test "attempt retries the number of times specified with interval and timeout" do
43
+ assert_nothing_raised{ attempt(@tries, @interval, @timeout){ $value += 1; raise if $value < 2 } }
44
+ end
45
+
46
+ test "attempt raises a timeout error if timeout value is exceeded" do
47
+ assert_raises(Timeout::Error){ attempt(1, 1, @timeout){ sleep 5 } }
48
+ end
49
+
50
+ test "attempt raises exception as expected" do
51
+ assert_raises(RuntimeError){ attempt(2, 2){ raise } }
52
+ end
53
+
54
+ def teardown
55
+ @tries = nil
56
+ @interval = nil
57
+ @timeout = nil
58
+ $value = 0
59
+ end
60
+
61
+ def self.shutdown
62
+ $stderr = STDERR
63
+ end
52
64
  end
metadata CHANGED
@@ -1,82 +1,113 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: attempt
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Daniel J. Berger
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
-
12
- date: 2009-09-26 00:00:00 -06:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
14
+ cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
15
+ MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
16
+ ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
17
+ bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
18
+ Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
19
+ S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV6M
20
+ gr0lV/alUr7TNVBDngbXEfTWscyXh1qd7xZ4EcOdsDktCe5G45N/o3662tPQvJsi
21
+ FOF0CM/KuBsa/HL1/eoEmF4B3EKIRfTHrQ3hu20Kv3RJ88QM4ec2+0dd97uX693O
22
+ zv6981fyEg+aXLkxrkViM/tz2qR2ZE0jPhHTREPYeMEgptRkTmWSKAuLVWrJEfgl
23
+ DtkCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFEwe
24
+ nn6bfJADmuIDiMSOzedOrL+xMB0GA1UdEQQWMBSBEmRqYmVyZzk2QGdtYWlsLmNv
25
+ bTAdBgNVHRIEFjAUgRJkamJlcmc5NkBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
26
+ ggEBAHmNOCWoDVD75zHFueY0viwGDVP1BNGFC+yXcb7u2GlK+nEMCORqzURbYPf7
27
+ tL+/hzmePIRz7i30UM//64GI1NLv9jl7nIwjhPpXpf7/lu2I9hOTsvwSumb5UiKC
28
+ /sqBxI3sfj9pr79Wpv4MuikX1XPik7Ncb7NPsJPw06Lvyc3Hkg5X2XpPtLtS+Gr2
29
+ wKJnmzb5rIPS1cmsqv0M9LPWflzfwoZ/SpnmhagP+g05p8bRNKjZSA2iImM/GyYZ
30
+ EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
31
+ tGSHgAmcLlkdGgan182qsE/4kKM=
32
+ -----END CERTIFICATE-----
33
+ date: 2015-12-13 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
16
36
  name: structured_warnings
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
17
42
  type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
21
46
  - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
25
- - !ruby/object:Gem::Dependency
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ - !ruby/object:Gem::Dependency
26
50
  name: test-unit
51
+ requirement: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
27
56
  type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
57
+ prerelease: false
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ requirements:
31
60
  - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.0.3
34
- version:
35
- description: " The attempt library provides a thin wrapper for the typical\n begin/rescue/sleep/retry dance. Use this in order to robustly\n handle blocks of code that could briefly flake out, such as a socket\n or database connection, where it's often better to try again after\n a brief period rather than fail immediately.\n"
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ description: |2
64
+ The attempt library provides a thin wrapper for the typical
65
+ begin/rescue/sleep/retry dance. Use this in order to robustly
66
+ handle blocks of code that could briefly flake out, such as a socket
67
+ or database connection, where it's often better to try again after
68
+ a brief period rather than fail immediately.
36
69
  email: djberg96@gmail.com
37
70
  executables: []
38
-
39
71
  extensions: []
40
-
41
- extra_rdoc_files:
72
+ extra_rdoc_files:
42
73
  - README
43
74
  - CHANGES
44
75
  - MANIFEST
45
- files:
76
+ files:
46
77
  - attempt.gemspec
78
+ - certs
79
+ - certs/djberg96_pub.pem
47
80
  - CHANGES
81
+ - lib
48
82
  - lib/attempt.rb
49
83
  - MANIFEST
50
84
  - Rakefile
51
85
  - README
86
+ - test
52
87
  - test/test_attempt.rb
53
- has_rdoc: true
54
- homepage: http://www.rubyforge.org/projects/shards
55
- licenses:
88
+ homepage: http://github.com/djberg96/attempt
89
+ licenses:
56
90
  - Artistic 2.0
91
+ metadata: {}
57
92
  post_install_message:
58
93
  rdoc_options: []
59
-
60
- require_paths:
94
+ require_paths:
61
95
  - lib
62
- required_ruby_version: !ruby/object:Gem::Requirement
63
- requirements:
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ requirements:
64
98
  - - ">="
65
- - !ruby/object:Gem::Version
66
- version: "0"
67
- version:
68
- required_rubygems_version: !ruby/object:Gem::Requirement
69
- requirements:
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
70
103
  - - ">="
71
- - !ruby/object:Gem::Version
72
- version: "0"
73
- version:
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
74
106
  requirements: []
75
-
76
- rubyforge_project: shards
77
- rubygems_version: 1.3.5
107
+ rubyforge_project:
108
+ rubygems_version: 2.5.1
78
109
  signing_key:
79
- specification_version: 3
110
+ specification_version: 4
80
111
  summary: A thin wrapper for begin + rescue + sleep + retry
81
- test_files:
112
+ test_files:
82
113
  - test/test_attempt.rb
Binary file