Sha256: 1f0e12bc4f9e593a57c93f4be91f4be407d42a1df462ef574fba23546503f93f
Contents?: true
Size: 819 Bytes
Versions: 4
Compression:
Stored size: 819 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 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 '--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.0.4 | lib/couch/commands.rb |
couch-0.0.3 | lib/couch/commands.rb |
couch-0.0.2 | lib/couch/commands.rb |
couch-0.0.1 | lib/couch/commands.rb |