Skip to content

Commit

Permalink
Removed all the scripts in script/* and replaced it with one generic …
Browse files Browse the repository at this point in the history
…portal: script/run

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Sep 29, 2005
1 parent 070d218 commit 0a0ac86
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 22 deletions.
2 changes: 2 additions & 0 deletions railties/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* 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]
Expand Down
6 changes: 2 additions & 4 deletions railties/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUBY_FORGE_USER = "webster132"
# end


BASE_DIRS = %w( app config/environments components db doc log lib lib/tasks public script script/process test vendor )
BASE_DIRS = %w( app config/environments components db doc log lib lib/tasks public script test vendor )
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 )
Expand All @@ -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( generate destroy breakpointer console server update runner profiler benchmarker process/reaper process/spinner process/spawner )
BIN_FILES = %w( run )

VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties )

Expand Down Expand Up @@ -230,8 +230,6 @@ end

task :copy_gem_environment do
cp "environments/environment.rb", "#{PKG_DESTINATION}/config/environment.rb"
dest_file = File.join(PKG_DESTINATION, 'script', 'breakpointer')
copy_with_rewritten_ruby_path(File.join('bin', 'breakpointer_for_gem'), dest_file)
chmod 0755, dest_file
end

Expand Down
4 changes: 0 additions & 4 deletions railties/bin/breakpointer_for_gem

This file was deleted.

Empty file removed railties/bin/console_sandbox
Empty file.
3 changes: 3 additions & 0 deletions railties/bin/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/local/bin/ruby
require File.dirname(__FILE__) + '/../config/boot'
require "commands"
5 changes: 5 additions & 0 deletions railties/lib/commands.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if %w( console perform process runner server ).include?(ARGV.first)
require "#{File.dirname(__FILE__)}/process/#{ARGV.shift}"
else
puts "Choose: console perform process runner server"
end
File renamed without changes.
1 change: 0 additions & 1 deletion railties/bin/console → railties/lib/commands/console.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/local/bin/ruby
irb = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb'

require 'optparse'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions railties/lib/commands/perform.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if %w( benchmarker profiler ).include?(ARGV.first)
require "#{File.dirname(__FILE__)}/process/#{ARGV.shift}"
else
puts "Choose either reaper, spawner, or spinner"
end
5 changes: 5 additions & 0 deletions railties/lib/commands/process.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if %w( reaper spawner spinner ).include?(ARGV.first)
require "#{File.dirname(__FILE__)}/process/#{ARGV.shift}"
else
puts "Choose either reaper, spawner, or spinner"
end
4 changes: 1 addition & 3 deletions railties/bin/runner → railties/lib/commands/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@

ENV["RAILS_ENV"] = options[:environment]

#!/usr/local/bin/ruby

require File.dirname(__FILE__) + '/../config/environment'
require RAILS_ROOT + '/config/environment'
eval(ARGV.first)
2 changes: 0 additions & 2 deletions railties/bin/server → railties/lib/commands/server.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/local/bin/ruby

require 'webrick'
require 'optparse'

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,7 @@ def manifest
m.file "environments/test.rb", "config/environments/test.rb"

# Scripts
%w(console destroy generate server runner benchmarker profiler process/reaper process/spinner process/spawner ).each do |file|
m.file "bin/#{file}", "script/#{file}", script_options
end
if options[:gem]
m.file "bin/breakpointer_for_gem", "script/breakpointer", script_options
else
m.file "bin/breakpointer", "script/breakpointer", script_options
end
m.file "bin/run", "script/run", script_options

# Dispatches
m.file "dispatches/dispatch.rb", "public/dispatch.rb", script_options
Expand Down

0 comments on commit 0a0ac86

Please sign in to comment.