Replace zombie executable with --zombie flag

The zombie executable was symlinked, symlinks do not work properly under
jruby and rbx.
This commit is contained in:
Markus Schirp 2013-07-27 12:25:22 +02:00
parent 3e47dd363b
commit 97e069ed96
3 changed files with 5 additions and 4 deletions

View file

@ -1,14 +1,14 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
trap('INT') do |status| trap('INT') do |status|
exit! 128+status exit! 128 + status
end end
require 'mutant' require 'mutant'
namespace = namespace =
if File.basename($0) == 'zombie' if ARGV.include?('--zombie')
$stderr.puts('Detected zombie environment...') $stderr.puts('Running mutant zombified!')
Mutant::Zombifier.zombify Mutant::Zombifier.zombify
Zombie::Mutant Zombie::Mutant
else else

View file

@ -1 +0,0 @@
mutant

View file

@ -202,6 +202,8 @@ module Mutant
opts.separator '' opts.separator ''
opts.separator 'Strategies:' opts.separator 'Strategies:'
opts.on('--zombie', 'Run mutant zombified')
add_strategies(opts) add_strategies(opts)
add_options(opts) add_options(opts)
end end