Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/tags/rel_1-2-3/railties/bin/rails

Revision 4145, 0.6 kB (checked in by david, 3 years ago)

Fixed that rails --version should have the return code of 0 (success) (closes #4560) [blair@orcaware.com]

  • Property svn:executable set to *
Line 
1 require File.dirname(__FILE__) + '/../lib/ruby_version_check'
2 Signal.trap("INT") { puts; exit }
3
4 require File.dirname(__FILE__) + '/../lib/rails/version'
5 if %w(--version -v).include? ARGV.first
6   puts "Rails #{Rails::VERSION::STRING}"
7   exit(0)
8 end
9
10 freeze   = ARGV.any? { |option| %w(--freeze -f).include?(option) }
11 app_path = ARGV.first
12
13 require File.dirname(__FILE__) + '/../lib/rails_generator'
14
15 require 'rails_generator/scripts/generate'
16 Rails::Generator::Base.use_application_sources!
17 Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
18
19 Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze
Note: See TracBrowser for help on using the browser.