lib/rails/commands/application.rb in railties-3.0.20 vs lib/rails/commands/application.rb in railties-3.1.0.beta1
- old
+ new
@@ -1,7 +1,8 @@
require 'rails/version'
-if %w(--version -v).include? ARGV.first
+
+if ['--version', '-v'].include?(ARGV.first)
puts "Rails #{Rails::VERSION::STRING}"
exit(0)
end
if ARGV.first != "new"
@@ -12,7 +13,19 @@
require 'rubygems' if ARGV.include?("--dev")
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
+
+module Rails
+ module Generators
+ class AppGenerator
+ # We want to exit on failure to be kind to other libraries
+ # This is only when accessing via CLI
+ def self.exit_on_failure?
+ true
+ end
+ end
+ end
+end
Rails::Generators::AppGenerator.start