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 +4 -4
- data/.github/workflows/ci.yml +1 -11
- data/Changelog.md +11 -0
- data/README.md +1 -1
- data/httparty.gemspec +1 -1
- data/lib/httparty/connection_adapter.rb +1 -1
- data/lib/httparty/request.rb +12 -0
- data/lib/httparty/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bde34a85d8b010341759c1b2b42dfe58cad693c39f047b9803ac90afbc13290b
|
4
|
+
data.tar.gz: b5248420c90ea545dfa9e6e234d6c597b4c7306dfc8d58ff94dca82e405e0ed1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13316910a85a75d1204c64be41e995475b26abf9aad1165c06349c296d0b3f0f6ae644b00d8bcf14adc3d9a11659bffd060a5101dc88718af74d0324adde9e30
|
7
|
+
data.tar.gz: 668fac0ca6a513e64dead9b633ecb12c4ff926cb017e4e7e244249cfb361f93e1aa515ef3fb6b80e6245264e7da38d0599abec9931c5b33b88d7235b966b0aa1
|
data/.github/workflows/ci.yml
CHANGED
@@ -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
|
-
|
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
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.
|
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
|
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
|
|
data/lib/httparty/request.rb
CHANGED
@@ -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
|
data/lib/httparty/version.rb
CHANGED
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.
|
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.
|
127
|
+
version: 2.3.0
|
128
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - ">="
|