aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/commands.rb10
-rw-r--r--railties/lib/commands/perform.rb2
-rw-r--r--railties/lib/commands/process/reaper.rb7
-rw-r--r--railties/lib/rails_generator/generators/applications/app/app_generator.rb5
4 files changed, 18 insertions, 6 deletions
diff --git a/railties/lib/commands.rb b/railties/lib/commands.rb
index cf7716fc83..841e98a0dc 100644
--- a/railties/lib/commands.rb
+++ b/railties/lib/commands.rb
@@ -3,5 +3,15 @@ commands = Dir["#{File.dirname(__FILE__)}/commands/*.rb"].collect { |file_path|
if commands.include?(ARGV.first)
require "#{File.dirname(__FILE__)}/commands/#{ARGV.shift}"
else
+ puts <<-USAGE
+The 'run' provides a unified access point for all the default Rails' commands.
+
+Usage: ./script/run <command> [OPTIONS]
+
+Examples:
+ ./script/run generate controller Admin
+ ./script/run process reaper
+
+USAGE
puts "Choose: #{commands.join(", ")}"
end \ No newline at end of file
diff --git a/railties/lib/commands/perform.rb b/railties/lib/commands/perform.rb
index ae45e7e633..6c09565896 100644
--- a/railties/lib/commands/perform.rb
+++ b/railties/lib/commands/perform.rb
@@ -1,5 +1,5 @@
if %w( benchmarker profiler ).include?(ARGV.first)
require "#{File.dirname(__FILE__)}/process/#{ARGV.shift}"
else
- puts "Choose either reaper, spawner, or spinner"
+ puts "Choose either benchmarker or profiler"
end \ No newline at end of file
diff --git a/railties/lib/commands/process/reaper.rb b/railties/lib/commands/process/reaper.rb
index 27c05ed5ce..b5b82c310f 100644
--- a/railties/lib/commands/process/reaper.rb
+++ b/railties/lib/commands/process/reaper.rb
@@ -77,19 +77,18 @@ ARGV.options do |opts|
opts.on <<-EOF
Description:
- The reaper is used to reload, gracefully exit, and forcefully exit FCGI processes
+ The reaper is used to restart, reload, gracefully exit, and forcefully exit FCGI processes
running a Rails Dispatcher. This is commonly done when a new version of the application
is available, so the existing processes can be updated to use the latest code.
The reaper actions are:
+ * restart : Restarts the application by reloading both application and framework code
* reload : Only reloads the application, but not the framework (like the development environment)
* graceful: Marks all of the processes for exit after the next request
* kill : Forcefully exists all processes regardless of whether they're currently serving a request
- Graceful exist is the most common and default action. But since the processes won't exist until after
- their next request, it's often necessary to ensure that such a request occurs right after they've been
- marked. That's what nudging is for.
+ Restart is the most common and default action.
A nudge is simply a request to a URL where the dispatcher is serving. You should perform one nudge per
FCGI process you have running if they're setup in a round-robin. Be sure to do one nudge per FCGI process
diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
index 1d5a864de4..4934379669 100644
--- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb
+++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -44,7 +44,9 @@ class AppGenerator < Rails::Generator::Base
m.file "environments/test.rb", "config/environments/test.rb"
# Scripts
- m.file "bin/run", "script/run", script_options
+ %w( breakpointer console destroy generate perform process run runner server ).each do |file|
+ m.file "bin/#{file}", "script/#{file}", script_options
+ end
# Dispatches
m.file "dispatches/dispatch.rb", "public/dispatch.rb", script_options
@@ -117,5 +119,6 @@ class AppGenerator < Rails::Generator::Base
test/mocks/test
test/unit
vendor
+ vendor/plugins
)
end