cryx-cacheability 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 1
3
+ :patch: 2
4
4
  :major: 0
@@ -9,7 +9,7 @@ module RestClient
9
9
  def initialize(rack_response)
10
10
  @code, @headers, io = rack_response
11
11
  @body = ""
12
- io.each{ |block| @body << block }
12
+ io.each{|block| @body << block}
13
13
  io.close if io.respond_to?(:close)
14
14
  end
15
15
 
@@ -67,6 +67,8 @@ module RestClient
67
67
  end
68
68
  end
69
69
 
70
+ # Follows the SPEC of Rack 1.0: the returned body is always an array of string
71
+ #
70
72
  def call(env)
71
73
  http_headers = env.inject({}) do |out, (header, value)|
72
74
  if header =~ /HTTP_/
@@ -76,9 +78,9 @@ module RestClient
76
78
  end
77
79
  response = get(debeautify_headers(http_headers), pass_through_cache=false)
78
80
  response.headers.delete(:x_content_digest) # don't know why, but it seems to make the validation fail if kept...
79
- [response.code, debeautify_headers( response.headers ), response.to_s]
81
+ [response.code, debeautify_headers( response.headers ), [response.to_s]]
80
82
  rescue RestClient::NotModified => e
81
- [304, e.response.to_hash, ""]
83
+ [304, e.response.to_hash, [""]]
82
84
  end
83
85
  end
84
86
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryx-cacheability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Rohr
@@ -37,7 +37,6 @@ files:
37
37
  - lib/cacheability.rb
38
38
  - spec/cacheability_spec.rb
39
39
  - spec/spec_helper.rb
40
- - spec/test.rb
41
40
  has_rdoc: true
42
41
  homepage: http://github.com/cryx/cacheability
43
42
  post_install_message: