lib/couch/generators.rb in couch-0.0.3 vs lib/couch/generators.rb in couch-0.0.4
- old
+ new
@@ -4,11 +4,11 @@
module Couch
module Generators
# Receives a name, arguments and the behavior to invoke the generator.
# It's used as the default entry point for generate and destroy commands.
def self.invoke(name, args = ARGV, config = {})
- if klass = lookup(name)
+ if klass = lookup(name.to_s)
args << "--help" if args.empty? && klass.arguments.any? { |a| a.required? }
klass.start(args, config)
else
puts "Could not find generator #{name}."
end
@@ -31,10 +31,10 @@
puts " -p, [--pretend] # Run but do not make any changes"
puts " -f, [--force] # Overwrite files that already exist"
puts " -s, [--skip] # Skip files that already exist"
puts " -q, [--quiet] # Supress status output"
puts
- puts "Please choose a generator below."
+ puts "Please choose a generator below:"
puts
puts generators
end
protected