<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 Easy HTTP Cache
 License: MIT
-Version: 2.0
+Version: 2.1
 
 You can also read this README in pretty html at the GitHub project Wiki page
 
@@ -58,9 +58,6 @@ Install Easy HTTP Cache is very easy. It is stored in GitHub, so if you
 have never installed a gem via GitHub run the following:
 
   gem sources -a http://gems.github.com
-
-Then install the gem:
-
   sudo gem install josevalim-easy_http_cache
 
 In RAILS_ROOT/config/environment.rb:
@@ -73,6 +70,7 @@ If you want it as plugin, just do:
     git clone git://github.com/josevalim/easy_http_cache.git
     rm -rf vendor/plugins/easy_http_cache/.git
 
+Current version supports Rails 2.2.x and Rails 2.3.x.
 
 Previous versions
 -----------------</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 Gem::Specification.new do |s|
   s.name     = &quot;easy_http_cache&quot;
-  s.version  = &quot;2.0&quot;
-  s.date     = &quot;2008-11-29&quot;
+  s.version  = &quot;2.1&quot;
+  s.date     = &quot;2009-02-04&quot;
   s.summary  = &quot;Allows Rails applications to use HTTP cache specifications easily.&quot;
   s.email    = &quot;jose.valim@gmail.com&quot;
   s.homepage = &quot;http://github.com/josevalim/easy_http_cache&quot;</diff>
      <filename>easy_http_cache.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -33,10 +33,6 @@ module ActionController #:nodoc:
         end
 
         def filter(controller)
-          # We don't go ahead if we are rendering a component
-          #
-          return if component_request?(controller)
-
           last_modified = get_last_modified(controller)
           controller.response.last_modified = last_modified if last_modified
 
@@ -44,7 +40,7 @@ module ActionController #:nodoc:
           controller.response.etag = processed_etags if processed_etags
 
           if controller.request.fresh?(controller.response)
-            controller.__send__(:head, :not_modified)
+            controller.send(:head, :not_modified)
             return false
           end
         end
@@ -53,11 +49,6 @@ module ActionController #:nodoc:
           # If :etag is an array, it processes all Methods, Procs and Symbols
           # and return them as array. If it's an object, we only evaluate it.
           #
-          # Finally, if :etag is not sent but RAILS_CACHE_ID or RAILS_APP_VERSION
-          # are set, we return an empty string allowing etag to be performed
-          # because those variables, when modified, are a valid way to expire
-          # all previous caches.
-          #
           def get_processed_etags(controller)
             if @options[:etag].is_a?(Array)
               @options[:etag].collect do |item|
@@ -65,8 +56,6 @@ module ActionController #:nodoc:
               end
             elsif @options[:etag]
               evaluate_method(@options[:etag], controller)
-            elsif ENV['RAILS_CACHE_ID'] || ENV['RAILS_APP_VERSION']
-              ''
             else
               nil
             end
@@ -126,15 +115,10 @@ module ActionController #:nodoc:
             end
           end
 
-          # We should not do http cache when we are using components
-          #
-          def component_request?(controller)
-            controller.instance_variable_get('@parent_controller')
-          end
         end
 
     end
   end
 end
 
-ActionController::Base.__send__ :include, ActionController::Caching::HttpCache
\ No newline at end of file
+ActionController::Base.send :include, ActionController::Caching::HttpCache</diff>
      <filename>lib/easy_http_cache.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,16 @@
 # Those lines are plugin test settings
-ENV[&quot;RAILS_ENV&quot;] = &quot;test&quot;
+require 'test/unit'
+require 'rubygems'
 require 'ostruct'
-require File.dirname(__FILE__) + '/../../../../config/environment'
+
+ENV[&quot;RAILS_ENV&quot;] = &quot;test&quot;
+
+require 'active_support'
+require 'action_controller'
+require 'action_controller/test_case'
+require 'action_controller/test_process'
+
 require File.dirname(__FILE__) + '/../lib/easy_http_cache.rb'
-require 'test_help'
 
 ActionController::Base.perform_caching = true
 ActionController::Routing::Routes.draw do |map|
@@ -62,7 +69,7 @@ class HttpCacheTestController &lt; ActionController::Base
     end
 end
 
-class HttpCacheTest &lt; Test::Unit::TestCase
+class HttpCacheTest &lt; ActionController::TestCase
   def setup
     reset!
   end
@@ -115,17 +122,7 @@ class HttpCacheTest &lt; Test::Unit::TestCase
     @request.env['HTTP_ACCEPT'] = 'application/json'
     @request.env['HTTP_IF_MODIFIED_SINCE'] = 1.hour.ago.httpdate
     get :show
-    assert_equal '200 OK', @response.headers['Status']
-  end
-
-  def test_http_cache_without_input_with_env_variable
-    ENV['RAILS_APP_VERSION'] = '1.2.3'
-
-    get :index
-    assert_headers('200 OK', 'private, max-age=0, must-revalidate', 'Last-Modified', Time.utc(0).httpdate)
-    reset!
-
-    etag_http_cache(:index, '')
+    assert_equal '200 OK', @response.status
   end
 
   def test_etag_http_cache
@@ -141,22 +138,6 @@ class HttpCacheTest &lt; Test::Unit::TestCase
     etag_http_cache(:etag, 'ETAG_CACHE')
   end
 
-  def test_should_not_cache_when_rendering_components
-    set_parent_controller! 
-    get :show
-    assert_headers('200 OK', 'no-cache')
-
-    set_parent_controller!
-    @request.env['HTTP_IF_MODIFIED_SINCE'] = 1.hour.ago.httpdate
-    get :show
-    assert_headers('200 OK', 'no-cache')
-
-    set_parent_controller!
-    @request.env['HTTP_IF_MODIFIED_SINCE'] = 3.hours.ago.httpdate
-    get :show
-    assert_headers('200 OK', 'no-cache')
-  end
-
   private
     def reset!
       @request = ActionController::TestRequest.new
@@ -164,20 +145,12 @@ class HttpCacheTest &lt; Test::Unit::TestCase
       @controller = HttpCacheTestController.new
     end
 
-    def set_parent_controller!
-      get :index
-      old_controller = @controller.dup
-      reset!
-
-      @controller.instance_variable_set('@parent_controller', old_controller)
-    end
-
     def etag_for(etag)
       %(&quot;#{Digest::MD5.hexdigest(ActiveSupport::Cache.expand_cache_key(etag))}&quot;)
     end
 
     def assert_headers(status, control, cache_header=nil, value=nil)
-      assert_equal status, @response.headers['Status']
+      assert_equal status, @response.status
       assert_equal control, @response.headers['Cache-Control']
 
       if cache_header</diff>
      <filename>test/easy_http_cache_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>43aee207321c58cee1bd5a7cbaea5eb5029243b2</id>
    </parent>
  </parents>
  <author>
    <name>Jos&#233; Valim</name>
    <email>jose.valim@gmail.com</email>
  </author>
  <url>http://github.com/josevalim/easy_http_cache/commit/35886aba1b557a19c3253d13b2eb609bc57d1b95</url>
  <id>35886aba1b557a19c3253d13b2eb609bc57d1b95</id>
  <committed-date>2009-02-05T09:29:35-08:00</committed-date>
  <authored-date>2009-02-05T09:29:35-08:00</authored-date>
  <message>Added support to Rails 2.3</message>
  <tree>90d4b6f403364871d5979fbc1700ab1af7463b32</tree>
  <committer>
    <name>Jos&#233; Valim</name>
    <email>jose.valim@gmail.com</email>
  </committer>
</commit>
