Sha256: 98e668783ab39caae870e69a1f17e036f2a21ec0f88c99ee33a22d9cc813db18

Contents?: true

Size: 407 Bytes

Versions: 11

Compression:

Stored size: 407 Bytes

Contents

class Freighthop::CLI::Vagrant
  COMMANDS = %w[
    up
    halt
    destroy
    provision
    reload
    status
  ]

  def self.match?(*args)
    COMMANDS.include?(args.first)
  end

  def initialize(*args)
    @subcommand, @rest = args
  end

  def args
    ([*@rest] || []).join(' ')
  end

  def run
    Freighthop::CLI::Checks.ensure_config_exists!
    exec %Q(vagrant #{@subcommand} #{args})
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
freighthop-0.6.1 lib/freighthop/cli/vagrant.rb
freighthop-0.6.0 lib/freighthop/cli/vagrant.rb
freighthop-0.5.2 lib/freighthop/cli/vagrant.rb
freighthop-0.5.1 lib/freighthop/cli/vagrant.rb
freighthop-0.5.0 lib/freighthop/cli/vagrant.rb
freighthop-0.4.1 lib/freighthop/cli/vagrant.rb
freighthop-0.4.0 lib/freighthop/cli/vagrant.rb
freighthop-0.3.3 lib/freighthop/cli/vagrant.rb
freighthop-0.3.2 lib/freighthop/cli/vagrant.rb
freighthop-0.3.1 lib/freighthop/cli/vagrant.rb
freighthop-0.3.0 lib/freighthop/cli/vagrant.rb