attempt 0.6.0 → 0.6.1

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
  SHA256:
3
- metadata.gz: 50246b73fb46376da7117edb646bcf0e729f02ae64bf1282d4f352af4c738b47
4
- data.tar.gz: 37037458bafef3d5bc310f4fb4d856af3bd4058cbdeaeaee9af6fde67bf62b5b
3
+ metadata.gz: 9f4489fdcd16a1e4fd93187cf684afc4eb42b9d1b35987372ce099b0081ab938
4
+ data.tar.gz: 0d359e069dded75e7e0871c1903f5950275b5f033e22490ea3358c55e8883df0
5
5
  SHA512:
6
- metadata.gz: b592f0a5df1a9d9a01ce5ec50661fdf4541bab52de11a1c8dff501f55035f072ad9b88c0f53ba7546d509cb4042027cf12a7ad4972b85c124e3f940d8b283b84
7
- data.tar.gz: 0ca007e3d8bdb894e5d2991685dfc00cb3fcf5eb8f4e29205b06d0c862827495ba991d767ff49ea1656c3372d9e0186973a26b7733a8b19ccf7f52085182742d
6
+ metadata.gz: 61728e4d946893471d103dfa8f2114212bf9438774b6636cff3744186fe0c99f7e48687969abe8627aa48b4cdb0d7203666978ded8bae2b3ba9d4f1e2616d57b
7
+ data.tar.gz: a34ac935d3fde78fed37884e93f9019c015a106c15f741732fedd2184c298eb1233ab23f967dfb85bfa6eaf1bb873d6e208730c20cf59cf40bbf101122f5c1a5
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,40 +1,53 @@
1
- == 0.6.0 - 17-Sep-2020
1
+ ## 0.6.1 - 20-Oct-2020
2
+ * Switched the README, MANIFEST and CHANGES to markdown format.
3
+ * Fiddling with the .travis.yml file again.
4
+
5
+ ## 0.6.0 - 17-Sep-2020
6
+
2
7
  * Switched from test-unit to rspec and rewrote the specs.
3
8
 
4
- == 0.5.1 - 28-Aug-2020
9
+ ## 0.5.1 - 28-Aug-2020
10
+
5
11
  * Added a Gemfile.
6
12
  * Updated Rakefile to clean .lock files.
7
13
  * Bumped structured_warnings version to 0.4.0 so that it works with Ruby 2.7.
8
14
  Thanks go to Alexey Zapriy for the spot.
9
15
 
10
- == 0.5.0 - 2-Jun-2020
16
+ ## 0.5.0 - 2-Jun-2020
17
+
11
18
  * Switched to Apache-2.0 license, added LICENSE file.
12
19
  * Updated cert again.
13
20
 
14
- == 0.4.0 - 5-Sep-2017
21
+ ## 0.4.0 - 5-Sep-2017
22
+
15
23
  * Switched constructor to use keyword arguments.
16
24
  * Replaced Timeout with SafeTimeout and added the safe_timeout dependency.
17
25
  * The :log option now accepts either an IO or Logger object.
18
26
  * Updated cert.
19
27
 
20
- == 0.3.2 - 4-Apr-2017
28
+ ## 0.3.2 - 4-Apr-2017
29
+
21
30
  * Fix metadata key names.
22
31
 
23
- == 0.3.1 - 4-Apr-2017
32
+ ## 0.3.1 - 4-Apr-2017
33
+
24
34
  * Added some metadata to the gemspec.
25
35
 
26
- == 0.3.0 - 27-Mar-2017
36
+ ## 0.3.0 - 27-Mar-2017
37
+
27
38
  * The structured_warnings gem requirement was updated to 0.3.0 or later. This
28
39
  is necessary if you are using Ruby 2.4 or later.
29
40
  * The VERSION string is now frozen.
30
41
  * Updated the certs file.
31
42
 
32
- == 0.2.1 - 13-Dec-2015
43
+ ## 0.2.1 - 13-Dec-2015
44
+
33
45
  * This gem is now signed.
34
46
  * Updates to the Rakefile and gemspec.
35
47
  * Added a caveat regarding the timeout module to the README.
36
48
 
