Sha256: 950881080df0e7bb522da2cb3acfd2e572e12dd9ebf958e9e5f15f11059b5ac4

Contents?: true

Size: 1.13 KB

Versions: 3

Compression:

Stored size: 1.13 KB

Contents

# require 'rubygems'
# gem 'rdoc', '~> 2.5'
# require 'rdoc/task'

# RDoc::Task.new do |rd|
#   rd.title = 'ZK Documentation'
#   rd.rdoc_files.include("lib/**/*.rb")
# end

gemset_name = 'zk'

%w[1.8.7 1.9.2 1.9.3 jruby].each do |rvm_ruby|
  ruby_with_gemset = "#{rvm_ruby}@#{gemset_name}"
  create_gemset_task_name = "mb:#{rvm_ruby}:create_gemset"
  bundle_task_name        = "mb:#{rvm_ruby}:bundle_install"
  rspec_task_name         = "mb:#{rvm_ruby}:run_rspec"

  task create_gemset_task_name do
    sh "rvm #{rvm_ruby} do rvm gemset create #{gemset_name}"
  end

  task bundle_task_name => create_gemset_task_name do
    rm_f 'Gemfile.lock'
    sh "rvm #{ruby_with_gemset} do bundle install"
  end

  task rspec_task_name => bundle_task_name do
    sh "rvm #{ruby_with_gemset} do bundle exec rspec spec --fail-fast"
  end

  task "mb:test_all" => rspec_task_name
end

namespace :spec do
  task :define do
    require 'rubygems'
    require 'bundler/setup'
    require 'rspec/core/rake_task'

    RSpec::Core::RakeTask.new('spec:runner')
  end

  task :run => :define do
    Rake::Task['spec:runner'].invoke
  end
end

task :default => 'spec:run'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zk-0.9.1 Rakefile
zk-0.9.0 Rakefile
zk-0.8.9 Rakefile