rest-client 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 164c2c41b4ec9185047a9c54005a4cda0d0b00a1
4
- data.tar.gz: 0609bc767927170a96d36f44d01068333764a7f8
3
+ metadata.gz: 10312217af6f5a0312bdce748c8fd82f428fce64
4
+ data.tar.gz: 67846732a7926b335a7082eb1fba0b7178f0c5c4
5
5
  SHA512:
6
- metadata.gz: 134a846db71895039df52e3b65709767f8234df3414f53665228944432f2b5b39eeb5399f1baed1baf47fcd16d031ac5dbb442140e9381175c6c6192170848b8
7
- data.tar.gz: 69cedd07d3fc17d5e983fd264ef38517ea8233fa0f5c9de3f1ffc06f33b2b4902f07d673eb26f6aaca2fe29e3e474f5555f3dec5efb04330df7f4ceadc7316fa
6
+ metadata.gz: 56d9d3140ee5418e9b4e877e9756bbb1a1858314c4487b5d7e41ca5fc72f70532f764dcf480c8c3098f4297025fa66c7d8db0bd890e9ae46459e7478a34a685a
7
+ data.tar.gz: 812f11c8a6c2c4ac5ec68852e75f64ae2d7416ae4683f5ff6525055dbf8e472baed3cc01a85eb76e5da2cb39233ff2dc2129cbdab7165dec89637987b346359b
@@ -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
- | REST Client Team | Andy Brody |
769
- | Creator | Adam Wiggins |
770
- | Maintainers Emeriti | Lawrence Leonard Gilbert, Matthew Manning, Julien Kirch |
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
@@ -1,3 +1,8 @@
1
+ # 2.0.2
2
+
3
+ - Suppress the header override warning introduced in 2.0.1 if the value is the
4
+ same. There's no conflict if the value is unchanged. (#578)
5
+
1
6
  # 2.0.1
2
7
 
3
8
  - Warn if auto-generated headers from the payload, such as Content-Type,
@@ -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")
@@ -1,5 +1,5 @@
1
1
  module RestClient
2
- VERSION_INFO = [2, 0, 1] unless defined?(self::VERSION_INFO)
2
+ VERSION_INFO = [2, 0, 2] unless defined?(self::VERSION_INFO)
3
3
  VERSION = VERSION_INFO.map(&:to_s).join('.') unless defined?(self::VERSION)
4
4
 
5
5
  def self.version
@@ -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
- if ['jruby-19mode', 'jruby-9.0.5.0'].include?(ENV['TRAVIS_RUBY_VERSION'])
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/'
@@ -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.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - REST Client Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-19 00:00:00.000000000 Z
11
+ date: 2017-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webmock
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  version: '0'
245
245
  requirements: []
246
246
  rubyforge_project:
247
- rubygems_version: 2.5.1
247
+ rubygems_version: 2.6.11
248
248
  signing_key:
249
249
  specification_version: 4
250
250
  summary: Simple HTTP and REST client for Ruby, inspired by microframework syntax for