Sha256: 75fd76207f9e5c09c5366f25b335093c5c5efea48cd9a348de5110b39a1bc500

Contents?: true

Size: 778 Bytes

Versions: 7

Compression:

Stored size: 778 Bytes

Contents

require 'optparse'
require_relative 'base'

module VagrantPlugins
  module Invade
    module Command
      class Init < Base
        def execute
          options = {}
          opts = OptionParser.new do |o|
            o.banner = 'Usage: vagrant invade init [-f|--force] [-h]'
            o.separator ''
            o.on('-f', '--force', 'Force creating configuration file.') do |f|
              options[:force] = f
            end
          end

          # Parse the options
          argv = parse_options(opts)
          return if !argv

          # Init InVaDE configuration file
          action(Action.init, {
            :invade_command_init_force => options[:force]
          })

          # Success, exit status 0
          0
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vagrant-invade-0.8.0 lib/vagrant-invade/command/init.rb
vagrant-invade-0.7.0 lib/vagrant-invade/command/init.rb
vagrant-invade-0.6.4 lib/vagrant-invade/command/init.rb
vagrant-invade-0.6.3 lib/vagrant-invade/command/init.rb
vagrant-invade-0.6.2 lib/vagrant-invade/command/init.rb
vagrant-invade-0.6.1 lib/vagrant-invade/command/init.rb
vagrant-invade-0.6.0 lib/vagrant-invade/command/init.rb