TODOs and --help.

master
Luka Vandervelden 2019-06-08 03:04:11 +02:00
parent efde03eb79
commit 69ecadaefd
1 changed files with 11 additions and 8 deletions

View File

@ -313,6 +313,9 @@ class Service
File.delete "#{path}/#{name}.#{@environment.name}.yaml" File.delete "#{path}/#{name}.#{@environment.name}.yaml"
end end
# TODO:
# - Improve error handling when a string is not a proper reference to a
# service instance.
def self.get_by_id(id) def self.get_by_id(id)
matches = id.match /[^\/]*/ matches = id.match /[^\/]*/
unless matches unless matches
@ -333,14 +336,14 @@ parser = OptionParser.parse! do |parser|
parser.banner = "usage: yunoservice <command> [options]\n" + parser.banner = "usage: yunoservice <command> [options]\n" +
"\n" + "\n" +
"commands:\n" + "commands:\n" +
" start\n" + " start Starts a stopped or dead service.\n" +
" stop\n" + " stop Stops a running service.\n" +
" status\n" + " status Shows the current state of a service.\n" +
" show\n" + " show Describe a service in detail.\n" +
" add\n" + " add Add a service to an environment.\n" +
" del\n" + " del Remove a service from an environment.\n" +
" list\n" + " list Lists registered services.\n" +
" list-environments\n" + " list-environments Lists registered environments.\n" +
"\n" + "\n" +
"options:\n" "options:\n"