Sha256: 2434c05bf5b2979fff930366a00bb7990bf10df4a13d2220e3ceddadfcdbf354
Contents?: true
Size: 1.57 KB
Versions: 3
Compression:
Stored size: 1.57 KB
Contents
module WssAgent class CLI < Thor desc "config", "create config file" def config File.open(File.join(Dir.pwd, Configure::CURRENT_CONFIG_FILE), 'w') do |f| f << File.read(Configure.custom_default_path) end ap 'Created the config file: wss_agent.yml' end desc 'list', 'display list dependencies' method_options all: :boolean method_options excludes: :string method_option :verbose, :aliases => "-v", :desc => "Be verbose" def list WssAgent.enable_debug! if options['verbose'] results = Specifications.list(options) ap results rescue Bundler::GemfileNotFound => ex ap ex.message, color: { string: :red } rescue Bundler::GemNotFound => ex ap ex.message, color: { string: :red } ap "Could you execute 'bundle install' before", color: { string: :red } end desc 'update', 'update open source inventory' method_options all: :boolean method_options excludes: :string method_option :verbose, :aliases => "-v", :desc => "Be verbose" def update WssAgent.enable_debug! if options['verbose'] Specifications.update(options) rescue => ex ap ex.message, color: { string: :red } end desc 'check_policies', 'checking dependencies that they conforms with company policy.' method_option :verbose, :aliases => "-v", :desc => "Be verbose" def check_policies WssAgent.enable_debug! if options['verbose'] Specifications.check_policies(options) end desc 'version', 'Agent version' def version puts WssAgent::VERSION end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wss_agent-0.0.17 | lib/wss_agent/cli.rb |
wss_agent-0.0.17.pre1 | lib/wss_agent/cli.rb |
wss_agent-0.0.16 | lib/wss_agent/cli.rb |