Sha256: c829891a32b4bc35ce5edf2b4c57e3bc2e23adbda4feebdb5603ccad47f64848

Contents?: true

Size: 967 Bytes

Versions: 9

Compression:

Stored size: 967 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require 'rivet'
require 'rivet/client'

DEBUG = Logger::DEBUG
WARN  = Logger::WARN
FATAL = Logger::FATAL
INFO  = Logger::INFO

# Default option values
options = {
  :log_level => INFO,
  :profile => 'default'
}

OptionParser.new do |o|
  o.on('-g', '--group [GROUP_NAME]', String, 'Autoscaling group name') do |g|
    options[:group] = g
  end

  o.on('-l', '--log-level [LEVEL]', String, "specify the log level (default is INFO)") do |l|
    options[:log_level] = Kernel.const_get l.upcase
  end


  o.on('-p', '--profile [PROFILE_NAME]', "Selects the AWS profile to use (default is 'default')") do |p|
    options[:profile] = p
  end

  o.on('-s', '--sync', "Sync the changes remotely to AWS") do |s|
    options[:sync] = s
  end

  o.on('-h') { puts o; exit }
  o.parse!
end

raise "--group [GROUP_NAME] argument is required!" if options[:group].nil?

Rivet::Client.new.run(options)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rivet-1.0.8 bin/rivet
rivet-1.0.7 bin/rivet
rivet-1.0.6 bin/rivet
rivet-1.0.5 bin/rivet
rivet-1.0.4 bin/rivet
rivet-1.0.3 bin/rivet
rivet-1.0.2 bin/rivet
rivet-1.0.1 bin/rivet
rivet-1.0.0 bin/rivet