api_hammer 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/api_hammer/trailing_newline.rb +2 -1
- data/lib/api_hammer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdd05fc523d6412474d2f8e7e9391ae957eeb322
|
4
|
+
data.tar.gz: 5cd309f7d6e4b0df81dfb601bcec2ff6e228afe9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c0a8f2cb93d538ae70d6061abd1021d8c0b3b95c6f1e340e2e28e7f321e28d91f1affee9ef990c6eae2923402cb30cb8c66883707cfdfce8ce2edc08e1b12db
|
7
|
+
data.tar.gz: 7011a6bc4b70966eeddad76af884e2c821e1b77be9aeacaee76222fed61818aaa545f3e5e43382173576f5a6851b904af45c5ae18f076ae15417db23e6cf6dcb
|
data/CHANGELOG.md
CHANGED
@@ -26,7 +26,8 @@ module ApiHammer
|
|
26
26
|
end
|
27
27
|
def call(env)
|
28
28
|
status, headers, body = *@app.call(env)
|
29
|
-
|
29
|
+
_, content_type = headers.detect { |(k,_)| k =~ /\Acontent.type\z/i }
|
30
|
+
if env['REQUEST_METHOD'].downcase != 'head' && ApiHammer::ContentTypeAttrs.new(content_type).text?
|
30
31
|
body = TNLBodyProxy.new(body){}
|
31
32
|
if headers["Content-Length"]
|
32
33
|
headers["Content-Length"] = body.map(&Rack::Utils.method(:bytesize)).inject(0, &:+).to_s
|
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.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|