rack-ermahgerd 0.0.1 → 0.0.2

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.
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class Ermahgerd
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -14,7 +14,8 @@ module Rack
14
14
  response.each_with_index do |res, i|
15
15
  response[i] = translate(res) if res.class == String
16
16
  end
17
- headers["Content-Length"] = Rack::Utils.bytesize(response.to_s).to_s
17
+ p Rack::Utils.bytesize(response.join('')).to_s
18
+ headers["Content-Length"] = Rack::Utils.bytesize(response.join('')).to_s
18
19
  [status, headers, response]
19
20
  end
20
21
 
@@ -29,4 +29,9 @@ class TestRackErmahgerd < Test::Unit::TestCase
29
29
  assert_match /GERSBERMS!/, last_response.body
30
30
  end
31
31
 
32
+ should "return the correct content length" do
33
+ get '/'
34
+ assert_equal Rack::Utils.bytesize(last_response.body.to_s).to_s, last_response.headers['Content-Length']
35
+ end
36
+
32
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-ermahgerd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-03 00:00:00.000000000 Z
12
+ date: 2012-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri