rack-traffic-logger 0.2.8 → 0.2.9

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
  SHA1:
3
- metadata.gz: 7debb46298745ccb052d95bf8fd4d10f84e74ed4
4
- data.tar.gz: 5703643e58532d5a71d96d22cba2a471509eca67
3
+ metadata.gz: 8614b551d02efa40d7d711e85848721432c64365
4
+ data.tar.gz: 2ac920ae8261bba9ea8bee9fdf43411647e3da87
5
5
  SHA512:
6
- metadata.gz: f5b558a4fc926fbff6a1f4c01d1b1e5c71b5666c10b2a7a8b6b17c0264cf581415f6c7bd56012ba2b6038e779f00b69c1395a230fd52098870a2251fba88fa1d
7
- data.tar.gz: c75206d7aafc20eb80a8b909d3b1c34b7a8b46ad16487b0ae2f681dd8400992be7bf1f675e14d30884370dd4a6ca02b0c899b406abebfc97af20af32cf1c1fec
6
+ metadata.gz: 8510c3c06bbcc271cf4774b1b2a515850b5d3d36553a362fe64746d6e5676884dd2fdee944d4affff4f7d289a65075d7d81cac040e52f4d16154863748ad2dae
7
+ data.tar.gz: 21ce3bf30217686896b1ec3980898eab4d37e8292ccd8d699c4ab4ac43db315501232f0580a8ffabf5695eb81037f31d9f18790fccabd00606a44f8943a03f63
@@ -33,7 +33,10 @@ module Rack
33
33
  k = "HTTP_#{k}" unless k.start_with? 'CONTENT_'
34
34
  [k, v]
35
35
  end.to_h)
36
- hash['rack.input'] = StringIO.new(faraday_env.body) if faraday_env.body
36
+ if faraday_env.body
37
+ body = faraday_env.body
38
+ hash['rack.input'] = body.respond_to?(:read) ? body : StringIO.new(body)
39
+ end
37
40
  end
38
41
  end
39
42
 
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class TrafficLogger
3
- VERSION = '0.2.8'
3
+ VERSION = '0.2.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-traffic-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil E. Pearson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-10 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack