public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
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
dhh (author)
Wed Oct 05 19:05:36 -0700 2005
commit  a9f34eaa0f07a56a2de674cb5ec604a722e67310
tree    330bac51ea5442db70b46acca89df997ef073604
parent  eb54de9992dedfcc6b42613a06480af4d0783bf0
...
2
3
4
5
6
7
8
9
...
2
3
4
 
 
5
6
7
0
@@ -2,8 +2,6 @@
0
 
0
 * Add experimental plugin support #2335
0
 
0
-* Removed all the scripts in script/* and replaced it with one generic portal: script/run
0
-
0
 * Made Rakefile aware of new .js files in script.aculo.us [Thomas Fuchs]
0
 
0
 * Make table_name and controller_name in generators honor AR::Base.pluralize_table_names. #1216 #2213 [kazuhiko@fdiary.net]
...
26
27
28
29
 
30
31
32
...
36
37
38
39
 
40
41
42
...
26
27
28
 
29
30
31
32
...
36
37
38
 
39
40
41
42
0
@@ -26,7 +26,7 @@ RUBY_FORGE_USER = "webster132"
0
 # end
0
 
0
 
0
-BASE_DIRS = %w( app config/environments components db doc log lib lib/tasks public script test vendor )
0
+BASE_DIRS = %w( app config/environments components db doc log lib lib/tasks public script test vendor vendor/plugins )
0
 APP_DIRS = %w( apis models controllers helpers views views/layouts )
0
 PUBLIC_DIRS = %w( images javascripts stylesheets )
0
 TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test )
0
@@ -36,7 +36,7 @@ HTML_FILES = %w( 404.html 500.html index.html robots.txt favicon.ico
0
                    javascripts/prototype.js javascripts/scriptaculous.js
0
                    javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js
0
                    javascripts/util.js javascripts/slider.js )
0
-BIN_FILES = %w( run )
0
+BIN_FILES = %w( breakpointer console destroy generate perform process run runner server )
0
 
0
 VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties )
0
 
...
3
4
5
 
 
 
 
 
 
 
 
 
 
6
7
8
...
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -3,5 +3,15 @@ commands = Dir["#{File.dirname(__FILE__)}/commands/*.rb"].collect { |file_path|
0
 if commands.include?(ARGV.first)
0
   require "#{File.dirname(__FILE__)}/commands/#{ARGV.shift}"
0
 else
0
+ puts <<-USAGE
0
+The 'run' provides a unified access point for all the default Rails' commands.
0
+
0
+Usage: ./script/run <command> [OPTIONS]
0
+
0
+Examples:
0
+ ./script/run generate controller Admin
0
+ ./script/run process reaper
0
+
0
+USAGE
0
   puts "Choose: #{commands.join(", ")}"
0
 end
0
\ No newline at end of file
...
1
2
3
4
 
5
6
...
1
2
3
 
4
5
6
0
@@ -1,5 +1,5 @@
0
 if %w( benchmarker profiler ).include?(ARGV.first)
0
   require "#{File.dirname(__FILE__)}/process/#{ARGV.shift}"
0
 else
0
- puts "Choose either reaper, spawner, or spinner"
0
+ puts "Choose either benchmarker or profiler"
0
 end
0
\ No newline at end of file
...
77
78
79
80
 
81
82
83
84
85
 
86
87
88
89
90
91
92
 
93
94
95
...
77
78
79
 
80
81
82
83
84
85
86
87
88
89
90
 
 
 
91
92
93
94
0
@@ -77,19 +77,18 @@ ARGV.options do |opts|
0
 
0
   opts.on <<-EOF
0
   Description:
0
- The reaper is used to reload, gracefully exit, and forcefully exit FCGI processes
0
+ The reaper is used to restart, reload, gracefully exit, and forcefully exit FCGI processes
0
     running a Rails Dispatcher. This is commonly done when a new version of the application
0
     is available, so the existing processes can be updated to use the latest code.
0
 
0
     The reaper actions are:
0
 
0
+ * restart : Restarts the application by reloading both application and framework code
0
     * reload : Only reloads the application, but not the framework (like the development environment)
0
     * graceful: Marks all of the processes for exit after the next request
0
     * kill : Forcefully exists all processes regardless of whether they're currently serving a request
0
 
0
- Graceful exist is the most common and default action. But since the processes won't exist until after
0
- their next request, it's often necessary to ensure that such a request occurs right after they've been
0
- marked. That's what nudging is for.
0
+ Restart is the most common and default action.
0
 
0
     A nudge is simply a request to a URL where the dispatcher is serving. You should perform one nudge per
0
     FCGI process you have running if they're setup in a round-robin. Be sure to do one nudge per FCGI process
...
44
45
46
47
 
 
 
48
49
50
...
117
118
119
 
120
121
...
44
45
46
 
47
48
49
50
51
52
...
119
120
121
122
123
124
0
@@ -44,7 +44,9 @@ class AppGenerator < Rails::Generator::Base
0
       m.file "environments/test.rb", "config/environments/test.rb"
0
 
0
       # Scripts
0
- m.file "bin/run", "script/run", script_options
0
+ %w( breakpointer console destroy generate perform process run runner server ).each do |file|
0
+ m.file "bin/#{file}", "script/#{file}", script_options
0
+ end
0
 
0
       # Dispatches
0
       m.file "dispatches/dispatch.rb", "public/dispatch.rb", script_options
0
@@ -117,5 +119,6 @@ class AppGenerator < Rails::Generator::Base
0
     test/mocks/test
0
     test/unit
0
     vendor
0
+ vendor/plugins
0
   )
0
 end

Comments

    No one has commented yet.