rhod 0.1.0 → 0.1.1

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: f1d610e43d6cd0ea21bc4bf99bd68e4728f26cbd
4
- data.tar.gz: ea6aba49b9e5df02cedf9988f6ba8915df2e1f99
3
+ metadata.gz: 9e38a0b14c5bc5b47d92df1a87fba15f554276ce
4
+ data.tar.gz: 86bbfc6da898d50d9fe574cd893d112412ce7ac3
5
5
  SHA512:
6
- metadata.gz: 0b30aebc6f171b35d4dc581824d7e0a1466d308e4cc1f4927c5d791d3382ef3b75880cb7e1fa7a122daafd4df45b96c5d978d3ea2e6f377cd933c8cbd6142dc5
7
- data.tar.gz: 2997412a10c2d10e3a3a2f2eca8df58387459f95fbe6a5da15f6473cb07383bdc5bc6c21ad62d83e0572154144cac0d324f0e0322843ac11ec09b0fc7f3573aa
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.with do |conn|
40
- @args = [conn].concat(@args)
41
- @args[0] == nil ? @args.shift : nil
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
@@ -32,6 +32,6 @@ Rhod::Profile.new(:default,
32
32
  retries: 0,
33
33
  backoffs: Rhod::Backoffs::Logarithmic.new(1.3),
34
34
  fallback: nil,
35
- pool: ConnectionPool.new(size: 1, timeout: 0) { nil },
35
+ pool: nil,
36
36
  exceptions: [Exception, StandardError],
37
37
  )
data/lib/rhod/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rhod
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-02 00:00:00.000000000 Z
11
+ date: 2013-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler