diff options
Diffstat (limited to 'railties/bin')
-rwxr-xr-x | railties/bin/about | 4 | ||||
-rwxr-xr-x | railties/bin/console | 3 | ||||
-rwxr-xr-x | railties/bin/dbconsole | 3 | ||||
-rwxr-xr-x | railties/bin/destroy | 3 | ||||
-rwxr-xr-x | railties/bin/generate | 3 | ||||
-rwxr-xr-x | railties/bin/performance/benchmarker | 3 | ||||
-rwxr-xr-x | railties/bin/performance/profiler | 3 | ||||
-rwxr-xr-x | railties/bin/plugin | 3 | ||||
-rwxr-xr-x | railties/bin/rails | 13 | ||||
-rwxr-xr-x | railties/bin/railsgen | 18 | ||||
-rwxr-xr-x | railties/bin/runner | 3 | ||||
-rwxr-xr-x | railties/bin/server | 3 |
12 files changed, 22 insertions, 40 deletions
diff --git a/railties/bin/about b/railties/bin/about deleted file mode 100755 index ed8deb0dfc..0000000000 --- a/railties/bin/about +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info" -require 'commands/about'
\ No newline at end of file diff --git a/railties/bin/console b/railties/bin/console deleted file mode 100755 index 498077ab33..0000000000 --- a/railties/bin/console +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/console' diff --git a/railties/bin/dbconsole b/railties/bin/dbconsole deleted file mode 100755 index caa60ce829..0000000000 --- a/railties/bin/dbconsole +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/dbconsole' diff --git a/railties/bin/destroy b/railties/bin/destroy deleted file mode 100755 index a4df765a39..0000000000 --- a/railties/bin/destroy +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/destroy' diff --git a/railties/bin/generate b/railties/bin/generate deleted file mode 100755 index 173a9f147d..0000000000 --- a/railties/bin/generate +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/generate' diff --git a/railties/bin/performance/benchmarker b/railties/bin/performance/benchmarker deleted file mode 100755 index c842d35d33..0000000000 --- a/railties/bin/performance/benchmarker +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/performance/benchmarker' diff --git a/railties/bin/performance/profiler b/railties/bin/performance/profiler deleted file mode 100755 index d855ac8b13..0000000000 --- a/railties/bin/performance/profiler +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/performance/profiler' diff --git a/railties/bin/plugin b/railties/bin/plugin deleted file mode 100755 index 87cd2070fe..0000000000 --- a/railties/bin/plugin +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/plugin' diff --git a/railties/bin/rails b/railties/bin/rails index 6a0c675206..538d0cbc84 100755 --- a/railties/bin/rails +++ b/railties/bin/rails @@ -7,14 +7,9 @@ if %w(--version -v).include? ARGV.first exit(0) end -freeze = ARGV.any? { |option| %w(--freeze -f).include?(option) } +ARGV << "--help" if ARGV.empty? -app_path = ARGV.first +require File.dirname(__FILE__) + '/../lib/generators' +require 'generators/rails/app/app_generator' -require File.dirname(__FILE__) + '/../lib/rails_generator' - -require 'rails_generator/scripts/generate' -Rails::Generator::Base.use_application_sources! -Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app') - -Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze
\ No newline at end of file +Rails::Generators::AppGenerator.start diff --git a/railties/bin/railsgen b/railties/bin/railsgen new file mode 100755 index 0000000000..809e75acb5 --- /dev/null +++ b/railties/bin/railsgen @@ -0,0 +1,18 @@ +require File.dirname(__FILE__) + '/../lib/ruby_version_check' +Signal.trap("INT") { puts; exit } + +require File.dirname(__FILE__) + '/../lib/rails/version' +if %w(--version -v).include? ARGV.first + puts "Rails #{Rails::VERSION::STRING}" + exit(0) +end + +require File.dirname(__FILE__) + '/../lib/generators' + +if ARGV.size == 0 + Rails::Generators.help + exit +end + +name = ARGV.shift +Rails::Generators.invoke name, ARGV, :invoke diff --git a/railties/bin/runner b/railties/bin/runner deleted file mode 100755 index a4a7cb25ba..0000000000 --- a/railties/bin/runner +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/runner' diff --git a/railties/bin/server b/railties/bin/server deleted file mode 100755 index 3c67f39b69..0000000000 --- a/railties/bin/server +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/server' |