1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

Be a bit more DRY in Rakefile

This commit is contained in:
Yuki Nishijima 2014-11-22 11:55:00 -08:00
parent 2f4d1d8ad9
commit 550ae7474d

View file

@ -13,7 +13,25 @@ end
task :default => "spec:all"
namespace :spec do
%w(active_record_edge active_record_40 active_record_41 active_record_42 active_record_32 active_record_31 active_record_30 data_mapper_12 mongoid_40 mongoid_31 mongoid_30 mongoid_24 mongo_mapper sinatra_13 sinatra_14).each do |gemfile|
mappers = %w(
active_record_edge
active_record_42
active_record_41
active_record_40
active_record_32
active_record_31
active_record_30
data_mapper_12
mongoid_40
mongoid_31
mongoid_30
mongoid_24
mongo_mapper
sinatra_13
sinatra_14
)
mappers.each do |gemfile|
desc "Run Tests against #{gemfile}"
task gemfile do
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
@ -23,7 +41,7 @@ namespace :spec do
desc "Run Tests against all ORMs"
task :all do
%w(active_record_edge active_record_40 active_record_41 active_record_42 active_record_32 active_record_31 active_record_30 data_mapper_12 mongoid_40 mongoid_31 mongoid_30 mongoid_24 mongo_mapper sinatra_13 sinatra_14).each do |gemfile|
mappers.each do |gemfile|
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake spec"
end