hugs 2.5.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hugs (2.5.0)
4
+ hugs (2.5.1)
5
5
  multipart-post (~> 1.0.1)
6
6
  net-http-persistent (~> 1.4.1)
7
7
  nokogiri (~> 1.4.4)
data/lib/hugs/client.rb CHANGED
@@ -109,7 +109,7 @@ module Hugs
109
109
  def handle_response request
110
110
  resp = @http.request @url, request
111
111
  Hugs::Errors::status_error resp, @raise_4xx, @raise_5xx
112
- resp.body = parse resp.body
112
+ resp.body = parse resp.body if resp.body
113
113
 
114
114
  resp
115
115
  end
data/lib/hugs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hugs
2
- VERSION = "2.5.1"
2
+ VERSION = "2.5.2"
3
3
  end
@@ -101,6 +101,14 @@ describe Hugs::Client do
101
101
  response.body.must_be_kind_of Nokogiri::XML::Document
102
102
  end
103
103
  end
104
+
105
+ ### TODO: webmock seems to turn nil into "" body. Cannot test a failing case.
106
+ ### TODO: fix when I can.
107
+ it "doesn't parse a nil body" do
108
+ #stub_request(:head, url).to_return :body => nil
109
+
110
+ #@instance.send :response_for, Net::HTTP::Head, "/", {}
111
+ end
104
112
  end
105
113
 
106
114
  describe "encodes request" do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: hugs
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.5.1
5
+ version: 2.5.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - John Dewey
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-05 00:00:00 -07:00
13
+ date: 2011-04-07 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency