aboutsummaryrefslogtreecommitdiffstats
path: root/railties/bin
diff options
context:
space:
mode:
Diffstat (limited to 'railties/bin')
-rwxr-xr-xrailties/bin/about4
-rwxr-xr-xrailties/bin/console3
-rwxr-xr-xrailties/bin/dbconsole3
-rwxr-xr-xrailties/bin/destroy3
-rwxr-xr-xrailties/bin/generate3
-rwxr-xr-xrailties/bin/performance/benchmarker3
-rwxr-xr-xrailties/bin/performance/profiler3
-rwxr-xr-xrailties/bin/plugin3
-rwxr-xr-xrailties/bin/rails13
-rwxr-xr-xrailties/bin/railsgen18
-rwxr-xr-xrailties/bin/runner3
-rwxr-xr-xrailties/bin/server3
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'