提交 5879a2e9 编写于 作者: D David Heinemeier Hansson

Changed all script/* to use /usr/bin/env ruby instead of hard-coded Ruby path....

Changed all script/* to use /usr/bin/env ruby instead of hard-coded Ruby path. public/dispatcher.* still uses the hard-coded path  for compatibility with web servers that dont have Ruby in path [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2959 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 3661eacf
*SVN*
* Changed all script/* to use #!/usr/bin/env ruby instead of hard-coded Ruby path. public/dispatcher.* still uses the hard-coded path for compatibility with web servers that doesn't have Ruby in path [DHH]
* Force RAILS_ENV to be "test" when running tests, so that ENV["RAILS_ENV"] = "production" in config/environment.rb doesn't wreck havok [DHH] #2660
* Correct versioning in :freeze_gems Rake task. #2778 [jakob@mentalized.net, Jeremy Kemper]
......
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/about'
\ No newline at end of file
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/breakpointer'
\ No newline at end of file
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/console'
\ No newline at end of file
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy'
\ No newline at end of file
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate'
\ No newline at end of file
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/benchmarker'
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/profiler'
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin'
\ No newline at end of file
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spinner'
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/runner'
\ No newline at end of file
#!/usr/local/bin/ruby
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server'
\ No newline at end of file
#!/usr/local/bin/ruby
if ARGV.empty?
puts "Usage: ./script/perform benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ..."
exit 1
......
#!/usr/local/bin/ruby
if ARGV.empty?
$stderr.puts "Usage: ./script/perform profiler 'Person.expensive_method(10)' [times]"
exit(1)
......
......@@ -16,7 +16,8 @@ def initialize(runtime_args, runtime_options = {})
end
def manifest
script_options = { :chmod => 0755, :shebang => options[:shebang] }
script_options = { :chmod => 0755 }
dispatcher_options = { :chmod => 0755, :shebang => options[:shebang] }
record do |m|
# Root directory and all subdirectories.
......@@ -53,9 +54,9 @@ def manifest
end
# Dispatches
m.file "dispatches/dispatch.rb", "public/dispatch.rb", script_options
m.file "dispatches/dispatch.rb", "public/dispatch.cgi", script_options
m.file "dispatches/dispatch.fcgi", "public/dispatch.fcgi", script_options
m.file "dispatches/dispatch.rb", "public/dispatch.rb", dispatcher_options
m.file "dispatches/dispatch.rb", "public/dispatch.cgi", dispatcher_options
m.file "dispatches/dispatch.fcgi", "public/dispatch.fcgi", dispatcher_options
# HTML files
%w(404 500 index).each do |file|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册