37
- == 0.2.0 - 26-Sep-2009
49
+ ## 0.2.0 - 26-Sep-2009
50
+
38
51
  * Now requires and uses the structured_warnings gem. If a block of code fails
39
52
  prior to reaching the maximum number of tries, and warnings are on, then
40
53
  an Attempt::Warning is raised.
@@ -42,16 +55,19 @@
42
55
  * Refactored the attempt.gemspec file a bit.
43
56
  * Added the 'gem' task to the Rakefile.
44
57
 
45
- == 0.1.2 - 1-Aug-2009
58
+ ## 0.1.2 - 1-Aug-2009
59
+
46
60
  * License changed to Artistic 2.0.
47
61
  * Added test-unit as a development dependency.
48
62
  * Test file renamed to more closely follow Ruby style.
49
63
  * Gemspec updates, including addition of license.
50
64
 
51
- == 0.1.1 - 31-Jul-2007
65
+ ## 0.1.1 - 31-Jul-2007
66
+
52
67
  * Added a Rakefile with tasks for testing and installation.
53
68
  * Removed the install.rb file, since installation is now handled by the Rakefile.
54
69
  * Some minor doc updates.
55
70
 
56
- == 0.1.0 - 9-Jun-2006
71
+ ## 0.1.0 - 9-Jun-2006
72
+
57
73
  * Initial commit
@@ -1,7 +1,7 @@
1
- * CHANGES
1
+ * CHANGES.md
2
2
  * LICENSE
3
- * MANIFEST
4
- * README
3
+ * MANIFEST.md
4
+ * README.md
5
5
  * Gemfile
6
6
  * Rakefile
7
7
  * attempt.gemspec
@@ -0,0 +1,84 @@
1
+ ## Description
2
+
3
+ A thin wrapper for begin + rescue + sleep + retry.
4
+
5
+ ## Installation
6
+
7
+ gem install attempt
8
+
9
+ ## Synopsis
10
+
11
+ ```
12
+ require 'attempt'
13
+
14
+ # Attempt to ftp to some host, trying 3 times with 30 seconds between
15
+ # attempts before finally raising an error.
16
+
17
+ attempt(tries: 3, interval: 30){
18
+ Net::FTP.open(host, user, passwd){ ... }
19
+ }
20
+
21
+ # Or, do things the long way...
22
+ code = Attempt.new do |a|
23
+ a.tries = 3
24
+ a.interval = 30
25
+ end
26
+
27
+ code.attempt{
28
+ Net::FTP.open(host, user, passwd){ ... }
29
+ }
30
+ ```
31
+
32
+ ## Known Bugs
33
+
34
+ None that I'm aware of. If you find any bugs, please log them on the project page at:
35
+
36
+ https://github.com/djberg96/attempt
37
+
38
+ ## Caveats
39
+
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.
44
+
45
+ Also, this library uses the timeout library internally, which has some
46
+ known issues. See Future Plans, below.
47
+
48
+ As of version 0.3.0, this library requires structured_warnings 0.3.0 or
49
+ later. This is necessary because of changes in Ruby 2.4.
50
+
51
+ Update: I've switched from the timeout library in the standard library to
52
+ the safe_timeout library which should improve things. In addition, the
53
+ structured_warnings library requirement is now 0.4.0 or later in order to
54
+ work with Ruby 2.7.
55
+
56
+ ## Future Plans
57
+
58
+ Add the ability to set an absolute maximum number of seconds to prevent
59
+ nested sleep/retry from delaying attempts longer than expected.
60
+
61
+ Replace the timeout library with a self selecting pipe if possible.
62
+
63
+ ## Acknowledgements
64
+
65
+ This library is partially based on Mark Fowler's 'Attempt' Perl module.
66
+
67
+ ## Warranty
68
+
69
+ This package is provided "as is" and without any express or
70
+ implied warranties, including, without limitation, the implied
71
+ warranties of merchantability and fitness for a particular purpose.
72
+
73
+ ## License
74
+
75
+ Apache-2.0
76
+
77
+ ## Copyright
78
+
79
+ (C) 2006-2020, Daniel J. Berger
80
+ All Rights Reserved
81
+
82
+ ## Author
83
+
84
+ Daniel J. Berger
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'attempt'
5
- spec.version = '0.6.0'
5
+ spec.version = '0.6.1'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Apache-2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -12,8 +12,6 @@ Gem::Specification.new do |spec|
12
12
  spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
