rack-avvo_ignite 0.0.1 → 0.0.2

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: 0a7833fa77adb8e61c450ee7231f47e138bd6466
4
- data.tar.gz: 83e6a2ca50b1be27664301c5d088ab11f6879fc3
3
+ metadata.gz: 62d3ac8b3a437ed84f1c39b060ee93b61e58e8b8
4
+ data.tar.gz: 963c797fa968d98b989b53a9451537f06d67d12b
5
5
  SHA512:
6
- metadata.gz: e8576277af4aeed16c5b4db7fd170ffa6a34df2527d7bf5f3ea1ed5d5ab11273d5c509d181c823fe68b7534c38d2c51c40d014d6d269a2cfbb61e62991947357
7
- data.tar.gz: 9d6dfd84c773f1fdba0a3e4f1e3f215b31b0be82bcbe7d852453856eebad1bd8a4166fd83d13ee7abe0a9d53f793701f389cc2fc62be115a1be3912fb01b5b9b
6
+ metadata.gz: db7ac95aea5651fe05d1ee2c4d1a90d76d44f2c8fe4704f5eece5b76b777df5f024e11ba2b1074f5be665c8e658ad82061e1a19f619323c369f24e83c628828b
7
+ data.tar.gz: f90a1ef9f571d6c5ccfd035954bbffd81aedbf98671a0ee7ddc9f0bddd95bb76f765e232f2aed86d1e4279fd6bf736f299412cac951a42622f915bd831a750e4
@@ -11,8 +11,12 @@ module Rack
11
11
  status, headers, response = @app.call(env)
12
12
 
13
13
  if headers['Content-Type'].to_s.include?('text/html') # Only update HTML bodies
14
- response.body = response.body.gsub('</body>', message + '</body>')
15
- headers['Content-Length'] = Rack::Utils.bytesize(response.body.to_s).to_s
14
+ response.each do |part|
15
+ if part.rindex('</body>')
16
+ part.gsub!('</body>', message + '</body>')
17
+ headers['Content-Length'] = (headers['Content-Length'].to_i + message.length).to_s
18
+ end
19
+ end
16
20
  end
17
21
 
18
22
  [status, headers, response]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "rack-avvo_ignite"
3
- s.version = "0.0.1"
3
+ s.version = "0.0.2"
4
4
  s.description = "Integrate Avvo Ignite tracking into your Rack-based application"
5
5
  s.summary = "Integrate Avvo Ignite tracking into your Rack-based application"
6
6
  s.add_dependency "rack"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-avvo_ignite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Ching
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-15 00:00:00.000000000 Z
11
+ date: 2013-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack