Sha256: 2b5564ea7b2ef17272bf4878f5bc49c35265f508423372e3206a7a240fbe031b
Contents?: true
Size: 859 Bytes
Versions: 2
Compression:
Stored size: 859 Bytes
Contents
require "thor" module Tagenv class CLI < Thor map '--version' => :version default_task :load def initialize(args = [], options = {}, config = {}) super(args, options, config) @global_options = config[:shell].base.options end desc 'load', 'load' option :prefix, aliases: '-p', default: 'EC2TAG_',type: :string, desc: 'prefix' option :instance_id, aliases: '-i', type: :string, desc: 'instance_id' option :provider, type: :string, default: 'ec2', desc: 'provider' option :print, aliases: '-P', type: :boolean, desc: 'print' def load Tagenv.load( prefix: options[:prefix], instance_id: options[:instance_id], provider: options[:provider] ) p ENV if options[:print] end desc 'version', 'show version' def version puts VERSION end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tagenv-0.1.3 | lib/tagenv/cli.rb |
tagenv-0.1.2 | lib/tagenv/cli.rb |