Sha256: 6cabe246ee094207a7df5ab7a8ea9094e033c59d6d2dade098a34d6017b4e800
Contents?: true
Size: 1.13 KB
Versions: 5
Compression:
Stored size: 1.13 KB
Contents
require 'rubygems' require 'fileutils' # Running JRuby on OS X requires options passed at the start. To pass those # options and avoid double JVM startup, we want 'shoes' to be a bash script on # Unix systems, but Rubygems only supports installing Ruby to the bin. # We work around this by installing our script as shoes-stub, then acting like # a "native extension" via this Rakefile, we manually generate the right script # (a copy of shoes-stub) in the Gem.bindir. # Because we don't actually declare shoes as an executable, we also have to # copy our shoes.bat into place as well on Windows systems. # We also provide a Rubygems plugin to clean up our manual file on uninstall. # Post-install hooks didn't seem to work, though, hence the extension trick. task :default => ['install_script'] task :install_script do if Gem.win_platform? source_path = File.join(File.dirname(__FILE__), "shoes.bat") dest_path = File.join(Gem.bindir, "shoes.bat") else source_path = File.join(File.dirname(__FILE__), "..", "..", "bin", "shoes-stub") dest_path = File.join(Gem.bindir, "shoes") end FileUtils.cp(source_path, dest_path) end
Version data entries
5 entries across 5 versions & 3 rubygems