skyfallsin-ruby_bosh 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 0
4
4
  :minor: 5
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)
@@ -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.1
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-09 00:00:00 -07:00
12
+ date: 2009-03-15 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency