mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Have RunCodeRun test against Rails v2.3.5 with rails_xss enabled.
This commit is contained in:
parent
134431b102
commit
e02e77aa91
1 changed files with 16 additions and 9 deletions
25
Rakefile
25
Rakefile
|
@ -333,23 +333,30 @@ rails_versions = [
|
|||
]
|
||||
rails_versions << "v2.0.5" if RUBY_VERSION =~ /^1\.8/
|
||||
|
||||
def test_rails_version(version)
|
||||
Dir.chdir "test/rails" do
|
||||
`git checkout #{version}`
|
||||
end
|
||||
puts "Testing Rails #{version}"
|
||||
Rake::Task['test'].reenable
|
||||
Rake::Task['test'].execute
|
||||
end
|
||||
|
||||
namespace :test do
|
||||
desc "Test all supported versions of rails. This takes a while."
|
||||
task :rails_compatibility do
|
||||
`rm -rf test/rails`
|
||||
puts "Checking out rails. Please wait."
|
||||
`git clone git://github.com/rails/rails.git test/rails` rescue nil
|
||||
system("git clone git://github.com/rails/rails.git test/rails") rescue nil
|
||||
begin
|
||||
rails_versions.each do |version|
|
||||
Dir.chdir "test/rails" do
|
||||
`git checkout #{version}`
|
||||
end
|
||||
puts "Testing Rails #{version}"
|
||||
Rake::Task['test'].reenable
|
||||
Rake::Task['test'].execute
|
||||
end
|
||||
rails_versions.each {|version| test_rails_version version}
|
||||
|
||||
puts "Checking out rails_xss. Please wait."
|
||||
system("git clone git://github.com/NZKoz/rails_xss.git test/plugins/rails_xss")
|
||||
test_rails_version(rails_versions.find {|s| s =~ /^v2\.3/})
|
||||
ensure
|
||||
`rm -rf test/rails`
|
||||
`rm -rf test/plugins`
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue