httparty 0.19.1 → 0.20.0

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
  SHA256:
3
- metadata.gz: 134f3cf0f9ea479c707305768291658882805cb9f0862f470fa72bc1f9dece77
4
- data.tar.gz: f4298e1b5f0faa9ac2b39f1c98b58771b320ea9f1cdb0e97eb6267298b1b39b9
3
+ metadata.gz: bde34a85d8b010341759c1b2b42dfe58cad693c39f047b9803ac90afbc13290b
4
+ data.tar.gz: b5248420c90ea545dfa9e6e234d6c597b4c7306dfc8d58ff94dca82e405e0ed1
5
5
  SHA512:
6
- metadata.gz: 1df45da2bc90c9b7a768ebf6c185140cf17ad22e4df7feb9209ff6ba8c091400e909ae67bcdbedaebc99754c517f42de9bd783153a3733d82a55bd18986ebd66
7
- data.tar.gz: 9c618140ead8569d8c6e5468ac11e60af5ff416b815be83d66e730c5726aac5cecbaf381821c46cd5e625db3bb6b79ef5aa41409efbf4e5f8169f78b2293685d
6
+ metadata.gz: 13316910a85a75d1204c64be41e995475b26abf9aad1165c06349c296d0b3f0f6ae644b00d8bcf14adc3d9a11659bffd060a5101dc88718af74d0324adde9e30
7
+ data.tar.gz: 668fac0ca6a513e64dead9b633ecb12c4ff926cb017e4e7e244249cfb361f93e1aa515ef3fb6b80e6245264e7da38d0599abec9931c5b33b88d7235b966b0aa1
@@ -14,20 +14,10 @@ jobs:
14
14
  steps:
15
15
  - name: Check out repository code
16
16
  uses: actions/checkout@v2
17
- - name: Do some action caching
18
- uses: actions/cache@v1
19
- with:
20
- path: vendor/bundle
21
- key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
22
- restore-keys: |
23
- ${{ runner.os }}-gem-
24
17
  - name: Set up Ruby
25
18
  uses: ruby/setup-ruby@v1
26
19
  with:
27
20
  ruby-version: ${{ matrix.ruby }}
28
- - name: Install bundler
29
- run: gem install bundler
30
- - name: Run bundler
31
- run: bundle install --jobs 4 --retry 3
21
+ bundler-cache: true # Run "bundle install", and cache the result automatically.
32
22
  - name: Run Rake
33
23
  run: bundle exec rake
data/Changelog.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 0.20.0
2
+
3
+ Breaking changes
4
+
5
+ * Require Ruby >= 2.3.0
6
+
7
+ Fixes
8
+
9
+ * [`Marshal.dump` fails on response objects when request option `:logger` is set or `:parser` is a proc](https://github.com/jnunemaker/httparty/pull/714)
10
+ * [Switch `:pem` option to to `OpenSSL::PKey.read` to support other algorithms](https://github.com/jnunemaker/httparty/pull/720)
11
+
1
12
  ## 0.19.1
2
13
 
3
14
  * [Remove use of unary + method for creating non-frozen string to increase compatibility with older versions of ruby](https://github.com/jnunemaker/httparty/commit/4416141d37fd71bdba4f37589ec265f55aa446ce)
data/README.md CHANGED
@@ -12,7 +12,7 @@ gem install httparty
12
12
 
13
13
  ## Requirements
14
14
 
15
- * Ruby 2.0.0 or higher
15
+ * Ruby 2.3.0 or higher
16
16
  * multi_xml
17
17
  * You like to party!
18
18
 
data/httparty.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.summary = 'Makes http fun! Also, makes consuming restful web services dead easy.'
14
14
  s.description = 'Makes http fun! Also, makes consuming restful web services dead easy.'
15
15
 
16
- s.required_ruby_version = '>= 2.0.0'
16
+ s.required_ruby_version = '>= 2.3.0'
17
17
 
18
18
  s.add_dependency 'multi_xml', ">= 0.5.2"
19
19
  s.add_dependency('mime-types', "~> 3.0")
@@ -223,7 +223,7 @@ module HTTParty
223
223
  # Note: options[:pem] must contain the content of a PEM file having the private key appended
224
224
  if options[:pem]
225
225
  http.cert = OpenSSL::X509::Certificate.new(options[:pem])
226
- http.key = OpenSSL::PKey::RSA.new(options[:pem], options[:pem_password])
226
+ http.key = OpenSSL::PKey.read(options[:pem], options[:pem_password])
227
227
  http.verify_mode = verify_ssl_certificate? ? OpenSSL::SSL::VERIFY_PEER : OpenSSL::SSL::VERIFY_NONE
228
228
  end
229
229
 
@@ -46,6 +46,11 @@ module HTTParty
46
46
  end.flatten.join('&')
47
47
  end
48
48
 
49
+ def self._load(data)
50
+ http_method, path, options = Marshal.load(data)
51
+ new(http_method, path, options)
52
+ end
53
+
49
54
  attr_accessor :http_method, :options, :last_response, :redirect, :last_uri
50
55
  attr_reader :path
51
56
 
@@ -175,6 +180,13 @@ module HTTParty
175
180
  @raw_request.body
176
181
  end
177
182
 
183
+ def _dump(_level)
184
+ opts = options.dup
185
+ opts.delete(:logger)
186
+ opts.delete(:parser) if opts[:parser] && opts[:parser].is_a?(Proc)
187
+ Marshal.dump([http_method, path, opts])
188
+ end
189
+
178
190
  private
179
191
 
180
192
  def http
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTTParty
4
- VERSION = '0.19.1'
4
+ VERSION = '0.20.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httparty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
@@ -124,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - ">="
126
126
  - !ruby/object:Gem::Version
127
- version: 2.0.0
127
+ version: 2.3.0
128
128
  required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - ">="