Permalink
Browse files

drop rails 2 support

  • Loading branch information...
grosser committed Nov 13, 2012
1 parent 30e104d commit 1ca8ab8f62831e2c68896e5abfd54ceeb6c33982
View
@@ -0,0 +1,8 @@
+['3.0', '3.1', '3.2'].each do |version|
+ appraise "rails.#{version}" do
+ gem "actionpack", "~>#{version}.0"
+ gem "rake"
+ gem "appraisal"
+ gem "rspec"
+ end
+end
View
@@ -1,8 +1,8 @@
source :rubygems
group :dev do
- gem 'actionpack', ENV['RAILS'] || '~>3'
- gem 'mynyml-redgreen'
+ gem 'appraisal'
+ gem 'actionpack'
gem 'rake'
gem 'rspec', '~>2'
gem 'jeweler'
View
@@ -17,6 +17,9 @@ GEM
activesupport (3.2.9)
i18n (~> 0.6)
multi_json (~> 1.0)
+ appraisal (0.5.1)
+ bundler
+ rake
builder (3.0.4)
diff-lcs (1.1.3)
erubis (2.7.0)
@@ -31,8 +34,6 @@ GEM
journey (1.0.4)
json (1.7.5)
multi_json (1.3.7)
- mynyml-redgreen (0.7.1)
- term-ansicolor (>= 1.0.4)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
@@ -54,15 +55,14 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- term-ansicolor (1.0.7)
tilt (1.3.3)
PLATFORMS
ruby
DEPENDENCIES
- actionpack (~> 3)
+ actionpack
+ appraisal
jeweler
- mynyml-redgreen
rake
rspec (~> 2)
View
@@ -1,13 +1,14 @@
require 'rake/testtask'
+require 'appraisal'
+
Rake::TestTask.new(:test) do |test|
test.libs << 'lib'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
task :default do
- sh "RAILS=3.0.10 && (bundle || bundle install) && bundle exec rake test"
- sh "RAILS=3.1.0 && (bundle || bundle install) && bundle exec rake test"
+ sh "bundle exec rake appraisal:install && bundle exec rake appraisal test"
end
begin
@@ -0,0 +1,9 @@
+# This file was generated by Appraisal
+
+source :rubygems
+
+gem "actionpack", "~>3.0.0"
+gem "rake"
+gem "appraisal"
+gem "rspec"
+
@@ -0,0 +1,51 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionpack (3.0.17)
+ activemodel (= 3.0.17)
+ activesupport (= 3.0.17)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.5)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.17)
+ activesupport (= 3.0.17)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activesupport (3.0.17)
+ appraisal (0.5.1)
+ bundler
+ rake
+ builder (2.1.2)
+ diff-lcs (1.1.3)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.5.0)
+ rack (1.2.5)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rake (10.0.0)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.3)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.3)
+ tzinfo (0.3.35)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ actionpack (~> 3.0.0)
+ appraisal
+ rake
+ rspec
@@ -0,0 +1,9 @@
+# This file was generated by Appraisal
+
+source :rubygems
+
+gem "actionpack", "~>3.1.0"
+gem "rake"
+gem "appraisal"
+gem "rspec"
+
@@ -0,0 +1,59 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionpack (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.2)
+ rack-cache (~> 1.1)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.2)
+ activemodel (3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activesupport (3.1.1)
+ multi_json (~> 1.0)
+ appraisal (0.5.1)
+ bundler
+ rake
+ builder (3.0.4)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ hike (1.2.1)
+ i18n (0.6.1)
+ multi_json (1.3.7)
+ rack (1.3.5)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
+ rack (>= 1.0.0)
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rake (10.0.0)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.3)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.3)
+ sprockets (2.0.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ tilt (1.3.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ actionpack (~> 3.1.0)
+ appraisal
+ rake
+ rspec
@@ -0,0 +1,9 @@
+# This file was generated by Appraisal
+
+source :rubygems
+
+gem "actionpack", "~>3.2.0"
+gem "rake"
+gem "appraisal"
+gem "rspec"
+
@@ -0,0 +1,58 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionpack (3.2.9)
+ activemodel (= 3.2.9)
+ activesupport (= 3.2.9)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.2.1)
+ activemodel (3.2.9)
+ activesupport (= 3.2.9)
+ builder (~> 3.0.0)
+ activesupport (3.2.9)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ appraisal (0.5.1)
+ bundler
+ rake
+ builder (3.0.4)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ hike (1.2.1)
+ i18n (0.6.1)
+ journey (1.0.4)
+ multi_json (1.3.7)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rake (10.0.0)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.3)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.3)
+ sprockets (2.2.1)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ tilt (1.3.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ actionpack (~> 3.2.0)
+ appraisal
+ rake
+ rspec
View
@@ -47,9 +47,9 @@ def esi_render data
# after_filter will not be called, but <include> needs to be replaced
#
class ActionController::Caching::Actions::ActionCacheFilter
- def filter_with_esi(controller, &block)
+ def filter_with_esi(controller, *args, &block)
controller.instance_variable_set "@do_not_replace_esi", true
- result = filter_without_esi(controller, &block)
+ result = filter_without_esi(controller, *args, &block)
controller.instance_variable_set "@do_not_replace_esi", false
controller.send(:render_esi) if controller.esi_enabled
View
@@ -4,10 +4,12 @@
require 'action_pack'
require 'action_controller'
require 'test/unit'
-require 'redgreen'
$LOAD_PATH << 'lib'
require './init'
+# rails 2 vs ruby 1.9.3
+MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
+
ActionController::Base.cache_store = :memory_store
if ActionPack::VERSION::MAJOR > 2

0 comments on commit 1ca8ab8

Please sign in to comment.