Sha256: c80c546517fdfe58e45b34f3d023a6c68a3036a11a81964441a95e4dd69872c4

Contents?: true

Size: 1.56 KB

Versions: 75

Compression:

Stored size: 1.56 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 -w"
  spec.pattern    = 'spec/**/*_spec.rb'
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

75 entries across 63 versions & 9 rubygems

Version Path
childprocess-5.1.0 Rakefile
childprocess-5.0.0 Rakefile
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/childprocess-4.1.0/Rakefile
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/childprocess-4.1.0/Rakefile
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/childprocess-4.1.0/Rakefile
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/childprocess-4.1.0/Rakefile
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/childprocess-4.1.0/Rakefile
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/childprocess-4.1.0/Rakefile
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/Rakefile
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/childprocess-4.1.0/Rakefile
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/childprocess-4.1.0/Rakefile
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/childprocess-4.1.0/Rakefile
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/childprocess-4.1.0/Rakefile
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/Rakefile
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/childprocess-3.0.0/Rakefile
childprocess-4.1.0 Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/childprocess-3.0.0/Rakefile