require 'ci' Ci::all do sh 'uname -a' sh 'rvm -v' sh 'gem -v' #reporter :stdout #reporter :mail, :to => 'jmettraux@gmail.com' reporter( :s3, :bucket => 'ruote-ci', :access_key_id => arg('aki'), # --aki xxx :secret_access_key => arg('sak')) # --sak yyy end Ci::bundle 'ruote' do source 'http://rubygems.org' gem 'builder' gem 'mailtrap' gem 'yajl-ruby', :require => 'yajl' gem 'json_pure', '1.4.6' gem 'ruote', :git => 'git://github.com/jmettraux/ruote.git' end Ci::bundle 'ruote-dm' => 'ruote' do gem 'dm-mysql-adapter' gem 'dm-postgres-adapter' gem 'ruote-dm', :git => 'git://github.com/jmettraux/ruote-dm.git' end Ci::bundle 'ruote-sequel' => 'ruote' do gem 'pg', '0.10.1' gem 'mysql', '2.8.1' gem 'ruote-sequel', :git => 'git://github.com/jmettraux/ruote-sequel.git' end Ci::bundle 'ruote-redis' => 'ruote' do #gem 'SystemTimer' # not friend with 1.9.2 gem 'redis' gem 'ruote-redis', :git => 'git://github.com/jmettraux/ruote-redis.git' end Ci::bundle 'ruote-couch' => 'ruote' do #gem 'net-http-persistent' gem 'ruote-couch', :git => 'git://github.com/jmettraux/ruote-couch.git' end Ci::bundle 'ruote-kit' => 'ruote' do gem 'ruote-kit', :git => 'git://github.com/kennethkalmer/ruote-kit.git' gem 'rspec', '2.4.0' gem 'rack-test', '0.5.7' gem 'webrat', '0.7.3' # grrr... end ## tests ## %w[ 1.8.7-p249 1.9.2-p136 ].each do |ru| Ci::task "#{ru} ruote" do rvm :use => ru bundle 'ruote' ruby 'ruote/test/unit/test.rb' ruby 'ruote/test/unit/storage.rb' ruby 'ruote/test/functional/test.rb' end Ci::task "#{ru} ruote fs" do rvm :use => ru bundle 'ruote' ruby 'ruote/test/unit/test.rb', '--', '--fs' ruby 'ruote/test/unit/storage.rb', '--', '--fs' ruby 'ruote/test/functional/test.rb', '--', '--fs' end Ci::task "#{ru} ruote-kit" do rvm :use => ru bundle 'ruote-kit' rspec 'ruote-kit/spec/' end Ci::task "#{ru} ruote-dm psql" do sh 'psql --version' rvm :use => ru bundle 'ruote-dm' sh 'mkdir test; cp ../../dm_pgsql_connection.rb test/functional_connection.rb' ruby 'ruote/test/unit/storage.rb', '--', '--dm' ruby 'ruote/test/functional/test.rb', '--', '--dm' end Ci::task "#{ru} ruote-dm mysql" do sh 'mysql --version' rvm :use => ru bundle 'ruote-dm' sh 'mkdir test; cp ../../dm_mysql_connection.rb test/functional_connection.rb' ruby 'ruote/test/unit/storage.rb', '--', '--dm' ruby 'ruote/test/functional/test.rb', '--', '--dm' end Ci::task "#{ru} ruote-sequel psql" do sh 'psql --version' rvm :use => ru bundle 'ruote-sequel' sh 'mkdir test; cp ../../sequel_pgsql_connection.rb test/functional_connection.rb' ruby 'ruote/test/unit/storage.rb', '--', '--sequel' ruby 'ruote/test/functional/test.rb', '--', '--sequel' end Ci::task "#{ru} ruote-sequel mysql" do sh 'mysql --version' rvm :use => ru bundle 'ruote-sequel' sh 'mkdir test; cp ../../sequel_mysql_connection.rb test/functional_connection.rb' ruby 'ruote/test/unit/storage.rb', '--', '--sequel' ruby 'ruote/test/functional/test.rb', '--', '--sequel' end Ci::task "#{ru} ruote-redis 126" do sh 'dpkg -l redis-server | grep redis-server' rvm :use => ru bundle 'ruote-redis' ruby 'ruote/test/unit/storage.rb', '--', '--redis' ruby 'ruote/test/functional/test.rb', '--', '--redis' end Ci::task "#{ru} ruote-redis 204" do rvm :use => ru bundle 'ruote-redis' sh 'mkdir test; cp ../../redis204_connection.rb test/functional_connection.rb' ruby 'ruote/test/unit/storage.rb', '--', '--redis' ruby 'ruote/test/functional/test.rb', '--', '--redis' end Ci::task "#{ru} ruote-couch" do sh 'curl -s http://127.0.0.1:5984' rvm :use => ru bundle 'ruote-couch' sh 'mkdir test; cp ../../dm_mysql_connection.rb test/functional_connection.rb' ruby 'ruote/test/unit/storage.rb', '--', '--couch' ruby 'ruote/test/functional/test.rb', '--', '--couch', :timeout => 70 * 60 end end