httpi 1.1.0 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## 1.1.0
1
+ ## 1.1.1 (2012-07-01)
2
+
3
+ * Fix: [#56](https://github.com/rubiii/httpi/pull/56) ensures that the "Cookie"
4
+ header is not set to nil.
5
+
6
+ ## 1.1.0 (2012-06-26)
2
7
 
3
8
  * Refactoring: Moved code that sets the cookies from the last response for the
4
9
  next request from Savon to `HTTPI::Request#set_cookies`.
data/README.md CHANGED
@@ -110,7 +110,7 @@ You can manually specify the adapter to use via:
110
110
  HTTPI.adapter = :curb # or one of [:httpclient, :net_http]
111
111
  ```
112
112
 
113
- If you don't specify which adapter to use, HTTPI try to load HTTPClient, then Curb and finally NetHTTP.
113
+ If you don't specify which adapter to use, HTTPI will try to load HTTPClient, then Curb and finally NetHTTP.
114
114
 
115
115
  #### Notice
116
116
 
data/lib/httpi/request.rb CHANGED
@@ -66,7 +66,8 @@ module HTTPI
66
66
  # Sets the cookies from a given +http_response+.
67
67
  def set_cookies(http_response)
68
68
  cookie_store.add *http_response.cookies
69
- headers["Cookie"] = cookie_store.fetch
69
+ cookies = cookie_store.fetch
70
+ headers["Cookie"] = cookies if cookies
70
71
  end
71
72
 
72
73
  attr_accessor :open_timeout, :read_timeout
data/lib/httpi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module HTTPI
2
2
 
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
 
5
5
  end
@@ -115,7 +115,7 @@ describe HTTPI::Request do
115
115
 
116
116
  it "doesn't do anything if the response contains no cookies" do
117
117
  request.set_cookies HTTPI::Response.new(200, {}, "")
118
- request.headers["Cookie"].should be_nil
118
+ request.headers.should_not include("Cookie")
119
119
  end
120
120
 
121
121
  def response_with_cookie(cookie)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 0
10
- version: 1.1.0
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Harrington
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-06-28 00:00:00 Z
19
+ date: 2012-07-01 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  version_requirements: &id001 !ruby/object:Gem::Requirement