Sha256: ffbe1fce90aaefea0369ab5d5d198767ce2089823f1405f7676162336801ad44

Contents?: true

Size: 896 Bytes

Versions: 10

Compression:

Stored size: 896 Bytes

Contents

require 'vagrant'
module VagrantHosts
  class Command < Vagrant.plugin('2', :command)

    require 'vagrant-hosts/command/helpers'
    include VagrantHosts::Command::Helpers

    require 'vagrant-hosts/addresses'


    require 'vagrant-hosts/command/puppetize'
    require 'vagrant-hosts/command/list'

    def self.synopsis
      'Information about hostnames managed by the vagrant-hosts plugin'
    end

    def initialize(argv, env)
      @argv     = argv
      @env      = env
      @cmd_name = 'hosts'

      split_argv
      register_subcommands

    end

    def execute
      invoke_subcommand
    end

    private

    def register_subcommands
      @subcommands = Vagrant::Registry.new

      @subcommands.register('puppetize') do
        VagrantHosts::Command::Puppetize
      end

      @subcommands.register('list') do
        VagrantHosts::Command::List
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vagrant-hosts-2.9.0 lib/vagrant-hosts/command.rb
vagrant-hosts-2.8.3 lib/vagrant-hosts/command.rb
vagrant-hosts-2.8.2 lib/vagrant-hosts/command.rb
vagrant-hosts-2.8.1 lib/vagrant-hosts/command.rb
vagrant-hosts-2.8.0 lib/vagrant-hosts/command.rb
vagrant-hosts-2.7.1 lib/vagrant-hosts/command.rb
vagrant-hosts-2.7.0 lib/vagrant-hosts/command.rb
vagrant-hosts-2.6.2 lib/vagrant-hosts/command.rb
vagrant-hosts-2.6.1 lib/vagrant-hosts/command.rb
vagrant-hosts-2.6.0 lib/vagrant-hosts/command.rb