responders 0.4.7 → 0.4.8

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.
@@ -34,7 +34,7 @@ module Responders
34
34
 
35
35
  def do_http_cache?
36
36
  get? && @http_cache != false && ActionController::Base.perform_caching &&
37
- !new_record? && controller.response.last_modified.nil?
37
+ !new_record? && controller.response.last_modified.nil? && resource.respond_to?(:updated_at)
38
38
  end
39
39
 
40
40
  def new_record?
@@ -1,3 +1,3 @@
1
1
  module Responders
2
- VERSION = "0.4.7".freeze
2
+ VERSION = "0.4.8".freeze
3
3
  end
@@ -94,9 +94,9 @@ class HttpCacheResponderTest < ActionController::TestCase
94
94
  assert_equal 200, @response.status
95
95
  end
96
96
 
97
- def test_collection_chooses_the_latest_timestamp
97
+ def test_collection_does_not_trigger_http_cache
98
98
  get :collection
99
- assert_equal Time.utc(2009).httpdate, @response.headers["Last-Modified"]
99
+ assert_equal nil, @response.headers["Last-Modified"]
100
100
  assert_match /xml/, @response.body
101
101
  assert_equal 200, @response.status
102
102
  end
@@ -108,11 +108,6 @@ class HttpCacheResponderTest < ActionController::TestCase
108
108
  assert_equal 200, @response.status
109
109
  end
110
110
 
111
- def test_it_does_not_set_body_etag
112
- get :collection
113
- assert_nil @response.headers["ETag"]
114
- end
115
-
116
111
  def test_does_not_set_cache_for_new_records
117
112
  get :new_record
118
113
  assert_nil @response.headers["Last-Modified"]
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: responders
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 31
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
8
  - 4
8
- - 7
9
- version: 0.4.7
9
+ - 8
10
+ version: 0.4.8
10
11
  platform: ruby
11
12
  authors:
12
13
  - "Jos\xC3\xA9 Valim"
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-04-03 00:00:00 +02:00
18
+ date: 2011-05-07 00:00:00 +02:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
@@ -35,33 +36,40 @@ files:
35
36
  - lib/responders/flash_responder.rb
36
37
  - lib/responders/http_cache_responder.rb
37
38
  - lib/responders/version.rb
39
+ - test/flash_responder_test.rb
40
+ - test/http_cache_responder_test.rb
41
+ - test/test_helper.rb
38
42
  has_rdoc: true
39
43
  homepage: http://github.com/plataformatec/responders
40
44
  licenses: []
41
45
 
42
46
  post_install_message:
43
- rdoc_options:
44
- - --charset=UTF-8
47
+ rdoc_options: []
48
+
45
49
  require_paths:
46
50
  - lib
47
51
  required_ruby_version: !ruby/object:Gem::Requirement
52
+ none: false
48
53
  requirements:
49
54
  - - ">="
50
55
  - !ruby/object:Gem::Version
56
+ hash: 3
51
57
  segments:
52
58
  - 0
53
59
  version: "0"
54
60
  required_rubygems_version: !ruby/object:Gem::Requirement
61
+ none: false
55
62
  requirements:
56
63
  - - ">="
57
64
  - !ruby/object:Gem::Version
65
+ hash: 3
58
66
  segments:
59
67
  - 0
60
68
  version: "0"
61
69
  requirements: []
62
70
 
63
71
  rubyforge_project:
64
- rubygems_version: 1.3.6
72
+ rubygems_version: 1.5.3
65
73
  signing_key:
66
74
  specification_version: 3
67
75
  summary: A set of Rails 3 responders to dry up your application