Sha256: 3c6e9e06575a9e8e3a164cf7b082c7c6954cbf900ed5e6a2c22525afe25b1b7e

Contents?: true

Size: 946 Bytes

Versions: 10

Compression:

Stored size: 946 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

trap('INT') do |status|
  effective_status = status ? status + 128 : 128
  exit! effective_status
end

require 'mutant'

command = Mutant::CLI.parse(
  arguments: ARGV,
  world:     Mutant::WORLD
)

status =
  if command.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
        adamantium
        equalizer
        anima
        concord
      ]
    )

    Zombie::Mutant::CLI.parse(
      arguments: ARGV,
      world:     Zombie::Mutant::WORLD
    ).call
  else
    command.call
  end

Kernel.exit(status)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mutant-0.10.14 bin/mutant
mutant-0.10.13 bin/mutant
mutant-0.10.12 bin/mutant
mutant-0.10.11 bin/mutant
mutant-0.10.10 bin/mutant
mutant-0.10.9 bin/mutant
mutant-0.10.8 bin/mutant
mutant-0.10.7 bin/mutant
mutant-0.10.6 bin/mutant
mutant-0.10.5 bin/mutant