rhod 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rhod/command.rb +6 -4
- data/lib/rhod/profile.rb +1 -1
- data/lib/rhod/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e38a0b14c5bc5b47d92df1a87fba15f554276ce
|
4
|
+
data.tar.gz: 86bbfc6da898d50d9fe574cd893d112412ce7ac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f796a4dbdb6170a7b688f3828a89cadf8be3bc3239e57f3fb2e43656d63522abac99cd7dfb703995d5014540b33c2ddfdee43ce188d8b7d8f9cf2303b783909
|
7
|
+
data.tar.gz: 62dd2d51886b9b78e1f61a60ef5c732562f6064298651a850d4e968c58aac0d3eca3c08174d05ea707214fc10c07e381bed62962ff1e77a30c1f7bdd4a48d94e
|
data/README.md
CHANGED
@@ -63,7 +63,7 @@ Or install it yourself as:
|
|
63
63
|
|
64
64
|
## Configuration
|
65
65
|
|
66
|
-
To configure Rhod's defaults, just overwrite the default profile with any changes you'd like to make.
|
66
|
+
To configure Rhod's defaults, just overwrite the default profile with any changes you'd like to make. If you're on Rails, a good place for your profiles is `config/initializers/rhod.rb`
|
67
67
|
|
68
68
|
```ruby
|
69
69
|
Rhod.create_profile(:default, retries: 10)
|
data/lib/rhod/command.rb
CHANGED
@@ -19,7 +19,6 @@ class Rhod::Command
|
|
19
19
|
@fallback = opts[:fallback]
|
20
20
|
|
21
21
|
@pool = opts[:pool]
|
22
|
-
@pool ||= ConnectionPool.new(size: 1, timeout: 0) { nil }
|
23
22
|
|
24
23
|
@exceptions = opts[:exceptions]
|
25
24
|
@exceptions ||= EXCEPTIONS
|
@@ -36,10 +35,13 @@ class Rhod::Command
|
|
36
35
|
|
37
36
|
def execute
|
38
37
|
begin
|
39
|
-
@pool
|
40
|
-
@
|
41
|
-
|
38
|
+
if @pool
|
39
|
+
@pool.with do |conn|
|
40
|
+
@args = [conn].concat(@args)
|
42
41
|
|
42
|
+
@request.call(*@args)
|
43
|
+
end
|
44
|
+
else
|
43
45
|
@request.call(*@args)
|
44
46
|
end
|
45
47
|
rescue *@exceptions
|
data/lib/rhod/profile.rb
CHANGED
data/lib/rhod/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Bergeron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|