Sha256: db92cc0372c4274322c0dbb313d705c1f4a5d46b51a96f442d0d5e25da26844e

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

#!/usr/bin/env ruby

require 'lambom'
require 'optparse'

# -e environment
# -j json_file
# -s server
# -l loglevel
# -k private_key_file
options = {}

OptionParser.new do |opts|
    opts.banner = "Usage: lambom [options]"

    opts.on("-j", "--json [JSON FILE]",
           "Run server configuration with json attributes file") do |j|
        options[:json_file] = j
    end

    opts.on("-e", "--env [ENVIRONMENT]",
            "Select environment") do |e|
        options[:environment] = e
    end

    opts.on("-s", "--server [SERVER_UUID]",
            "Set server to which get configuration from riyic api") do |s|
        options[:server] = s
    end

    opts.on("-k", "--keyfile [PRIVATE KEYFILE]",
            "PEM Private keyfile to sign api requests") do |k|
        options[:private_key_file] = k
    end
    
    opts.on("-l","--loglevel [LOG_LEVEL]",
            "Set loglevel") do |l|
        options[:loglevel] = l
    end

end.parse!

out = ''
begin
    out = Lambom.run(options)
rescue Exception => e
    puts "Error: #{e.message}"
    exit 1
end

puts "Command executed successfully"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lambom-0.2.0 bin/lambom
lambom-0.1.2 bin/lambom
lambom-0.1.1 bin/lambom