Sha256: 3ead9357dda9cc266632b81a0fd3455109f4458f5249dddb3995042193579e1d
Contents?: true
Size: 854 Bytes
Versions: 3
Compression:
Stored size: 854 Bytes
Contents
ARGV << '--help' if ARGV.empty? aliases = { "b" => "build" } command = ARGV.shift command = aliases[command] || command case command when 'build' require 'bookshop/commands/build' Bookshop::Build.start when 'new' puts "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.\n" puts "Type 'rails' for help." else puts "Error: Command not recognized" unless %w(-h --help).include?(command) puts <<-EOT Usage: bookshop COMMAND [ARGS] The most common rails commands are: build Builds a new book from your docbook based upon arguments passed (short-cut alias: "b") new Create a new bookshop project. "bookshop new my_app" creates a new project called MyProject in "./my_project" All commands can be run with -h for more information. EOT end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bookshop-0.0.2.1 | lib/bookshop/commands.rb |
bookshop-0.0.2 | lib/bookshop/commands.rb |
bookshop-0.0.1 | lib/bookshop/commands.rb |