Skip to content
This repository
tag: v2.9.3
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 32 lines (27 sloc) 0.93 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
namespace :gems do
  task :win do
    unless File.directory?(File.expand_path('~/.rake-compiler'))
      STDERR.puts "[ERROR] You must install MinGW rubies to build gherkin gems for Windows. See README.rdoc"
      exit(1)
    end
    # rvm and mingw ruby versions have to match to avoid errors
    sh "rvm 1.8.7-p352@cucumber do rake cross compile RUBY_CC_VERSION=1.8.7"
    sh "bundle exec rake cross compile RUBY_CC_VERSION=1.9.3"
    # This will copy the .so files to the proper place
    sh "bundle exec rake -t cross compile RUBY_CC_VERSION=1.8.7:1.9.3"
  end

  desc 'Prepare JRuby binares'
  task :jruby => [:jar] do
    sh "rvm jruby@cucumber exec rspec spec"
  end

  task :sanity do
    raise "The jruby gem looks too small" if File.stat("release/gherkin-#{GHERKIN_VERSION}-java.gem").size < 1000000
  end

  desc "Prepare binaries for all gems"
  task :prepare => [
    :clean,
    :spec,
    :win,
    :jruby
  ]

end
Something went wrong with that request. Please try again.