rack-logstash-writer 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 743b790742046eaf637e2a60b3e9a637dd643e5d
4
- data.tar.gz: 01d40e7442abf11bf844c027c8166da8219d7355
3
+ metadata.gz: 4b440571055af20f4be9163ad3d8fc9d9e01e4e1
4
+ data.tar.gz: fb029ce4cc2f3b15e218d9d85ccc5d977a2947f0
5
5
  SHA512:
6
- metadata.gz: e975018d476ece10bb89fe9d6ea9f1a556f088c2c043deb2989e6c6ae511fc22098ee95374a78ff73b9fb7e3d56757ff90e1dbdedac748b84eaef15bb274ddae
7
- data.tar.gz: 079268552f5b112aa17947a96fb9af853c98bc812ddfe431efc2e0dbe1356e192a069559346b7e773830369b18b49ee6ce591d5199562a3c21b3725f3de07e0d
6
+ metadata.gz: 4b6b2c7e7da5bdfd81533a1f3363460883168c52b352cf822002d701974b252948fb14ca73ee0af12210f8c4a0cb71ff16ea8579c072de298b9f1f47e4510986
7
+ data.tar.gz: 4107206db4b21c3e276bd2ee57ae7bfb312ce5d9ed695e825c1136cb984dd09c2cb9c53a85320f1fbca522bb6580f34c9302400f9bc1630a78556e576bb717f4
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class LogstashWriter
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
@@ -66,12 +66,14 @@ module Rack
66
66
  :"X-Forwarded-For" => response_headers['X-Forwarded-For']
67
67
  }
68
68
 
69
- if(body.is_a? String)
70
- data[:body] = body.join[0..@options[:body_len]]
71
- elsif body.is_a? BodyProxy
72
- (body.respond_to?(:body) ? data[:body] = body.body: data[:body] = body)
73
- data[:body] = data[:body].join[0..@options[:body_len]]
74
- end
69
+ # This just works for all body types (magic?)... see http://www.rubydoc.info/github/rack/rack/Rack/BodyProxy
70
+ body.each{|x| data[:body] = x[0..@options[:body_len]] }
71
+ # if(body.is_a? String)
72
+ # data[:body] = body.join[0..@options[:body_len]]
73
+ # elsif body.is_a? BodyProxy
74
+ # (body.respond_to?(:body) ? data[:body] = body.body: data[:body] = body)
75
+ # data[:body] = data[:body].join[0..@options[:body_len]]
76
+ # end
75
77
  @options[:request_headers].each { |header, log_key| env_key = "HTTP_#{header.upcase.gsub('-', '_')}" ; data[log_key] = env[env_key] if env[env_key]} if !@options[:request_headers].nil?
76
78
  @options[:response_headers].each { |header, log_key| data[log_key] = response_headers[header] if response_headers[header] } if !@options[:response_headers].nil?
77
79
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-logstash-writer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - or garfunkel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-11 00:00:00.000000000 Z
11
+ date: 2015-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake