bin/screwcap in screwcap-0.3.4 vs bin/screwcap in screwcap-0.3.5

- old
+ new

@@ -9,10 +9,11 @@ opt :silent, "Be silent" opt :nocolor, "Do not color output" opt :debug, "Turn on debugger. Will print full stacktrace if an exeception was raised" opt :help, "Show this message" opt :tasks, "Display available tasks in recipe file" + opt :setup_rails, "Setup a rails app to use screwcap" version <<-EOF Screwcap #{Screwcap::VERSION} by Grant Ammons (grant@pipelinedeals.com) More info at http://gammons.github.com/screwcap EOF banner <<-EOF @@ -33,9 +34,18 @@ deployer = Deployer.new(opts.merge(:recipe_file => recipe_file)) $stdout << "Tasks Available:\n" if deployer.__tasks.size > 0 deployer.__tasks.map {|t| t.__name }.each {|name| $stdout << " #{name}\n" } $stdout << "Sequences Available:\n" if deployer.__sequences.size > 0 deployer.__sequences.map {|t| t.__name }.each {|name| $stdout << " #{name}\n" } + exit + end + + if opts[:setup_rails] == true + Deployer.new(:recipe_file => File.expand_path(File.dirname(__FILE__) + "/../recipes/setup_rails.rb")).run! :setup_rails + $stdout << "\nYour rails app now has a sample recipe, ready for the editing, in config/screwcap/recipe.rb\n" + $stdout << "Your recipes will be automatically available in rake. Screwcap uses the :remote namespace.\n" + $stdout << "To see what recipes you can run, type 'rake -T remote'.\n" + $stdout << "Please visit http://gammons.github.com/screwcap for help.\n" exit end raise Trollop::HelpNeeded if ARGV.size < 2 recipe_file = ARGV.shift