rack-track 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/rack/track.rb +2 -2
- data/rack-track.gemspec +1 -1
- data/test/test_rack-track.rb +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -15,7 +15,7 @@ require 'jeweler'
|
|
15
15
|
Jeweler::Tasks.new do |gem|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
17
|
gem.name = "rack-track"
|
18
|
-
gem.version = "0.1.
|
18
|
+
gem.version = "0.1.3"
|
19
19
|
gem.homepage = "http://github.com/michaelbaldry/rack-track"
|
20
20
|
gem.license = "MIT"
|
21
21
|
gem.summary = %Q{Taking all the pain away from managing Tracking Pixels}
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/rack/track.rb
CHANGED
@@ -13,9 +13,9 @@ module Rack
|
|
13
13
|
response_body = ""
|
14
14
|
response.each { |p| response_body += p }
|
15
15
|
response = [@rules.apply(request, response_body)] if response_body.include? "</body>"
|
16
|
-
headers["Content-Length"] = response.inject{|sum,x| sum + x }
|
16
|
+
headers["Content-Length"] = response.inject(0){|sum,x| sum + x.length }.to_s
|
17
17
|
end
|
18
|
-
|
18
|
+
p headers
|
19
19
|
[status, headers, response]
|
20
20
|
end
|
21
21
|
|
data/rack-track.gemspec
CHANGED
data/test/test_rack-track.rb
CHANGED
@@ -111,6 +111,6 @@ class TestRackTrack < Test::Unit::TestCase
|
|
111
111
|
@rules = SAMPLE_RULE
|
112
112
|
|
113
113
|
get '/'
|
114
|
-
assert_equal "
|
114
|
+
assert_equal "90", last_response.headers["Content-Length"]
|
115
115
|
end
|
116
116
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-track
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Baldry
|