retryable 1.3.5 → 1.3.6

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
  SHA1:
3
- metadata.gz: 5cc19b6b707fdd02171896378738cffa3c063cc6
4
- data.tar.gz: 70efcfedc8895f963c166ed19374653521fb271a
3
+ metadata.gz: c055a594c5bd9ebeb455b8185e027ea0d2ce259c
4
+ data.tar.gz: 2cbbb09e5958d1f211810dbc762bfd962a102eaf
5
5
  SHA512:
6
- metadata.gz: a302e5df64a1923ef5166f01c3d9ca1e70ee76b07ff50ebe03b51e99d1fb7ce9054aa93cb7e84096fedf7f7d38fbf9866873b6354c6fef5a51457cedf00448e3
7
- data.tar.gz: d59b938aad7314d2ea885e86945642393ad4f11ce3f80b0fedbb22c120593fef03fe1acdbc81dabef9324b77afa4cc2f1922b4bbf0e0630b892de5514d19e215
6
+ metadata.gz: c1f320b8298024f48f24677e4538d6da832287a7f00269da165b41454a242e2777bc7978c84916148afaa50bf63936090ae315da8e151b9fe3d6ae60d7085229
7
+ data.tar.gz: f75b5c6bc559c0b5841a95d74914ac16fe24e399365aed35a3b9c7500c1c08d9a636def180e12f0773558252f1ddc371fcf5496f47e16301f300e00ebef904f2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Retryable 1.3.6 ##
2
+
3
+ * Fixed warning: assigned but unused variable - tries. Thanks @amatsuda
4
+
1
5
  ## Retryable 1.3.5 ##
2
6
 
3
7
  * New callback option(:exception_cb) to run after an rescued exception is introduced. Thanks @jondruse
data/README.md CHANGED
@@ -91,28 +91,52 @@ end
91
91
 
92
92
  Callback to run after an exception is rescued
93
93
  --------
94
+
95
+ ```
94
96
  exception_cb = Proc.new do |exception|
95
- ExceptionNotifier.notify_exception(exception, :data => {:message => "it failed"}) # http://smartinez87.github.io/exception_notification
97
+ # http://smartinez87.github.io/exception_notification
98
+ ExceptionNotifier.notify_exception(exception, :data => {:message => "it failed"})
96
99
  end
97
100
 
98
101
  retryable(:exception_cb => exception_cb) do
99
102
  # perform risky operation
100
103
  end
101
-
104
+ ```
102
105
 
103
106
  You can temporary disable retryable blocks
104
107
  --------
105
108
 
106
109
  ```
107
- Retryble.enabled?
110
+ Retryable.enabled?
108
111
  => true
109
112
 
110
- Retryble.disable
113
+ Retryable.disable
111
114
 
112
- Retryble.enabled?
115
+ Retryable.enabled?
113
116
  => false
114
117
  ```
115
118
 
119
+ Supported Ruby Versions
120
+ -------
121
+
122
+ This library aims to support and is [tested against][travis] the following Ruby
123
+ versions:
124
+
125
+ * Ruby 1.8.7
126
+ * Ruby 1.9.2
127
+ * Ruby 1.9.3
128
+ * Ruby 2.0.0
129
+ * Ruby 2.1.0
130
+
131
+ If something doesn't work on one of these versions, it's a bug.
132
+
133
+ This library may inadvertently work (or seem to work) on other Ruby versions,
134
+ however support will only be provided for the versions listed above.
135
+
136
+ If you would like this library to support another Ruby version or
137
+ implementation, you may volunteer to be a maintainer.
138
+
139
+
116
140
  Installation
117
141
  -------
118
142
 
@@ -134,3 +158,4 @@ gem 'retryable'
134
158
 
135
159
  [Scott Bronson](https://github.com/bronson/retryable)
136
160
 
161
+ [travis]: http://travis-ci.org/nfedyashev/retryable
data/lib/retryable.rb CHANGED
@@ -18,7 +18,7 @@ module Kernel
18
18
  rescue *on_exception => exception
19
19
  raise unless Retryable.enabled?
20
20
  raise unless exception.message =~ opts[:matching]
21
- raise if retries+1 >= opts[:tries]
21
+ raise if retries+1 >= tries
22
22
 
23
23
  # Interrupt Exception could be raised while sleeping
24
24
  begin
@@ -2,7 +2,7 @@ module Retryable
2
2
  class Version
3
3
  MAJOR = 1 unless defined? Retryable::Version::MAJOR
4
4
  MINOR = 3 unless defined? Retryable::Version::MINOR
5
- PATCH = 5 unless defined? Retryable::Version::PATCH
5
+ PATCH = 6 unless defined? Retryable::Version::PATCH
6
6
 
7
7
  class << self
8
8
 
@@ -3,5 +3,5 @@ require 'spec_helper'
3
3
  describe Retryable::Version do
4
4
  subject { Retryable::Version.to_s }
5
5
 
6
- it { should == '1.3.4' }
6
+ it { should == '1.3.5' }
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: retryable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Fedyashev
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-02-01 00:00:00.000000000 Z
13
+ date: 2014-09-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -36,10 +36,10 @@ files:
36
36
  - LICENSE.md
37
37
  - README.md
38
38
  - Rakefile
39
- - retryable.gemspec
39
+ - lib/retryable.rb
40
40
  - lib/retryable/config.rb
41
41
  - lib/retryable/version.rb
42
- - lib/retryable.rb
42
+ - retryable.gemspec
43
43
  - spec/lib/config_spec.rb
44
44
  - spec/lib/retryable_spec.rb
45
45
  - spec/lib/version_spec.rb
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  version: 1.3.6
64
64
  requirements: []
65
65
  rubyforge_project:
66
- rubygems_version: 2.0.2
66
+ rubygems_version: 2.4.1
67
67
  signing_key:
68
68
  specification_version: 4
69
69
  summary: Kernel#retryable, allow for retrying of code blocks.