diff options
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/Rakefile | 6 | ||||
-rw-r--r-- | railties/bin/breakpointer_for_gem | 4 | ||||
-rw-r--r-- | railties/bin/console_sandbox | 0 | ||||
-rwxr-xr-x | railties/bin/run | 3 | ||||
-rw-r--r-- | railties/lib/commands.rb | 5 | ||||
-rw-r--r-- | railties/lib/commands/breakpointer (renamed from railties/bin/breakpointer) | 0 | ||||
-rw-r--r-- | railties/lib/commands/console.rb (renamed from railties/bin/console) | 1 | ||||
-rw-r--r-- | railties/lib/commands/destroy (renamed from railties/bin/destroy) | 0 | ||||
-rwxr-xr-x | railties/lib/commands/generate (renamed from railties/bin/generate) | 0 | ||||
-rw-r--r-- | railties/lib/commands/ncgi/listener (renamed from railties/bin/listener) | 0 | ||||
-rw-r--r-- | railties/lib/commands/ncgi/tracker (renamed from railties/bin/tracker) | 0 | ||||
-rw-r--r-- | railties/lib/commands/perfom/benchmarker (renamed from railties/bin/benchmarker) | 0 | ||||
-rw-r--r-- | railties/lib/commands/perfom/profiler (renamed from railties/bin/profiler) | 0 | ||||
-rw-r--r-- | railties/lib/commands/perform.rb | 5 | ||||
-rw-r--r-- | railties/lib/commands/process.rb | 5 | ||||
-rw-r--r-- | railties/lib/commands/runner.rb (renamed from railties/bin/runner) | 4 | ||||
-rw-r--r-- | railties/lib/commands/server.rb (renamed from railties/bin/server) | 2 | ||||
-rw-r--r-- | railties/lib/commands/update (renamed from railties/bin/update) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 9 |
20 files changed, 24 insertions, 22 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 049a44015a..c0d0ce5ef9 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -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] diff --git a/railties/Rakefile b/railties/Rakefile index 098eb891c0..b46666e440 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -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 ) @@ -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 ) @@ -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 diff --git a/railties/bin/breakpointer_for_gem b/railties/bin/breakpointer_for_gem deleted file mode 100644 index 1366641582..0000000000 --- a/railties/bin/breakpointer_for_gem +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/local/bin/ruby -require 'rubygems' -require_gem 'rails' -require 'breakpoint_client' diff --git a/railties/bin/console_sandbox b/railties/bin/console_sandbox deleted file mode 100644 index e69de29bb2..0000000000 --- a/railties/bin/console_sandbox +++ /dev/null diff --git a/railties/bin/run b/railties/bin/run new file mode 100755 index 0000000000..5490bc9336 --- /dev/null +++ b/railties/bin/run @@ -0,0 +1,3 @@ +#!/usr/local/bin/ruby +require File.dirname(__FILE__) + '/../config/boot' +require "commands"
\ No newline at end of file diff --git a/railties/lib/commands.rb b/railties/lib/commands.rb new file mode 100644 index 0000000000..2ca8741e4c --- /dev/null +++ b/railties/lib/commands.rb @@ -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
\ No newline at end of file diff --git a/railties/bin/breakpointer b/railties/lib/commands/breakpointer index 4ac3e7c3c9..4ac3e7c3c9 100644 --- a/railties/bin/breakpointer +++ b/railties/lib/commands/breakpointer diff --git a/railties/bin/console b/railties/lib/commands/console.rb index eece24a9ca..b8756ba3a1 100644 --- a/railties/bin/console +++ b/railties/lib/commands/console.rb @@ -1,4 +1,3 @@ -#!/usr/local/bin/ruby irb = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb' require 'optparse' diff --git a/railties/bin/destroy b/railties/lib/commands/destroy index f9d9d181a4..f9d9d181a4 100644 --- a/railties/bin/destroy +++ b/railties/lib/commands/destroy diff --git a/railties/bin/generate b/railties/lib/commands/generate index 43bcfd0cb1..43bcfd0cb1 100755 --- a/railties/bin/generate +++ b/railties/lib/commands/generate diff --git a/railties/bin/listener b/railties/lib/commands/ncgi/listener index 421c453f23..421c453f23 100644 --- a/railties/bin/listener +++ b/railties/lib/commands/ncgi/listener diff --git a/railties/bin/tracker b/railties/lib/commands/ncgi/tracker index 859c9fa0e0..859c9fa0e0 100644 --- a/railties/bin/tracker +++ b/railties/lib/commands/ncgi/tracker diff --git a/railties/bin/benchmarker b/railties/lib/commands/perfom/benchmarker index b07ddcfcb2..b07ddcfcb2 100644 --- a/railties/bin/benchmarker +++ b/railties/lib/commands/perfom/benchmarker diff --git a/railties/bin/profiler b/railties/lib/commands/perfom/profiler index d84c8b739f..d84c8b739f 100644 --- a/railties/bin/profiler +++ b/railties/lib/commands/perfom/profiler diff --git a/railties/lib/commands/perform.rb b/railties/lib/commands/perform.rb new file mode 100644 index 0000000000..ae45e7e633 --- /dev/null +++ b/railties/lib/commands/perform.rb @@ -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
\ No newline at end of file diff --git a/railties/lib/commands/process.rb b/railties/lib/commands/process.rb new file mode 100644 index 0000000000..87b4b158cd --- /dev/null +++ b/railties/lib/commands/process.rb @@ -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
\ No newline at end of file diff --git a/railties/bin/runner b/railties/lib/commands/runner.rb index c319bfe658..7d1b56e3f9 100644 --- a/railties/bin/runner +++ b/railties/lib/commands/runner.rb @@ -22,7 +22,5 @@ end ENV["RAILS_ENV"] = options[:environment] -#!/usr/local/bin/ruby - -require File.dirname(__FILE__) + '/../config/environment' +require RAILS_ROOT + '/config/environment' eval(ARGV.first)
\ No newline at end of file diff --git a/railties/bin/server b/railties/lib/commands/server.rb index ff38c6f7af..5330c050b9 100644 --- a/railties/bin/server +++ b/railties/lib/commands/server.rb @@ -1,5 +1,3 @@ -#!/usr/local/bin/ruby - require 'webrick' require 'optparse' diff --git a/railties/bin/update b/railties/lib/commands/update index 430d325b07..430d325b07 100644 --- a/railties/bin/update +++ b/railties/lib/commands/update 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 aef333c13a..1d5a864de4 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -44,14 +44,7 @@ class AppGenerator < Rails::Generator::Base 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 |