Sha256: 982d00c6340a36459e43078e04ccb2aeac7b9e34d081659e39cd5eaa8b259b6a

Contents?: true

Size: 778 Bytes

Versions: 20

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

20 entries across 20 versions & 1 rubygems

Version Path
vagrant-invade-0.5.5 lib/vagrant-invade/command/init.rb
vagrant-invade-0.5.4 lib/vagrant-invade/command/init.rb
vagrant-invade-0.5.3 lib/vagrant-invade/command/init.rb
vagrant-invade-0.5.2 lib/vagrant-invade/command/init.rb
vagrant-invade-0.5.1 lib/vagrant-invade/command/init.rb
vagrant-invade-0.5.0 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.8 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.7 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.6 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.5 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.4 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.3 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.2 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.1 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.0 lib/vagrant-invade/command/init.rb
vagrant-invade-0.4.0.pre.alpha lib/vagrant-invade/command/init.rb
vagrant-invade-0.3.4 lib/vagrant-invade/command/init.rb
vagrant-invade-0.3.3 lib/vagrant-invade/command/init.rb
vagrant-invade-0.3.2 lib/vagrant-invade/command/init.rb
vagrant-invade-0.3.0 lib/vagrant-invade/command/init.rb