|
Revision 4145, 0.6 kB
(checked in by david, 2 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 |
|---|