-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathRakefile
33 lines (27 loc) · 875 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
namespace :spec do
desc "Run all specs on multiple ruby versions (requires rvm)"
task :portability do
command = <<-BASH
source ~/.rvm/scripts/rvm;
rvm #{ENV['RUBIES'] || 'all'} do bundle exec rake spec
BASH
system "bash -c '#{command}'"
end
namespace :portability do
desc 'Installs bundler/rake and runs bundle install for all rubies'
task :prepare do
# FIXME: This isn't working for me when it gets to JRuby, specs are running fine - RL
command = <<-BASH
source ~/.rvm/scripts/rvm;
rvm #{ENV['RUBIES'] || 'all'} do gem install bundler rake;
rvm #{ENV['RUBIES'] || 'all'} do bundle install
BASH
system "bash -c '#{command}'"
end
end
end