rest-client 2.0.1-x86-mingw32 → 2.0.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -7
- data/README.md +6 -7
- data/history.md +5 -0
- data/lib/restclient/request.rb +1 -1
- data/lib/restclient/version.rb +1 -1
- data/spec/integration/httpbin_spec.rb +2 -1
- data/spec/unit/request_spec.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e42274691118daa3db14a998c6d3f37850312300
|
4
|
+
data.tar.gz: 67846732a7926b335a7082eb1fba0b7178f0c5c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 824004c1bff42cacda66c9ba1027b7e4be99fc43af327458f26ceca6eb01fbc5edb201f825ab1744e6438fb614955227cbd1f08225fe8a4df9763b37ea2d2894
|
7
|
+
data.tar.gz: 812f11c8a6c2c4ac5ec68852e75f64ae2d7416ae4683f5ff6525055dbf8e472baed3cc01a85eb76e5da2cb39233ff2dc2129cbdab7165dec89637987b346359b
|
data/.travis.yml
CHANGED
@@ -17,6 +17,8 @@ rvm:
|
|
17
17
|
- "jruby-9.1.5.0"
|
18
18
|
- "jruby-head"
|
19
19
|
|
20
|
+
cache: bundler
|
21
|
+
|
20
22
|
script:
|
21
23
|
bundle exec rake test
|
22
24
|
|
@@ -44,10 +46,3 @@ matrix:
|
|
44
46
|
fast_finish: true
|
45
47
|
|
46
48
|
sudo: false
|
47
|
-
|
48
|
-
|
49
|
-
# Use Java 8 for jruby to fix some Java 7 bugs.
|
50
|
-
addons:
|
51
|
-
apt:
|
52
|
-
packages:
|
53
|
-
- oracle-java8-set-default
|
data/README.md
CHANGED
@@ -762,13 +762,12 @@ Need caching, more advanced logging or any ability provided by Rack middleware?
|
|
762
762
|
Have a look at rest-client-components: http://github.com/crohr/rest-client-components
|
763
763
|
|
764
764
|
## Credits
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
| Major contributions | Blake Mizerany, Julien Kirch |
|
765
|
+
| | |
|
766
|
+
|-------------------------|---------------------------------------------------------|
|
767
|
+
| **REST Client Team** | Andy Brody |
|
768
|
+
| **Creator** | Adam Wiggins |
|
769
|
+
| **Maintainers Emeriti** | Lawrence Leonard Gilbert, Matthew Manning, Julien Kirch |
|
770
|
+
| **Major contributions** | Blake Mizerany, Julien Kirch |
|
772
771
|
|
773
772
|
A great many generous folks have contributed features and patches.
|
774
773
|
See AUTHORS for the full list.
|
data/history.md
CHANGED
data/lib/restclient/request.rb
CHANGED
@@ -373,7 +373,7 @@ module RestClient
|
|
373
373
|
# x-www-form-urlencoded but a Content-Type application/json was
|
374
374
|
# also supplied by the user.
|
375
375
|
payload_headers.each_pair do |key, val|
|
376
|
-
if headers.include?(key)
|
376
|
+
if headers.include?(key) && headers[key] != val
|
377
377
|
warn("warning: Overriding #{key.inspect} header " +
|
378
378
|
"#{headers.fetch(key).inspect} with #{val.inspect} " +
|
379
379
|
"due to payload")
|
data/lib/restclient/version.rb
CHANGED
@@ -13,7 +13,8 @@ describe RestClient::Request do
|
|
13
13
|
def default_httpbin_url
|
14
14
|
# add a hack to work around java/jruby bug
|
15
15
|
# java.lang.RuntimeException: Could not generate DH keypair with backtrace
|
16
|
-
|
16
|
+
# Also (2017-04-09) Travis Jruby versions have a broken CA keystore
|
17
|
+
if ENV['TRAVIS_RUBY_VERSION'] =~ /\Ajruby-/
|
17
18
|
'http://httpbin.org/'
|
18
19
|
else
|
19
20
|
'https://httpbin.org/'
|
data/spec/unit/request_spec.rb
CHANGED
@@ -280,6 +280,13 @@ describe RestClient::Request, :include_helpers do
|
|
280
280
|
}).to match(/warning: Overriding "Content-Length" header/i)
|
281
281
|
end
|
282
282
|
|
283
|
+
it "does not warn when overriding user header with header derived from payload if those header values were identical" do
|
284
|
+
expect(fake_stderr {
|
285
|
+
RestClient::Request.new(method: :post, url: 'example.com',
|
286
|
+
payload: {'foo' => '123456'}, headers: { 'Content-Type' => 'application/x-www-form-urlencoded' })
|
287
|
+
}).not_to match(/warning: Overriding "Content-Type" header/i)
|
288
|
+
end
|
289
|
+
|
283
290
|
it 'does not warn for a normal looking payload' do
|
284
291
|
expect(fake_stderr {
|
285
292
|
RestClient::Request.new(method: :post, url: 'example.com', payload: 'payload')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- REST Client Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: webmock
|
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
requirements: []
|
260
260
|
rubyforge_project:
|
261
|
-
rubygems_version: 2.
|
261
|
+
rubygems_version: 2.6.11
|
262
262
|
signing_key:
|
263
263
|
specification_version: 4
|
264
264
|
summary: Simple HTTP and REST client for Ruby, inspired by microframework syntax for
|