skyfallsin-ruby_bosh 0.5.1 → 0.5.2
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/VERSION.yml +1 -1
- data/lib/ruby_bosh.rb +2 -0
- data/spec/ruby_bosh_spec.rb +7 -0
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/ruby_bosh.rb
CHANGED
@@ -139,6 +139,8 @@ class RubyBOSH
|
|
139
139
|
raise RubyBOSH::Timeout, e.message
|
140
140
|
rescue Errno::ECONNREFUSED => e
|
141
141
|
raise RubyBOSH::ConnFailed, "could not connect to #{@host}\n#{e.message}"
|
142
|
+
rescue Exception => e
|
143
|
+
raise RubyBOSH::Error, e.message
|
142
144
|
end
|
143
145
|
|
144
146
|
def send(msg)
|
data/spec/ruby_bosh_spec.rb
CHANGED
@@ -50,6 +50,13 @@ describe RubyBOSH do
|
|
50
50
|
lambda { @rbosh.connect }.should raise_error(RubyBOSH::Timeout)
|
51
51
|
end
|
52
52
|
|
53
|
+
it "should crash with a generic error on any other problem" do
|
54
|
+
[RestClient::ServerBrokeConnection, RestClient::RequestTimeout].each{|err|
|
55
|
+
RestClient.stub!(:post).and_raise(err)
|
56
|
+
lambda { @rbosh.connect }.should raise_error(RubyBOSH::Error)
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
53
60
|
after(:each) do
|
54
61
|
lambda { @rbosh.connect }.should raise_error(RubyBOSH::Error)
|
55
62
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skyfallsin-ruby_bosh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pradeep Elankumaran
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-15 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|