Sha256: ed9ccc1a958d508d0d731d18cc03625a9b4eb3d061ab884972ba1d7257aab54d

Contents?: true

Size: 1.65 KB

Versions: 27

Compression:

Stored size: 1.65 KB

Contents

require 'rubygems'
require 'rake'
require 'tmpdir'

require 'bundler'
Bundler::GemHelper.install_tasks

include Rake::DSL if defined?(::Rake::DSL)

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.ruby_opts  = "-I lib:spec"
  spec.pattern    = 'spec/**/*_spec.rb'
  spec.rcov_opts  = %w[--exclude spec,ruby-debug,/Library/Ruby,.gem --include lib/childprocess]
end

desc 'Run specs for rcov'
RSpec::Core::RakeTask.new(:rcov) do |spec|
  spec.ruby_opts = "-I lib:spec"
  spec.pattern   = 'spec/**/*_spec.rb'
  spec.rcov      = true
  spec.rcov_opts = %w[--exclude spec,ruby-debug,/Library/Ruby,.gem --include lib/childprocess]
end

task :default => :spec

begin
  require 'yard'
  YARD::Rake::YardocTask.new
rescue LoadError
  task :yardoc do
    abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
  end
end

task :clean do
  rm_rf "pkg"
  rm_rf "childprocess.jar"
end

desc 'Create jar to bundle in selenium-webdriver'
task :jar => [:clean, :build] do
  tmpdir = Dir.mktmpdir("childprocess-jar")
  gem_to_package = Dir['pkg/*.gem'].first
  gem_name = File.basename(gem_to_package, ".gem")
  p :gem_to_package => gem_to_package, :gem_name => gem_name

  sh "gem install -i #{tmpdir} #{gem_to_package} --ignore-dependencies --no-rdoc --no-ri"
  sh "jar cf childprocess.jar -C #{tmpdir}/gems/#{gem_name}/lib ."
  sh "jar tf childprocess.jar"
end

task :env do
  $:.unshift File.expand_path("../lib", __FILE__)
  require 'childprocess'
end

desc 'Calculate size of posix_spawn structs for the current platform'
task :generate => :env do
  require 'childprocess/tools/generator'
  ChildProcess::Tools::Generator.generate
end

Version data entries

27 entries across 27 versions & 7 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.6/Rakefile
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.6/Rakefile
childprocess-0.3.6 Rakefile
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/childprocess-0.3.5/Rakefile
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/childprocess-0.3.5/Rakefile
childprocess-0.3.5 Rakefile
childprocess-0.3.4 Rakefile
childprocess-0.3.3 Rakefile
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/Rakefile
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/Rakefile
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/Rakefile
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/Rakefile
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/Rakefile
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/childprocess-0.3.1/Rakefile
ftl-0.2.0 vendor/bundle/gems/childprocess-0.3.2/Rakefile
childprocess-0.3.2 Rakefile
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/childprocess-0.3.1/Rakefile
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/childprocess-0.3.1/Rakefile
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/childprocess-0.3.1/Rakefile
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/childprocess-0.3.1/Rakefile