File: rubies.rake

package info (click to toggle)
ruby-libnotify 0.9.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 200 kB
  • sloc: ruby: 358; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 570 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SUPPORTED_RUBIES = %w[ree 1.9.3 2.0.0 jruby rbx]
GEMSPEC = Bundler::GemHelper.new(Dir.pwd).gemspec

def with_ruby(ruby, command)
  gemset  = GEMSPEC.name
  command = %{rvm #{ruby}@#{gemset} --create do bash -c '#{command}'}

  puts "\n" * 3
  puts "CMD: #{command}"
  puts "=" * 40

  system command
end

namespace :rubies do
  desc "Run tests for following supported platforms #{SUPPORTED_RUBIES.join ", "}"
  task :test do
    command = "rm -f Gemfile.lock && bundle install && bundle exec rake"
    SUPPORTED_RUBIES.each { |ruby| with_ruby(ruby, command) }
  end
end