httparty 0.17.1 → 0.17.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of httparty might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/Changelog.md +9 -1
- data/lib/httparty/response.rb +14 -0
- data/lib/httparty/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 85f5f4bb0960433348095eae8acb0b225633c8ff3c7feaa0b40049200dfc0c20
|
4
|
+
data.tar.gz: 8eb65aee38c9e7b0d3652ef420b10c53b600be16696960e271f4cd0f0fa1566b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad2f36dbbe08553ba810315e7bebe45a1d97af8f3de987d1839895fc974fe96a6a0765e0bdc0451af1379e67922e6b82df119e08b8bd0a7c956933ce388a3b64
|
7
|
+
data.tar.gz: a2df829fcf5ee3d115de2657ccc4a70f16d97705a5a94013e22aa4d150cb3605d3afeabda6a2cd7cec3ebe7c0ff7546476b8af5de4b59383d591e9120baada82
|
data/Changelog.md
CHANGED
@@ -1,8 +1,16 @@
|
|
1
|
+
## 0.17.3
|
2
|
+
|
3
|
+
0.17.2 is broken https://github.com/jnunemaker/httparty/issues/681
|
4
|
+
|
5
|
+
## 0.17.2
|
6
|
+
|
7
|
+
* [Add Response#nil? deprecetion warning](https://github.com/jnunemaker/httparty/pull/680)
|
8
|
+
|
1
9
|
## 0.17.1
|
2
10
|
|
3
11
|
* [Pass options to dynamic block headers](https://github.com/jnunemaker/httparty/pull/661)
|
4
12
|
* [Normalize urls with URI adapter to allow International Domain Names support](https://github.com/jnunemaker/httparty/pull/668)
|
5
|
-
* [Add max_retries support](https://github.com/jnunemaker/httparty/pull/
|
13
|
+
* [Add max_retries support](https://github.com/jnunemaker/httparty/pull/660)
|
6
14
|
* [Minize gem size by removing test files](https://github.com/jnunemaker/httparty/pull/658)
|
7
15
|
|
8
16
|
## 0.17.0
|
data/lib/httparty/response.rb
CHANGED
@@ -79,6 +79,7 @@ module HTTParty
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def nil?
|
82
|
+
warn_about_nil_deprecation
|
82
83
|
response.nil? || response.body.nil? || response.body.empty?
|
83
84
|
end
|
84
85
|
|
@@ -134,6 +135,19 @@ module HTTParty
|
|
134
135
|
::Kernel.raise ::HTTParty::ResponseError.new(@response), "Code #{code} - #{body}"
|
135
136
|
end
|
136
137
|
end
|
138
|
+
|
139
|
+
private
|
140
|
+
|
141
|
+
def warn_about_nil_deprecation
|
142
|
+
trace_line = caller.reject { |line| line.include?('httparty') }.first
|
143
|
+
warning = "[DEPRECATION] HTTParty will no longer override `response#nil?`. " \
|
144
|
+
"This functionality will be removed in future versions. " \
|
145
|
+
"Please, add explicit check `response.body.nil? || response.body.empty?`. " \
|
146
|
+
"For more info refer to: https://github.com/jnunemaker/httparty/issues/568\n" \
|
147
|
+
"#{trace_line}"
|
148
|
+
|
149
|
+
warn(warning)
|
150
|
+
end
|
137
151
|
end
|
138
152
|
end
|
139
153
|
|
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.17.
|
4
|
+
version: 0.17.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_xml
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.6
|
133
|
+
rubygems_version: 2.7.6
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Makes http fun! Also, makes consuming restful web services dead easy.
|