free_mutant/bin/mutant
Markus Schirp c56ecdb51a Reduce zombifier
* And add a full specification
2015-06-13 04:04:15 +00:00

35 lines
749 B
Ruby
Executable file

#!/usr/bin/env ruby
trap('INT') do |status|
effective_status = status ? status + 128 : 128
exit! effective_status
end
require 'mutant'
namespace =
if ARGV.include?('--zombie')
$stderr.puts('Running mutant zombified!')
Mutant::Zombifier.call(
namespace: :Zombie,
load_path: $LOAD_PATH,
kernel: Kernel,
pathname: Pathname,
require_highjack: Mutant::RequireHighjack.method(:call).to_proc.curry.call(Kernel),
root_require: 'mutant',
includes: %w[
mutant
unparser
morpher
adamantium
equalizer
anima
concord
]
)
Zombie::Mutant
else
Mutant
end
Kernel.exit(namespace::CLI.run(ARGV))