bellbro 0.0.7 → 0.0.8

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: 95fbcfe308030a2cd51631828c526ed99d50e3a0
4
- data.tar.gz: 036bca375f7469e95621470e4a559120e83b777b
3
+ metadata.gz: 5430a1729634a4c4fd1c1c20af5e1287b95663c8
4
+ data.tar.gz: 8c7bb23d0b72b368fba061fa1490c1e08950a213
5
5
  SHA512:
6
- metadata.gz: 2582fd8763e7932f077fa413301f6dd0dcc13975e3cb6bbc66cafc0ebba68c30c34dd90c9287f8f8d4ca4ff8b936a18043485043cb2a40026b22b5a2684c6900
7
- data.tar.gz: 8ae02e6061c12177868a717389e58943e5cc0b36b06f0cfeaee70786cf071a088d00c95dc87a80cb6df78b1e1360c4a110dc50394fa5bdb26ab7420c16764e29
6
+ metadata.gz: 490c58cf1d627a3e79831f44c7e092b938756d513f80fb33acb2d2f1a0287c56c8ab28a9baedc169eb3cc64a9d80d950b4a89234138de587f10a56c09fd3b15e
7
+ data.tar.gz: 1c8b268ecf3ced4f287b93af909aaafea24f7370a1e3e0845cdd8d1b1f39858988fd84f169883ddbb4eb033567cd953fb83bdf32d069abaede1b4f4799659802
data/lib/bellbro/pool.rb CHANGED
@@ -1,5 +1,16 @@
1
1
  module Bellbro
2
2
  module Pool
3
+
4
+ def with_connection(pool_name: nil, &block)
5
+ retryable(sleep: 0.5) do
6
+ connection_pool(pool_name: pool_name).with &block
7
+ end
8
+ end
9
+
10
+ def connection_pool(pool_name: nil)
11
+ self.class.connection_pool(pool_name: pool_name)
12
+ end
13
+
3
14
  def self.included(klass)
4
15
  klass.extend(self)
5
16
 
@@ -7,18 +18,11 @@ module Bellbro
7
18
  def pool(pool_name)
8
19
  @pool_name = pool_name
9
20
  end
10
- end
11
- end
12
21
 
13
- def with_connection(pool_name: nil, &block)
14
- retryable(sleep: 0.5) do
15
- connection_pool(pool_name: pool_name).with &block
22
+ def connection_pool(pool_name: nil)
23
+ Bellbro::Settings.connection_pools[pool_name || @pool_name]
24
+ end
16
25
  end
17
26
  end
18
-
19
- def connection_pool(pool_name: nil)
20
- Bellbro::Settings.connection_pools[pool_name || @pool_name]
21
- end
22
27
  end
23
-
24
28
  end
@@ -1,3 +1,3 @@
1
1
  module Bellbro
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bellbro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Stokes