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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7daaaafbdaedaa5d2c14644448f0afcece83be44d30067c6e29bd562c1e6989
4
- data.tar.gz: 61406306a6f711adf207b6bfc239bc70d93c643d9bc8c96f778c487fac874b71
3
+ metadata.gz: 4d3a19c0af424d2b75bea45b426104ce8975948ad978e71b8fb27aaad902feeb
4
+ data.tar.gz: bf8d228e1f539cd01877013452dab333f2af8fc315c70cac1a016abcd7960875
5
5
  SHA512:
6
- metadata.gz: 98dc12f21534b1db26856f4d6f4b6eac25e4a069f9d11cb5ff46d76be70e3f5e95f999c0d7c754ad96dfa2ae5379199ed8fb7baff26a1579fc7dba6d975ac65b
7
- data.tar.gz: 1635780b3a3e85228eda2667dcab7ace1ced12c4e49988846e9b663ed7b7f532e25ad3256608b15ee7690c5f7d5a293a8402b8e4bd25eea9aa3844ec02b34184
6
+ metadata.gz: 065e16dfce9c78d505a81b220e77d5ac0d5855606a4b10b90f2a8fd3dd1d12f7bd83a42268d9e2e2b43db8adaad7506a05cf7ddaba97117ba215c736c6eea3bf
7
+ data.tar.gz: 29180b07080e2ee8201ef1ac29b9f266b290ee37ac06ccaa27e79c196548afcc8f8daaf3f9535d8eaeb4cc519bdff9572afa0fbee406ce8e09c37eb864cc962a
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org' do
2
+ gem 'rake'
3
+ gem 'structured_warnings', '~> 0.4.0'
4
+ gem 'safe_timeout', '~> 0.0.5'
5
+ group 'test' do
6
+ gem 'test-unit', '~> 3.0'
7
+ end
8
+ end
data/MANIFEST CHANGED
@@ -2,6 +2,7 @@
2
2
  * LICENSE
3
3
  * MANIFEST
4
4
  * README
5
+ * Gemfile
5
6
  * Rakefile
6
7
  * attempt.gemspec
7
8
  * certs/djberg96_pub.pem
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-2017, Daniel J. Berger
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
@@ -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.0'
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.3.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 a socket
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
@@ -6,7 +6,7 @@ require 'structured_warnings'
6
6
  class Attempt
7
7
 
8
8
  # The version of the attempt library.
9
- VERSION = '0.5.0'.freeze
9
+ VERSION = '0.5.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 @@ class TC_Attempt < Test::Unit::TestCase
23
23
  end
24
24
 
25
25
  test "version constant is set to expected value" do
26
- assert_equal('0.5.0', Attempt::VERSION)
26
+ assert_equal('0.5.1', Attempt::VERSION)
27
27
  assert_true(Attempt::VERSION.frozen?)
28
28
  end
29
29
 
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.0
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.3.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.3.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 a socket
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.0.8
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