faraday 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/faraday.gemspec +1 -1
- data/lib/faraday/request.rb +1 -1
- data/test/env_test.rb +2 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/faraday.gemspec
CHANGED
data/lib/faraday/request.rb
CHANGED
@@ -63,7 +63,7 @@ module Faraday
|
|
63
63
|
{ :method => request_method,
|
64
64
|
:body => body,
|
65
65
|
:url => connection.build_url(path, env_params),
|
66
|
-
:request_headers => env_headers,
|
66
|
+
:request_headers => env_headers.update(headers),
|
67
67
|
:parallel_manager => connection.parallel_manager,
|
68
68
|
:response => Response.new}
|
69
69
|
end
|
data/test/env_test.rb
CHANGED
@@ -3,7 +3,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
|
|
3
3
|
class TestEnv < Faraday::TestCase
|
4
4
|
describe "Request#create" do
|
5
5
|
before :all do
|
6
|
-
@conn = Faraday::Connection.new :url => 'http://sushi.com/api'
|
6
|
+
@conn = Faraday::Connection.new :url => 'http://sushi.com/api', :headers => {'Mime-Version' => '1.0'}
|
7
7
|
@input = {
|
8
8
|
:body => 'abc',
|
9
9
|
:headers => {'Server' => 'Faraday'}}
|
@@ -25,7 +25,7 @@ class TestEnv < Faraday::TestCase
|
|
25
25
|
|
26
26
|
it "stores headers in :headers" do
|
27
27
|
assert_kind_of Rack::Utils::HeaderHash, @env[:request_headers]
|
28
|
-
assert_equal @input[:headers], @env[:request_headers]
|
28
|
+
assert_equal @input[:headers].merge('Mime-Version' => '1.0'), @env[:request_headers]
|
29
29
|
end
|
30
30
|
|
31
31
|
it "stores body in :body" do
|