Put the cruisecontrol stuff back in the cruise rake task, rather than a method.
This commit is contained in:
parent
f4ca8898f6
commit
a36bd9897f
1 changed files with 6 additions and 9 deletions
|
|
@ -2,7 +2,12 @@ namespace :cruise do
|
||||||
desc "Run all specs and features"
|
desc "Run all specs and features"
|
||||||
task :cruise => [:environment, :'cruise:migrate'] do
|
task :cruise => [:environment, :'cruise:migrate'] do
|
||||||
puts "Starting virtual display..."
|
puts "Starting virtual display..."
|
||||||
run_cruise
|
`sh -e /etc/init.d/xvfb start`
|
||||||
|
puts "Starting specs..."
|
||||||
|
system('export DISPLAY=:99.0 && CI=true bundle exec rake')
|
||||||
|
exit_status = $?.exitstatus
|
||||||
|
puts "Stopping virtual display..."
|
||||||
|
`sh -e /etc/init.d/xvfb stop`
|
||||||
puts "Cleaning up..."
|
puts "Cleaning up..."
|
||||||
FileUtils.rm_rf("#{Rails.root}/public/uploads/images")
|
FileUtils.rm_rf("#{Rails.root}/public/uploads/images")
|
||||||
FileUtils.rm_rf("#{Rails.root}/public/uploads/tmp")
|
FileUtils.rm_rf("#{Rails.root}/public/uploads/tmp")
|
||||||
|
|
@ -22,14 +27,6 @@ namespace :cruise do
|
||||||
raise "#{cmd} failed!" unless $?.exitstatus == 0
|
raise "#{cmd} failed!" unless $?.exitstatus == 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def run_cruise
|
|
||||||
`sh -e /etc/init.d/xvfb start`
|
|
||||||
puts "Starting specs..."
|
|
||||||
system('export DISPLAY=:99.0 && CI=true bundle exec rake')
|
|
||||||
exit_status = $?.exitstatus
|
|
||||||
puts "Stopping virtual display..."
|
|
||||||
`sh -e /etc/init.d/xvfb stop`
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
task :cruise => "cruise:cruise"
|
task :cruise => "cruise:cruise"
|
||||||
task :travis => "cruise:travis"
|
task :travis => "cruise:travis"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue