guard-jasmine-headless-webkit/Rakefile

38 lines
761 B
Ruby
Raw Normal View History

2011-05-23 22:37:19 +00:00
require 'bundler'
Bundler::GemHelper.install_tasks
2011-05-26 20:56:02 +00:00
desc 'Push everywhere!'
task :push_everywhere do
system %{git push origin master}
system %{git push guard master}
end
2011-06-03 20:25:00 +00:00
2011-06-06 13:49:37 +00:00
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
2011-06-03 20:25:00 +00:00
namespace :spec do
desc "Run on three Rubies"
task :platforms do
current = %x{rvm-prompt v}
fail = false
%w{1.8.7 1.9.2 ree}.each do |version|
puts "Switching to #{version}"
2011-06-06 13:49:37 +00:00
Bundler.with_clean_env do
system %{bash -c 'source ~/.rvm/scripts/rvm && rvm #{version} && bundle exec rake spec'}
end
2011-06-03 20:25:00 +00:00
if $?.exitstatus != 0
fail = true
break
end
end
system %{rvm #{current}}
exit (fail ? 1 : 0)
end
end
task :default => 'spec:platforms'