waistband 0.3.0 → 0.3.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.
- data/lib/waistband/connection.rb +1 -1
- data/lib/waistband/version.rb +1 -1
- data/spec/lib/connection_spec.rb +3 -1
- metadata +2 -2
data/lib/waistband/connection.rb
CHANGED
|
@@ -62,7 +62,7 @@ module Waistband
|
|
|
62
62
|
Timeout::timeout ::Waistband.config.timeout do
|
|
63
63
|
RestClient.send method_name, full_url, data
|
|
64
64
|
end
|
|
65
|
-
rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ECONNREFUSED
|
|
65
|
+
rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET
|
|
66
66
|
# something's wrong, lets blacklist this sucker
|
|
67
67
|
blacklist! @server
|
|
68
68
|
retry if @retry_on_fail
|
data/lib/waistband/version.rb
CHANGED
data/spec/lib/connection_spec.rb
CHANGED
|
@@ -27,7 +27,7 @@ describe Waistband::Connection do
|
|
|
27
27
|
|
|
28
28
|
describe 'failures' do
|
|
29
29
|
|
|
30
|
-
[Timeout::Error, Errno::EHOSTUNREACH, Errno::ECONNREFUSED].each do |exception|
|
|
30
|
+
[Timeout::Error, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET].each do |exception|
|
|
31
31
|
it "blacklists the server when #{exception}" do
|
|
32
32
|
connection = Waistband::Connection.new(retry_on_fail: false)
|
|
33
33
|
|
|
@@ -56,6 +56,8 @@ describe Waistband::Connection do
|
|
|
56
56
|
|
|
57
57
|
connection = Waistband::Connection.new(orderly: true)
|
|
58
58
|
expect { connection.refresh('events') }.to_not raise_error
|
|
59
|
+
|
|
60
|
+
connection.instance_variable_get('@blacklist').should eql ['567890a5ce74182e5cd123e299993ab510c56123']
|
|
59
61
|
end
|
|
60
62
|
|
|
61
63
|
it "keeps retrying till out of servers when retry_on_fail is true" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: waistband
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-09-
|
|
12
|
+
date: 2013-09-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|