Permalink
Browse files

Migrate to Rails 3.1

  • Loading branch information...
josevalim committed Jan 25, 2012
1 parent b5c6db1 commit 9edca4851d239bc36607c8185f6d07cd8c51cfe0
Showing with 53 additions and 67 deletions.
  1. +2 −1 Gemfile
  2. +45 −60 Gemfile.lock
  3. +2 −0 responders.gemspec
  4. +2 −3 test/flash_responder_test.rb
  5. +2 −3 test/http_cache_responder_test.rb
View
@@ -1,6 +1,7 @@
source "http://rubygems.org"
-gem "rails", "~> 3.0.0"
+gemspec
+
gem "mocha"
if RUBY_VERSION < "1.9"
View
@@ -1,80 +1,65 @@
+PATH
+ remote: .
+ specs:
+ responders (0.6.5)
+ railties (~> 3.1)
+
GEM
remote: http://rubygems.org/
specs:
- abstract (1.0.0)
- actionmailer (3.0.11)
- actionpack (= 3.0.11)
- mail (~> 2.2.19)
- actionpack (3.0.11)
- activemodel (= 3.0.11)
- activesupport (= 3.0.11)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.5.0)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.14)
- rack-test (~> 0.5.7)
- tzinfo (~> 0.3.23)
- activemodel (3.0.11)
- activesupport (= 3.0.11)
- builder (~> 2.1.2)
- i18n (~> 0.5.0)
- activerecord (3.0.11)
- activemodel (= 3.0.11)
- activesupport (= 3.0.11)
- arel (~> 2.0.10)
- tzinfo (~> 0.3.23)
- activeresource (3.0.11)
- activemodel (= 3.0.11)
- activesupport (= 3.0.11)
- activesupport (3.0.11)
- arel (2.0.10)
- builder (2.1.2)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- i18n (0.5.0)
+ actionpack (3.2.0)
+ activemodel (= 3.2.0)
+ activesupport (= 3.2.0)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.0)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.1)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.0)
+ activesupport (= 3.2.0)
+ builder (~> 3.0.0)
+ activesupport (3.2.0)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ builder (3.0.0)
+ erubis (2.7.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.0)
json (1.6.5)
- mail (2.2.19)
- activesupport (>= 2.3.6)
- i18n (>= 0.4.0)
- mime-types (~> 1.16)
- treetop (~> 1.4.8)
metaclass (0.0.1)
- mime-types (1.17.2)
mocha (0.10.3)
metaclass (~> 0.0.1)
- polyglot (0.3.3)
- rack (1.2.5)
- rack-mount (0.6.14)
- rack (>= 1.0.0)
- rack-test (0.5.7)
+ multi_json (1.0.4)
+ rack (1.4.1)
+ rack-cache (1.1)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
rack (>= 1.0)
- rails (3.0.11)
- actionmailer (= 3.0.11)
- actionpack (= 3.0.11)
- activerecord (= 3.0.11)
- activeresource (= 3.0.11)
- activesupport (= 3.0.11)
- bundler (~> 1.0)
- railties (= 3.0.11)
- railties (3.0.11)
- actionpack (= 3.0.11)
- activesupport (= 3.0.11)
+ railties (3.2.0)
+ actionpack (= 3.2.0)
+ activesupport (= 3.2.0)
+ rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
- thor (~> 0.14.4)
+ thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
thor (0.14.6)
- treetop (1.4.10)
- polyglot
- polyglot (>= 0.3.1)
- tzinfo (0.3.31)
+ tilt (1.3.3)
PLATFORMS
ruby
DEPENDENCIES
mocha
- rails (~> 3.0.0)
+ responders!
View
@@ -18,4 +18,6 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
+
+ s.add_dependency "railties", "~> 3.1"
end
@@ -115,7 +115,6 @@ def test_sets_flash_message_can_be_set_to_now
def test_sets_flash_message_can_be_set_to_now_only_on_success
post :create, :flash_now => :on_success
assert_equal "Resource created with success", @controller.flash.now[:success]
- assert_flash_now :success
end
def test_sets_flash_message_can_be_set_to_now_only_on_failure
@@ -137,12 +136,12 @@ def test_sets_message_based_on_alert_key
# If we have flash.now, it's always marked as used.
def assert_flash_now(k)
- assert flash.instance_variable_get(:@used).include?(k.to_sym),
+ assert flash.instance_variable_get(:@used).to_a.include?(k.to_sym),
"Expected #{k} to be in flash.now, but it's not."
end
def assert_not_flash_now(k)
- assert !flash.instance_variable_get(:@used).include?(k.to_sym),
+ assert !flash.instance_variable_get(:@used).to_a.include?(k.to_sym),
"Expected #{k} to not be in flash.now, but it is."
end
end
@@ -65,13 +65,13 @@ def test_refreshes_last_modified_if_cache_is_expired
def test_does_not_set_cache_unless_get_requests
put :single
assert_nil @response.headers["Last-Modified"]
- assert_equal 200, @response.status
+ assert_equal 204, @response.status
end
def test_does_not_use_cache_unless_get_requests
@request.env["HTTP_IF_MODIFIED_SINCE"] = Time.utc(2009, 6).httpdate
put :single
- assert_equal 200, @response.status
+ assert_equal 204, @response.status
end
def test_does_not_set_cache_if_http_cache_is_false
@@ -89,7 +89,6 @@ def test_does_not_use_cache_if_http_cache_is_false
def test_does_not_set_cache_for_collection
get :collection
assert_nil @response.headers["Last-Modified"]
- assert_not_nil @response.headers["ETag"]
assert_equal 200, @response.status
end

0 comments on commit 9edca48

Please sign in to comment.