api_hammer 0.18.1 → 0.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/lib/api_hammer/body.rb +1 -1
- data/lib/api_hammer/halt_methods.rb +1 -1
- data/lib/api_hammer/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: d08b690f386355cb74fcf2f6dea70a70db2a84baa95087b77a3ef3b7e13b146f
|
4
|
+
data.tar.gz: a483f9f0b8ca038f76623a1014bbdcf4a37d266293f26976bf439ecba1ae17e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b3a55ad37ca4ca755c8de88c09a1c713b654d3cde3e51fa63d37e04c236582f02da336b4882dd9f18cc3e5ff078464c9cc569e1a18933c03e7eb0fd2d8c3d0b
|
7
|
+
data.tar.gz: 3f4c29c95bba19accd4a74ce940d9fdc967e27634bc2c60587806387502e727b908c6ce03218d78687a86348a5058a0e2ebd58b2b39430726c8747b1cc8f7302
|
data/CHANGELOG.md
CHANGED
data/lib/api_hammer/body.rb
CHANGED
@@ -86,7 +86,7 @@ module ApiHammer
|
|
86
86
|
# if updating by content-type didn't do it, try UTF8 since JSON wants that - but only
|
87
87
|
# if it seems to be valid utf8.
|
88
88
|
# don't try utf8 if the response content-type indicated something else.
|
89
|
-
try_utf8 = !(content_type_attrs && content_type_attrs.parsed? && content_type_attrs['charset'].any?)
|
89
|
+
try_utf8 = !(content_type_attrs && content_type_attrs.parsed? && content_type_attrs['charset'].any? { |cs| !['utf8', ''].include?(cs.downcase) })
|
90
90
|
if try_utf8 && body.dup.force_encoding('UTF-8').valid_encoding?
|
91
91
|
body.force_encoding('UTF-8')
|
92
92
|
else
|
@@ -31,7 +31,7 @@ module ApiHammer
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
body['error_message'] = error_message if error_message
|
34
|
-
if Object.const_defined?(:Rollbar) and status != 404
|
34
|
+
if Object.const_defined?(:Rollbar) and status != 404 and Object.const_defined?(:DEBUG_4XX) and DEBUG_4XX['enabled']
|
35
35
|
Rollbar.debug "Service halted with status #{status}", status: status, body: body, halt_options: halt_options
|
36
36
|
end
|
37
37
|
halt(status, body, halt_options)
|
data/lib/api_hammer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_hammer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -305,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
305
305
|
version: '0'
|
306
306
|
requirements: []
|
307
307
|
rubyforge_project:
|
308
|
-
rubygems_version: 2.
|
308
|
+
rubygems_version: 2.7.7
|
309
309
|
signing_key:
|
310
310
|
specification_version: 4
|
311
311
|
summary: an API tool
|