Permalink
Browse files

Backed out of script/run portal idea. Muscle memory too deep

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2469 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Oct 6, 2005
1 parent eb54de9 commit a9f34eaa0f07a56a2de674cb5ec604a722e67310
View
@@ -2,8 +2,6 @@
* Add experimental plugin support #2335
-* Removed all the scripts in script/* and replaced it with one generic portal: script/run
-
* Made Rakefile aware of new .js files in script.aculo.us [Thomas Fuchs]
* Make table_name and controller_name in generators honor AR::Base.pluralize_table_names. #1216 #2213 [kazuhiko@fdiary.net]
View
@@ -26,7 +26,7 @@ RUBY_FORGE_USER = "webster132"
# end
-BASE_DIRS = %w( app config/environments components db doc log lib lib/tasks public script test vendor )
+BASE_DIRS = %w( app config/environments components db doc log lib lib/tasks public script test vendor vendor/plugins )
APP_DIRS = %w( apis models controllers helpers views views/layouts )
PUBLIC_DIRS = %w( images javascripts stylesheets )
TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test )
@@ -36,7 +36,7 @@ HTML_FILES = %w( 404.html 500.html index.html robots.txt favicon.ico
javascripts/prototype.js javascripts/scriptaculous.js
javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js
javascripts/util.js javascripts/slider.js )
-BIN_FILES = %w( run )
+BIN_FILES = %w( breakpointer console destroy generate perform process run runner server )
VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties )
@@ -0,0 +1,3 @@
+#!/usr/local/bin/ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/breakpointer'
View
@@ -0,0 +1,3 @@
+#!/usr/local/bin/ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/console'
View
@@ -0,0 +1,3 @@
+#!/usr/local/bin/ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/destroy'
View
@@ -0,0 +1,3 @@
+#!/usr/local/bin/ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/generate'
View
@@ -0,0 +1,3 @@
+#!/usr/local/bin/ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/perform'
View
@@ -0,0 +1,3 @@
+#!/usr/local/bin/ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/process'
View
@@ -1,3 +1,3 @@
#!/usr/local/bin/ruby
require File.dirname(__FILE__) + '/../config/boot'
-require "commands"
+require 'commands/runner'
View
@@ -0,0 +1,3 @@
+#!/usr/local/bin/ruby
+require File.dirname(__FILE__) + '/../config/boot'
+require 'commands/server'
View
@@ -3,5 +3,15 @@
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
@@ -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
@@ -77,19 +77,18 @@ def to_s
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
@@ -44,7 +44,9 @@ def manifest
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 @@ def add_options!(opt)
test/mocks/test
test/unit
vendor
+ vendor/plugins
)
end

0 comments on commit a9f34ea

Please sign in to comment.