(#1) Add summary command

Right now it does not support timespans, and just does current day.
This commit is contained in:
Brian Cain 2015-09-06 11:35:42 -07:00
parent 4c249c0ce4
commit 13f5a282c7
3 changed files with 16 additions and 6 deletions

View file

@ -17,7 +17,6 @@ class Vmfloaty
config = read_config
command :get do |c|
puts config
c.syntax = 'floaty get [options]'
c.summary = 'Gets a vm or vms based on the os flag'
c.description = ''
@ -135,12 +134,14 @@ class Vmfloaty
command :summary do |c|
c.syntax = 'floaty summary [options]'
c.summary = ''
c.summary = 'Prints the summary of vmpooler'
c.description = ''
c.example 'description', 'command example'
c.option '--some-switch', 'Some switch that does something'
c.example 'Gets the current day summary of vmpooler', 'floaty summary --url http://vmpooler.example.com'
c.option '--url STRING', String, 'URL of vmpooler'
c.action do |args, options|
# Do something or c.when_called Floaty::Commands::Summary
url = options.url ||= config['url']
Pooler.summary(url)
end
end