Sha256: 5db5730552ce59c34b8402e1ea8fc3e5e7215d0c1ae76a6cacfc9ad27eccd7dd
Contents?: true
Size: 902 Bytes
Versions: 4
Compression:
Stored size: 902 Bytes
Contents
if ARGV.empty? ARGV << '--help' end HELP_TEXT = <<-EOT Usage: couch COMMAND [ARGS] The most common couch commands are: generate Generate new code (short-cut alias: "g") push Push application code to CouchDB pull Pull latest application code from CouchDB routes List application urls In addition to those, there are: destroy Undo code generated with "generate" All commands can be run with -h for more information. EOT case ARGV.shift when 'g', 'generate' require 'couch/commands/generate' when 'destroy' require 'couch/commands/destroy' when 'push' require 'couch/commands/push' when 'pull' require 'couch/commands/pull' when 'routes' require 'couch/commands/routes' when '--help', '-h' puts HELP_TEXT when '--version', '-v' require 'couch/version' puts "Couch #{Couch::VERSION}" else puts "Error: Command not recognized" puts HELP_TEXT end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
couch-0.2.0 | lib/couch/commands.rb |
couch-0.1.2 | lib/couch/commands.rb |
couch-0.1.1 | lib/couch/commands.rb |
couch-0.1.0 | lib/couch/commands.rb |