perfect_retry 0.0.1 → 0.1.0

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: df42efb005b014fff2b0f07ecd946275f6b1a5aa
4
- data.tar.gz: 35c9efee15aa976457560695596c2cd81384b7b0
3
+ metadata.gz: 11f50a4eb3fbde940a9d1dc119edeb2eeb861b34
4
+ data.tar.gz: 51505ed2bc45f136f3c31980cee14f014712ffb5
5
5
  SHA512:
6
- metadata.gz: ba546819efc99ae687d3e8903caeb6e57f8275b3dbe26d5579c89993a296295140479b25c94813a03b0438afff3fca865b5c754592279630f354a0b7ff66998a
7
- data.tar.gz: 208cbaf2b5526cbaacb424d28ecd567054135bdf25ae6df5125df2f85fcc2e9c5054d9ace4db7bab05896c5ecbd9be84f420aa442059e0ec87bd56bf3ee7c771
6
+ metadata.gz: 5746dfc42dd2ed22e77f23ef3dbeae562939259d7954535ec764899ae09fff076eee2d1cbdcb95d601e43b85e1a2f95445883e9d47b0bc0b40d19e8bd5294516
7
+ data.tar.gz: 705dc99d1c7cbf1248a925008ce1719a4e92fe4c3dfff399ab394681dc86cf8d47ade8118de05845f7c56c7e07d6dd13f45d8fa52a73e56eb03adcfa6b9445a4
data/NEWS.md ADDED
@@ -0,0 +1,7 @@
1
+ # 0.1.0 2015-11-06
2
+
3
+ - [enhancement] Configure with block on initialize
4
+
5
+ # 0.0.1 2015-11-05
6
+
7
+ First release.
@@ -1,3 +1,3 @@
1
1
  class PerfectRetry
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.1.0".freeze
3
3
  end
data/lib/perfect_retry.rb CHANGED
@@ -38,8 +38,9 @@ class PerfectRetry
38
38
 
39
39
  attr_reader :config
40
40
 
41
- def initialize(config_key = nil)
41
+ def initialize(config_key = nil, &block)
42
42
  @config = REGISTERED_CONFIG[config_key] || default_config
43
+ block.call(@config) if block_given?
43
44
  end
44
45
 
45
46
  def default_config
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perfect_retry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - uu59
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2015-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,6 +78,7 @@ files:
78
78
  - ".travis.yml"
79
79
  - Gemfile
80
80
  - LICENSE.txt
81
+ - NEWS.md
81
82
  - README.md
82
83
  - Rakefile
83
84
  - bin/console