attempt 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Gemfile +8 -0
- data/MANIFEST +1 -0
- data/README +6 -1
- data/Rakefile +29 -29
- data/attempt.gemspec +3 -3
- data/lib/attempt.rb +1 -1
- data/test/test_attempt.rb +1 -1
- metadata +10 -9
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d3a19c0af424d2b75bea45b426104ce8975948ad978e71b8fb27aaad902feeb
|
4
|
+
data.tar.gz: bf8d228e1f539cd01877013452dab333f2af8fc315c70cac1a016abcd7960875
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 065e16dfce9c78d505a81b220e77d5ac0d5855606a4b10b90f2a8fd3dd1d12f7bd83a42268d9e2e2b43db8adaad7506a05cf7ddaba97117ba215c736c6eea3bf
|
7
|
+
data.tar.gz: 29180b07080e2ee8201ef1ac29b9f266b290ee37ac06ccaa27e79c196548afcc8f8daaf3f9535d8eaeb4cc519bdff9572afa0fbee406ce8e09c37eb864cc962a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Gemfile
ADDED
data/MANIFEST
CHANGED
data/README
CHANGED
@@ -42,6 +42,11 @@
|
|
42
42
|
As of version 0.3.0, this library requires structured_warnings 0.3.0 or
|
43
43
|
later. This is necessary because of changes in Ruby 2.4.
|
44
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
|
+
|
45
50
|
== Future Plans
|
46
51
|
Add the ability to set an absolute maximum number of seconds to prevent
|
47
52
|
nested sleep/retry from delaying attempts longer than expected.
|
@@ -60,7 +65,7 @@
|
|
60
65
|
Artistic 2.0
|
61
66
|
|
62
67
|
== Copyright
|
63
|
-
(C) 2006-
|
68
|
+
(C) 2006-2020, Daniel J. Berger
|
64
69
|
All Rights Reserved
|
65
70
|
|
66
71
|
== Author
|
data/Rakefile
CHANGED
@@ -1,29 +1,29 @@
|
|
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
|
+
require 'rake'
|
2
|
+
require 'rake/clean'
|
3
|
+
require 'rake/testtask'
|
4
|
+
|
5
|
+
CLEAN.include('**/*.gem', '**/*.rbc', '**/*.lock')
|
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
|
data/attempt.gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'attempt'
|
5
|
-
spec.version = '0.5.
|
5
|
+
spec.version = '0.5.1'
|
6
6
|
spec.author = 'Daniel J. Berger'
|
7
7
|
spec.license = 'Apache-2.0'
|
8
8
|
spec.email = 'djberg96@gmail.com'
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
'wiki_uri' => 'https://github.com/djberg96/attempt/wiki'
|
22
22
|
}
|
23
23
|
|
24
|
-
spec.add_dependency('structured_warnings', '~> 0.
|
24
|
+
spec.add_dependency('structured_warnings', '~> 0.4.0')
|
25
25
|
spec.add_dependency('safe_timeout', '~> 0.0.5')
|
26
26
|
|
27
27
|
spec.add_development_dependency('test-unit')
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.description = <<-EOF
|
30
30
|
The attempt library provides a thin wrapper for the typical
|
31
31
|
begin/rescue/sleep/retry dance. Use this in order to robustly
|
32
|
-
handle blocks of code that could briefly flake out, such as
|
32
|
+
handle blocks of code that could briefly flake out, such as an http
|
33
33
|
or database connection, where it's often better to try again after
|
34
34
|
a brief period rather than fail immediately.
|
35
35
|
EOF
|
data/lib/attempt.rb
CHANGED
data/test/test_attempt.rb
CHANGED
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attempt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
11
|
- |
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
|
36
36
|
WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date:
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: structured_warnings
|
@@ -43,14 +43,14 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: 0.4.0
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.
|
53
|
+
version: 0.4.0
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: safe_timeout
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
description: |2
|
83
83
|
The attempt library provides a thin wrapper for the typical
|
84
84
|
begin/rescue/sleep/retry dance. Use this in order to robustly
|
85
|
-
handle blocks of code that could briefly flake out, such as
|
85
|
+
handle blocks of code that could briefly flake out, such as an http
|
86
86
|
or database connection, where it's often better to try again after
|
87
87
|
a brief period rather than fail immediately.
|
88
88
|
email: djberg96@gmail.com
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- certs/djberg96_pub.pem
|
105
105
|
- lib
|
106
106
|
- lib/attempt.rb
|
107
|
+
- Gemfile
|
107
108
|
- attempt.gemspec
|
108
109
|
homepage: https://github.com/djberg96/attempt
|
109
110
|
licenses:
|
@@ -113,7 +114,7 @@ metadata:
|
|
113
114
|
source_code_uri: https://github.com/djberg96/attempt/blob/master/lib/attempt.rb
|
114
115
|
bug_tracker_uri: https://github.com/djberg96/attempt/issues
|
115
116
|
wiki_uri: https://github.com/djberg96/attempt/wiki
|
116
|
-
post_install_message:
|
117
|
+
post_install_message:
|
117
118
|
rdoc_options: []
|
118
119
|
require_paths:
|
119
120
|
- lib
|
@@ -128,8 +129,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
129
|
- !ruby/object:Gem::Version
|
129
130
|
version: '0'
|
130
131
|
requirements: []
|
131
|
-
rubygems_version: 3.
|
132
|
-
signing_key:
|
132
|
+
rubygems_version: 3.1.4
|
133
|
+
signing_key:
|
133
134
|
specification_version: 4
|
134
135
|
summary: A thin wrapper for begin + rescue + sleep + retry
|
135
136
|
test_files:
|
metadata.gz.sig
CHANGED
Binary file
|