Merge pull request #17 from richo/master

Barf on invalid commands
This commit is contained in:
Mispy 2014-05-07 16:44:44 +10:00
commit 35a971e245

View file

@ -174,7 +174,7 @@ STR
def self.command(args) def self.command(args)
usage = <<STR usage = <<STR
Usage: Usage:
ebooks new <reponame> ebooks new <reponame>
ebooks consume <corpus_path> [corpus_path2] [...] ebooks consume <corpus_path> [corpus_path2] [...]
ebooks gen <model_path> [input] ebooks gen <model_path> [input]
@ -197,6 +197,9 @@ STR
when "archive" then archive(args[1], args[2]) when "archive" then archive(args[1], args[2])
when "tweet" then tweet(args[1], args[2]) when "tweet" then tweet(args[1], args[2])
when "jsonify" then jsonify(args[1..-1]) when "jsonify" then jsonify(args[1..-1])
else
log usage
exit 1
end end
end end
end end