Sha256: a57c1017a2756585d6d0072c9e148c356ae1d8d64d7a7a85f266fd7f24a8ec52

Contents?: true

Size: 680 Bytes

Versions: 11

Compression:

Stored size: 680 Bytes

Contents

require 'puppet-ghostbuster/optparser'
class PuppetGhostbuster::Bin
  def initialize(args)
    @args = args
  end

  def run
    opts = PuppetGhostbuster::OptParser.build

    begin
      opts.parse!(@args)
    rescue OptionParser::InvalidOption
      puts "puppet-ghostbuster: #{$!.message}"
      puts "puppet-ghostbuster: try 'puppet-ghostbuster --help' for more information"
      return 1
    end

    if PuppetGhostbuster.configuration.display_version
      puts "puppet-ghostbuster #{PuppetGhostbuster::VERSION}"
      return 0
    end

    if @args[0].nil?
      PuppetGhostbuster.new().run
    else
      PuppetGhostbuster.new(@args[0]).run
    end

    exit 0
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
puppet-ghostbuster-0.4.5 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.4.4 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.4.3 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.4.2 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.4.1 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.4.0 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.3.0 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.2.1 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.2.0 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.1.4 lib/puppet-ghostbuster/bin.rb
puppet-ghostbuster-0.1.3 lib/puppet-ghostbuster/bin.rb