13
13
  spec.cert_chain = Dir['certs/*']
14
14
 
15
- spec.extra_rdoc_files = ['README','CHANGES','MANIFEST']
16
-
17
15
  spec.metadata = {
18
16
  'changelog_uri' => 'https://github.com/djberg96/attempt/blob/master/CHANGES',
19
17
  'source_code_uri' => 'https://github.com/djberg96/attempt/blob/master/lib/attempt.rb',
@@ -6,7 +6,7 @@ require 'structured_warnings'
6
6
  class Attempt
7
7
 
8
8
  # The version of the attempt library.
9
- VERSION = '0.6.0'.freeze
9
+ VERSION = '0.6.1'.freeze
10
10
 
11
11
  # Warning raised if an attempt fails before the maximum number of tries
12
12
  # has been reached.
@@ -23,7 +23,7 @@ RSpec.describe Attempt do
23
23
  end
24
24
 
25
25
  example "version constant is set to expected value" do
26
- expect(Attempt::VERSION).to eq('0.6.0')
26
+ expect(Attempt::VERSION).to eq('0.6.1')
27
27
  expect(Attempt::VERSION).to be_frozen
28
28
  end
29
29
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attempt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -35,7 +35,7 @@ cert_chain:
35
35
  ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
36
36
  WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
37
37
  -----END CERTIFICATE-----
38
- date: 2020-09-17 00:00:00.000000000 Z
38
+ date: 2020-10-20 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: structured_warnings
@@ -88,16 +88,13 @@ description: |2
88
88
  email: djberg96@gmail.com
89
89
  executables: []
90
90
  extensions: []
91
- extra_rdoc_files:
92
- - README
93
- - CHANGES
94
- - MANIFEST
91
+ extra_rdoc_files: []
95
92
  files:
96
- - CHANGES
93
+ - CHANGES.md
97
94
  - Gemfile
98
95
  - LICENSE
99
- - MANIFEST
100
- - README
96
+ - MANIFEST.md
97
+ - README.md
101
98
  - Rakefile
102
99
  - attempt.gemspec
103
100
  - certs/djberg96_pub.pem
metadata.gz.sig CHANGED
Binary file
data/README DELETED
@@ -1,72 +0,0 @@
1
- == Description
2
- A thin wrapper for begin + rescue + sleep + retry.
3
-
4
- == Installation
5
- gem install attempt
6
-
7
- == Synopsis
8
- require 'attempt'
9
-
10
- # Attempt to ftp to some host, trying 3 times with 30 seconds between
11
- # attempts before finally raising an error.
12
-
13
- attempt(tries: 3, interval: 30){
14
- Net::FTP.open(host, user, passwd){ ... }
15
- }
16
-
17
- # Or, do things the long way...
18
- code = Attempt.new do |a|
19
- a.tries = 3
20
- a.interval = 30
21
- end
22
-
23
- code.attempt{
24
- Net::FTP.open(host, user, passwd){ ... }
25
- }
26
-
27
- == Known Bugs
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
- As of version 0.3.0, this library requires structured_warnings 0.3.0 or
43
- later. This is necessary because of changes in Ruby 2.4.
44
-
45
- Update: I've switched from the timeout library in the standard library to
46
- the safe_timeout library which should improve things. In addition, the
47
- structured_warnings library requirement is now 0.4.0 or later in order to
48
- work with Ruby 2.7.
49
-
50
- == Future Plans
51
- Add the ability to set an absolute maximum number of seconds to prevent
52
- nested sleep/retry from delaying attempts longer than expected.
53
-
54
- Replace the timeout library with a self selecting pipe if possible.
55
-
56
- == Acknowledgements
57
- This library is partially based on Mark Fowler's 'Attempt' Perl module.
58
-
59
- == Warranty
60
- This package is provided "as is" and without any express or
61
- implied warranties, including, without limitation, the implied
62
- warranties of merchantability and fitness for a particular purpose.
63
-
64
- == License
65
- Apache-2.0
66
-
67
- == Copyright
68
- (C) 2006-2020, Daniel J. Berger
69
- All Rights Reserved
70
-
71
- == Author
72
- Daniel J. Berger