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 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.2"
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.2
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rack-track}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Baldry"]
@@ -111,6 +111,6 @@ class TestRackTrack < Test::Unit::TestCase
111
111
  @rules = SAMPLE_RULE
112
112
 
113
113
  get '/'
114
- assert_equal "<html><head><title></title></head><body>hello this is the bodyTHIS-IS-A-TEST</body></html>".length, last_response.headers["Content-Length"].to_i
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Baldry