hal-client 3.1 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class HalClient
2
- VERSION = "3.1"
2
+ VERSION = "3.1.1"
3
3
  end
data/lib/hal_client.rb CHANGED
@@ -76,7 +76,7 @@ class HalClient
76
76
  data
77
77
  end
78
78
 
79
- interpret_response client_for_post(headers).post(url, body: req_body)
79
+ interpret_response client_for_post(override_headers: headers).post(url, body: req_body)
80
80
  end
81
81
 
82
82
  protected
@@ -166,6 +166,18 @@ describe HalClient do
166
166
  end
167
167
  end
168
168
 
169
+ describe "request with different content type" do
170
+ let(:return_val) { client.post url, post_data, "Content-Type" => "text/plain" }
171
+ before do return_val end
172
+ subject { post_request }
173
+ it("should have been made") { should have_been_made }
174
+
175
+ it "sends content type header" do
176
+ expect(post_request.with(headers: {'Content-Type' => 'text/plain'})).
177
+ to have_been_made
178
+ end
179
+ end
180
+
169
181
  context "explicit content type" do
170
182
  before do return_val end
171
183
  subject(:client) { HalClient.new content_type: 'app/test' }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hal-client
3
3
  version: !ruby/object:Gem::Version
4
- version: '3.1'
4
+ version: 3.1.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: 2014-05-29 00:00:00.000000000 Z
12
+ date: 2014-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: http
@@ -190,7 +190,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
190
190
  version: '0'
191
191
  segments:
192
192
  - 0
193
- hash: -1711145322493868301
193
+ hash: 285497498417964511
194
194
  required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  none: false
196
196
  requirements:
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  version: '0'
200
200
  segments:
201
201
  - 0
202
- hash: -1711145322493868301
202
+ hash: 285497498417964511
203
203
  requirements: []
204
204
  rubyforge_project:
205
205
  rubygems_version: 1.8.23