guard-jasmine-headless-webkit/Rakefile

38 lines
830 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
2011-06-18 16:17:22 +00:00
include Rake::DSL if defined?(Rake::DSL)
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-10-11 19:30:39 +00:00
PLATFORMS = %w{1.8.7 1.9.2 ree 1.9.3-rc1}
def rvm_bundle(command = '')
Bundler.with_clean_env do
system %{bash -c 'unset BUNDLE_BIN_PATH && unset BUNDLE_GEMFILE && rvm #{PLATFORMS.join(',')} do bundle #{command}'}.tap { |o| p o }
end
end
class SpecFailure < StandardError; end
class BundleFailure < StandardError; end
2011-06-03 20:25:00 +00:00
namespace :spec do
desc "Run on three Rubies"
task :platforms do
2011-10-11 19:30:39 +00:00
rvm_bundle "update"
rvm_bundle "exec rspec spec"
raise SpecError.new if $?.exitstatus != 0
2011-06-03 20:25:00 +00:00
end
end
task :default => 'spec:platforms'
2011-10-11 19:30:39 +00:00