This commit is contained in:
Rémy Coutable 2012-03-08 00:44:45 +01:00
Родитель b3c1f6cb71
Коммит 4e2ebd95fd
2 изменённых файлов: 35 добавлений и 5 удалений

16
.travis.yml Normal file
Просмотреть файл

@ -0,0 +1,16 @@
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- ruby-head
- ree
- rbx-18mode
- rbx-19mode
- jruby
branches:
only:
- master
# notifications:
# recipients:
# - thibaud@thibaud.me
# - rymai@rymai.me

Просмотреть файл

@ -35,15 +35,29 @@ Rake::RDocTask.new do |rdoc|
end
namespace(:test) do
desc "Run all specs on multiple ruby versions (requires rvm)"
desc "Run all tests on multiple ruby versions (requires rvm)"
task(:portability) do
%w[1.8.7 1.9.2 ree jruby rbx].each do |version|
travis_config_file = File.expand_path("../.travis.yml", __FILE__)
begin
travis_options ||= YAML::load_file(travis_config_file)
rescue => ex
puts "Travis config file '#{travis_config_file}' could not be found: #{ex.message}"
return
end
travis_options['rvm'].each do |version|
system <<-BASH
bash -c 'source ~/.rvm/scripts/rvm;
rvm #{version};
echo "--------- version #{version} ----------\n";
bundle install;
rake test'
ruby_version_string_size=`ruby -v | wc -m`
echo;
for ((c=1; c<$ruby_version_string_size; c++)); do echo -n "="; done
echo;
echo "`ruby -v`";
for ((c=1; c<$ruby_version_string_size; c++)); do echo -n "="; done
echo;
RBXOPT="-Xrbc.db" bundle install;
RBXOPT="-Xrbc.db" rake test 2>&1;'
BASH
end
end