tretry 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +43 -5
- data/README.md +43 -0
- data/VERSION +1 -1
- data/lib/tretry.rb +114 -67
- data/shippable.yml +9 -0
- data/spec/spec_helper.rb +4 -1
- data/spec/tretry_spec.rb +68 -37
- data/tretry.gemspec +62 -0
- metadata +71 -68
- data/README.rdoc +0 -19
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 71ba2c226763f1363857d05720eb04841030f571
|
4
|
+
data.tar.gz: 76af0ef9b710a8f2bdd216daba264a285e220191
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8a0610e6ccb3124759ec5d40813dd5dd578c03db96704f4e8d1db8be7437f506d120e46557235a8666e898800c952135306e45ebcd6a85c4afc2854753033015
|
7
|
+
data.tar.gz: 35780677e337ba22211de5a2dbb3f6138363ce804c2a27dd5ac60a997ce8cac4410c378c7196833c15932d87cccea7e51ff6d2c020354e25212f30c5d8cd8411
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,16 +1,48 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
+
addressable (2.3.6)
|
5
|
+
builder (3.2.2)
|
6
|
+
codeclimate-test-reporter (0.4.1)
|
7
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
4
8
|
diff-lcs (1.1.3)
|
5
|
-
|
6
|
-
|
9
|
+
docile (1.1.5)
|
10
|
+
faraday (0.8.9)
|
11
|
+
multipart-post (~> 1.2.0)
|
12
|
+
git (1.2.8)
|
13
|
+
github_api (0.10.1)
|
14
|
+
addressable
|
15
|
+
faraday (~> 0.8.1)
|
16
|
+
hashie (>= 1.2)
|
17
|
+
multi_json (~> 1.4)
|
18
|
+
nokogiri (~> 1.5.2)
|
19
|
+
oauth2
|
20
|
+
hashie (3.3.1)
|
21
|
+
highline (1.6.21)
|
22
|
+
jeweler (1.8.8)
|
23
|
+
builder
|
7
24
|
bundler (~> 1.0)
|
8
25
|
git (>= 1.2.5)
|
26
|
+
github_api (= 0.10.1)
|
27
|
+
highline (>= 1.6.15)
|
28
|
+
nokogiri (= 1.5.10)
|
9
29
|
rake
|
10
30
|
rdoc
|
11
|
-
json (1.
|
12
|
-
|
13
|
-
|
31
|
+
json (1.8.1)
|
32
|
+
jwt (1.0.0)
|
33
|
+
multi_json (1.10.1)
|
34
|
+
multi_xml (0.5.5)
|
35
|
+
multipart-post (1.2.0)
|
36
|
+
nokogiri (1.5.10)
|
37
|
+
oauth2 (1.0.0)
|
38
|
+
faraday (>= 0.8, < 0.10)
|
39
|
+
jwt (~> 1.0)
|
40
|
+
multi_json (~> 1.3)
|
41
|
+
multi_xml (~> 0.5)
|
42
|
+
rack (~> 1.2)
|
43
|
+
rack (1.5.2)
|
44
|
+
rake (10.3.2)
|
45
|
+
rdoc (3.12.2)
|
14
46
|
json (~> 1.4)
|
15
47
|
rspec (2.8.0)
|
16
48
|
rspec-core (~> 2.8.0)
|
@@ -20,12 +52,18 @@ GEM
|
|
20
52
|
rspec-expectations (2.8.0)
|
21
53
|
diff-lcs (~> 1.1.2)
|
22
54
|
rspec-mocks (2.8.0)
|
55
|
+
simplecov (0.9.1)
|
56
|
+
docile (~> 1.1.0)
|
57
|
+
multi_json (~> 1.0)
|
58
|
+
simplecov-html (~> 0.8.0)
|
59
|
+
simplecov-html (0.8.0)
|
23
60
|
|
24
61
|
PLATFORMS
|
25
62
|
ruby
|
26
63
|
|
27
64
|
DEPENDENCIES
|
28
65
|
bundler (>= 1.0.0)
|
66
|
+
codeclimate-test-reporter
|
29
67
|
jeweler (~> 1.8.4)
|
30
68
|
rdoc (~> 3.12)
|
31
69
|
rspec (~> 2.8.0)
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
[![Build Status](https://api.shippable.com/projects/540e7b9e3479c5ea8f9ec25b/badge?branchName=master)](https://app.shippable.com/projects/540e7b9e3479c5ea8f9ec25b/builds/latest)
|
2
|
+
[![Code Climate](https://codeclimate.com/github/kaspernj/tretry/badges/gpa.svg)](https://codeclimate.com/github/kaspernj/tretry)
|
3
|
+
[![Test Coverage](https://codeclimate.com/github/kaspernj/tretry/badges/coverage.svg)](https://codeclimate.com/github/kaspernj/tretry)
|
4
|
+
|
5
|
+
# tretry
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'tretry'
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
### Simple retry three times (which is the default)
|
16
|
+
```ruby
|
17
|
+
Tretry.try do
|
18
|
+
# do something that might randomly fail.
|
19
|
+
end
|
20
|
+
```
|
21
|
+
|
22
|
+
### Retry with options
|
23
|
+
```ruby
|
24
|
+
Tretry.try(tries: 3, timeout: 1.5, errors: [SomeCustomError], wait: 1) do
|
25
|
+
# do something.
|
26
|
+
end
|
27
|
+
```
|
28
|
+
|
29
|
+
## Contributing to tretry
|
30
|
+
|
31
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
32
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
33
|
+
* Fork the project.
|
34
|
+
* Start a feature/bugfix branch.
|
35
|
+
* Commit and push until you are happy with your contribution.
|
36
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
37
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
38
|
+
|
39
|
+
## Copyright
|
40
|
+
|
41
|
+
Copyright (c) 2012 Kasper Johansen. See LICENSE.txt for
|
42
|
+
further details.
|
43
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/tretry.rb
CHANGED
@@ -1,93 +1,140 @@
|
|
1
1
|
#A library for doing retries in Ruby with timeouts, analysis of errors, waits between tries and more.
|
2
2
|
class Tretry
|
3
|
+
attr_reader :fails
|
4
|
+
attr_accessor :timeout, :tries, :wait
|
5
|
+
|
3
6
|
#Valid keys that can be given as argument for the method 'try'.
|
4
7
|
VALID_KEYS = [:tries, :timeout, :wait, :interrupt, :exit, :errors, :return_error]
|
5
|
-
|
8
|
+
|
6
9
|
#===Runs a block of code a given amount of times until it succeeds.
|
7
10
|
#===Examples
|
8
11
|
# res = Tretry.try(:tries => 3) do
|
9
12
|
# #something that often fails
|
10
13
|
# end
|
11
|
-
#
|
14
|
+
#
|
12
15
|
# puts "Tries: '#{res[:tries]}'."
|
13
16
|
# puts "Result: '#{res[:result}'."
|
14
17
|
def self.try(args = {}, &block)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
args
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
18
|
+
Tretry.new(args).try(&block)
|
19
|
+
end
|
20
|
+
|
21
|
+
def initialize(args = {})
|
22
|
+
@args = args
|
23
|
+
@fails = []
|
24
|
+
@before_retry = []
|
25
|
+
|
26
|
+
parse_arguments
|
27
|
+
end
|
28
|
+
|
29
|
+
def before_retry(&block)
|
30
|
+
@before_retry << block
|
31
|
+
end
|
32
|
+
|
33
|
+
def try(&block)
|
34
|
+
raise "No block given." unless block
|
35
|
+
@block = block
|
36
|
+
|
37
|
+
@tries.times do |count|
|
38
|
+
@count = count
|
39
|
+
|
40
|
+
unless first_try?
|
41
|
+
# Sleep for a given amount of time if the 'wait'-argument is given.
|
42
|
+
sleep(@wait) if @wait
|
43
|
+
|
44
|
+
call_before_retry(error: @error)
|
45
|
+
@error = nil
|
46
|
+
end
|
47
|
+
|
32
48
|
begin
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
require "timeout"
|
37
|
-
Timeout.timeout(args[:timeout]) do
|
38
|
-
res = block.call
|
39
|
-
dobreak = true
|
40
|
-
break
|
41
|
-
end
|
42
|
-
rescue Timeout::Error => e
|
43
|
-
doraise = e if count <= 1
|
44
|
-
error = e
|
45
|
-
sleep(args[:wait]) if args[:wait] and !doraise
|
46
|
-
end
|
49
|
+
# If a timeout-argument has been given, then run the code through the timeout.
|
50
|
+
if @timeout
|
51
|
+
try_with_timeout
|
47
52
|
else
|
48
|
-
#Else call block normally.
|
49
|
-
res = block.call
|
50
|
-
dobreak = true
|
51
|
-
break
|
53
|
+
# Else call block normally.
|
54
|
+
@res = @block.call
|
55
|
+
@dobreak = true
|
52
56
|
end
|
53
57
|
rescue Exception => e
|
54
|
-
|
55
|
-
raise e if !args.key?(:interrupt) or args[:interrupt]
|
56
|
-
elsif e.class == SystemExit
|
57
|
-
raise e if !args.key?(:exit) or args[:exit]
|
58
|
-
elsif count <= 1 or (args.key?(:errors) and args[:errors].index(e.class) == nil)
|
59
|
-
doraise = e
|
60
|
-
elsif args.key?(:errors) and args[:errors].index(e.class) != nil
|
61
|
-
#given error was in the :errors-array - do nothing. Maybe later it should be logged and returned in a stats-hash or something? - knj
|
62
|
-
end
|
63
|
-
|
64
|
-
error = e
|
65
|
-
|
66
|
-
#Sleep for a given amount of time if the 'wait'-argument is given.
|
67
|
-
sleep(args[:wait]) if args[:wait] and !doraise
|
58
|
+
handle_error(e)
|
68
59
|
end
|
69
|
-
|
70
|
-
if doraise
|
71
|
-
if args[:return_error]
|
72
|
-
|
60
|
+
|
61
|
+
if @doraise
|
62
|
+
if @args[:return_error]
|
63
|
+
@fails << {error: @error}
|
73
64
|
return {
|
74
|
-
:
|
75
|
-
:
|
65
|
+
fails: @fails,
|
66
|
+
error: true
|
76
67
|
}
|
77
68
|
else
|
78
|
-
raise
|
69
|
+
raise @error
|
79
70
|
end
|
80
|
-
elsif error
|
81
|
-
|
71
|
+
elsif @error
|
72
|
+
@fails << {error: @error}
|
82
73
|
end
|
83
|
-
|
84
|
-
break if dobreak
|
74
|
+
|
75
|
+
break if @dobreak
|
85
76
|
end
|
86
|
-
|
77
|
+
|
87
78
|
return {
|
88
|
-
:
|
89
|
-
:
|
90
|
-
:
|
79
|
+
fails: @fails,
|
80
|
+
result: @res,
|
81
|
+
error: false
|
91
82
|
}
|
92
83
|
end
|
93
|
-
|
84
|
+
|
85
|
+
private
|
86
|
+
|
87
|
+
def parse_arguments
|
88
|
+
#Validate given arguments and set various variables.
|
89
|
+
raise "Expected argument to be a hash." unless @args.is_a?(Hash)
|
90
|
+
|
91
|
+
@args.each do |key, val|
|
92
|
+
raise "Invalid key: '#{key}'." unless VALID_KEYS.include?(key)
|
93
|
+
end
|
94
|
+
|
95
|
+
@args[:tries] ||= 3
|
96
|
+
@tries = @args[:tries].to_i
|
97
|
+
@wait = @args[:wait] ? @args[:wait] : nil
|
98
|
+
@timeout = @args[:timeout] ? @args[:timeout].to_f : nil
|
99
|
+
end
|
100
|
+
|
101
|
+
def try_with_timeout
|
102
|
+
begin
|
103
|
+
require "timeout"
|
104
|
+
Timeout.timeout(@timeout) do
|
105
|
+
@res = @block.call
|
106
|
+
@dobreak = true
|
107
|
+
end
|
108
|
+
rescue Timeout::Error => e
|
109
|
+
handle_error(e)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def handle_error(e)
|
114
|
+
if e.class == Interrupt
|
115
|
+
raise e if !@args.key?(:interrupt) || @args[:interrupt]
|
116
|
+
elsif e.class == SystemExit
|
117
|
+
raise e if !@args.key?(:exit) || @args[:exit]
|
118
|
+
elsif last_try? || (@args.key?(:errors) && !@args[:errors].include?(e.class))
|
119
|
+
@doraise = e
|
120
|
+
elsif @args.key?(:errors) && @args[:errors].index(e.class) != nil
|
121
|
+
#given error was in the :errors-array - do nothing. Maybe later it should be logged and returned in a stats-hash or something? - knj
|
122
|
+
end
|
123
|
+
|
124
|
+
@error = e
|
125
|
+
end
|
126
|
+
|
127
|
+
def call_before_retry(args)
|
128
|
+
@before_retry.each do |before_retry_block|
|
129
|
+
before_retry_block.call(args)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
def last_try?
|
134
|
+
(@count + 1) >= @tries
|
135
|
+
end
|
136
|
+
|
137
|
+
def first_try?
|
138
|
+
@count == 0
|
139
|
+
end
|
140
|
+
end
|
data/shippable.yml
ADDED
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require "codeclimate-test-reporter"
|
2
|
+
CodeClimate::TestReporter.start
|
3
|
+
|
1
4
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
5
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
6
|
require 'rspec'
|
@@ -8,5 +11,5 @@ require 'tretry'
|
|
8
11
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
12
|
|
10
13
|
RSpec.configure do |config|
|
11
|
-
|
14
|
+
|
12
15
|
end
|
data/spec/tretry_spec.rb
CHANGED
@@ -1,47 +1,78 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
|
3
3
|
describe "Tretry" do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
try
|
8
|
-
|
9
|
-
|
4
|
+
context "#try" do
|
5
|
+
it "should be able to run blocks" do
|
6
|
+
try = 0
|
7
|
+
res = Tretry.try(tries: 5) do
|
8
|
+
try += 1
|
9
|
+
raise "Test #{try}" if try < 5
|
10
|
+
"kasper"
|
11
|
+
end
|
12
|
+
|
13
|
+
res[:error].should eq false
|
14
|
+
res[:result].should eq "kasper"
|
10
15
|
end
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
|
17
|
+
it "should be able to do waits between tries" do
|
18
|
+
try = 0
|
19
|
+
time_start = Time.now.to_f
|
20
|
+
res = Tretry.try(tries: 5, wait: 0.1) do
|
21
|
+
try += 1
|
22
|
+
raise "Test #{try}" if try < 5
|
23
|
+
"kasper"
|
24
|
+
end
|
25
|
+
|
26
|
+
time_end = Time.now.to_f
|
27
|
+
time_elap = time_end - time_start
|
28
|
+
time_elap.should > 0.4
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should be able to do timeouts with tries" do
|
32
|
+
try = 0
|
33
|
+
res = Tretry.try(tries: 5, timeout: 0.1) do
|
34
|
+
try += 1
|
35
|
+
sleep 0.5 if try < 5
|
36
|
+
"kasper"
|
37
|
+
end
|
38
|
+
|
39
|
+
res[:error].should eq false
|
40
|
+
res[:result].should eq "kasper"
|
41
|
+
res[:fails].length.should eq 4
|
42
|
+
|
43
|
+
res[:fails].each do |err|
|
44
|
+
err[:error].is_a?(Timeout::Error).should eq true
|
45
|
+
end
|
23
46
|
end
|
24
|
-
|
25
|
-
time_end = Time.now.to_f
|
26
|
-
time_elap = time_end - time_start
|
27
|
-
|
28
|
-
raise "Expected time to be more than 0.4 sec but it wasnt: '#{time_elap}'." if time_elap < 0.4
|
29
47
|
end
|
30
|
-
|
31
|
-
it "
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
48
|
+
|
49
|
+
it "#before_retry" do
|
50
|
+
before_retry_count = 0
|
51
|
+
try_count = 0
|
52
|
+
|
53
|
+
try = Tretry.new
|
54
|
+
|
55
|
+
try.before_retry do
|
56
|
+
before_retry_count += 1
|
57
|
+
end
|
58
|
+
|
59
|
+
try.try do
|
60
|
+
try_count += 1
|
61
|
+
raise "test" if try_count < 3
|
37
62
|
end
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
res[:tries].each do |err|
|
44
|
-
raise "Expected error to be 'Timeout::Error' but it wasnt: '#{err[:error].class.name}'." if !err[:error].is_a?(Timeout::Error)
|
63
|
+
|
64
|
+
before_retry_count.should eq 2
|
65
|
+
|
66
|
+
try.fails.each do |try_i|
|
67
|
+
try_i[:error].is_a?(RuntimeError).should eq true
|
45
68
|
end
|
46
69
|
end
|
70
|
+
|
71
|
+
it "should raise an error if fails" do
|
72
|
+
expect {
|
73
|
+
Tretry.try do
|
74
|
+
raise "fail"
|
75
|
+
end
|
76
|
+
}.to raise_error(RuntimeError)
|
77
|
+
end
|
47
78
|
end
|
data/tretry.gemspec
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: tretry 0.0.2 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "tretry"
|
9
|
+
s.version = "0.0.2"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Kasper Johansen"]
|
14
|
+
s.date = "2014-11-21"
|
15
|
+
s.description = "A library for doing retries in Ruby with timeouts, analysis of errors, waits between tries and more."
|
16
|
+
s.email = "k@spernj.org"
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".rspec",
|
24
|
+
"Gemfile",
|
25
|
+
"Gemfile.lock",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"README.md",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"lib/tretry.rb",
|
31
|
+
"shippable.yml",
|
32
|
+
"spec/spec_helper.rb",
|
33
|
+
"spec/tretry_spec.rb",
|
34
|
+
"tretry.gemspec"
|
35
|
+
]
|
36
|
+
s.homepage = "http://github.com/kaspernj/tretry"
|
37
|
+
s.licenses = ["MIT"]
|
38
|
+
s.rubygems_version = "2.4.0"
|
39
|
+
s.summary = "A library for doing retries in Ruby with timeouts, analysis of errors, waits between tries and more."
|
40
|
+
|
41
|
+
if s.respond_to? :specification_version then
|
42
|
+
s.specification_version = 4
|
43
|
+
|
44
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
45
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
46
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
47
|
+
s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
|
48
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
49
|
+
else
|
50
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
51
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
52
|
+
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
53
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
54
|
+
end
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
57
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
58
|
+
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
59
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
metadata
CHANGED
@@ -1,113 +1,116 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: tretry
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Kasper Johansen
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-11-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
17
14
|
name: rspec
|
18
|
-
requirement:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- !ruby/object:Gem::Version
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
23
19
|
version: 2.8.0
|
24
20
|
type: :development
|
25
21
|
prerelease: false
|
26
|
-
version_requirements:
|
27
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.8.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
|
-
requirement:
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
version: "3.12"
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.12'
|
35
34
|
type: :development
|
36
35
|
prerelease: false
|
37
|
-
version_requirements:
|
38
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
39
42
|
name: bundler
|
40
|
-
requirement:
|
41
|
-
|
42
|
-
requirements:
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
43
45
|
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
46
|
+
- !ruby/object:Gem::Version
|
45
47
|
version: 1.0.0
|
46
48
|
type: :development
|
47
49
|
prerelease: false
|
48
|
-
version_requirements:
|
49
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
50
56
|
name: jeweler
|
51
|
-
requirement:
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
- !ruby/object:Gem::Version
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
56
61
|
version: 1.8.4
|
57
62
|
type: :development
|
58
63
|
prerelease: false
|
59
|
-
version_requirements:
|
60
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.8.4
|
69
|
+
description: A library for doing retries in Ruby with timeouts, analysis of errors,
|
70
|
+
waits between tries and more.
|
61
71
|
email: k@spernj.org
|
62
72
|
executables: []
|
63
|
-
|
64
73
|
extensions: []
|
65
|
-
|
66
|
-
extra_rdoc_files:
|
74
|
+
extra_rdoc_files:
|
67
75
|
- LICENSE.txt
|
68
|
-
- README.
|
69
|
-
files:
|
70
|
-
- .document
|
71
|
-
- .rspec
|
76
|
+
- README.md
|
77
|
+
files:
|
78
|
+
- ".document"
|
79
|
+
- ".rspec"
|
72
80
|
- Gemfile
|
73
81
|
- Gemfile.lock
|
74
82
|
- LICENSE.txt
|
75
|
-
- README.
|
83
|
+
- README.md
|
76
84
|
- Rakefile
|
77
85
|
- VERSION
|
78
86
|
- lib/tretry.rb
|
87
|
+
- shippable.yml
|
79
88
|
- spec/spec_helper.rb
|
80
89
|
- spec/tretry_spec.rb
|
81
|
-
|
90
|
+
- tretry.gemspec
|
82
91
|
homepage: http://github.com/kaspernj/tretry
|
83
|
-
licenses:
|
92
|
+
licenses:
|
84
93
|
- MIT
|
94
|
+
metadata: {}
|
85
95
|
post_install_message:
|
86
96
|
rdoc_options: []
|
87
|
-
|
88
|
-
require_paths:
|
97
|
+
require_paths:
|
89
98
|
- lib
|
90
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
-
|
92
|
-
requirements:
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
93
101
|
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
version: "0"
|
99
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
|
-
requirements:
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
102
106
|
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version:
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
105
109
|
requirements: []
|
106
|
-
|
107
110
|
rubyforge_project:
|
108
|
-
rubygems_version:
|
111
|
+
rubygems_version: 2.4.0
|
109
112
|
signing_key:
|
110
|
-
specification_version:
|
111
|
-
summary: A library for doing retries in Ruby with timeouts, analysis of errors, waits
|
113
|
+
specification_version: 4
|
114
|
+
summary: A library for doing retries in Ruby with timeouts, analysis of errors, waits
|
115
|
+
between tries and more.
|
112
116
|
test_files: []
|
113
|
-
|
data/README.rdoc
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
= tretry
|
2
|
-
|
3
|
-
Description goes here.
|
4
|
-
|
5
|
-
== Contributing to tretry
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
-
* Fork the project.
|
10
|
-
* Start a feature/bugfix branch.
|
11
|
-
* Commit and push until you are happy with your contribution.
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
-
|
15
|
-
== Copyright
|
16
|
-
|
17
|
-
Copyright (c) 2012 Kasper Johansen. See LICENSE.txt for
|
18
|
-
further details.
|
19
|
-
|