aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-08-17 17:17:18 +0000
committerJamis Buck <jamis@37signals.com>2005-08-17 17:17:18 +0000
commit6050dfc46b8ec70913d73e154926b9878c8f83c4 (patch)
tree4d8f295aca0b978ffaaa386a81408a09ca3cf2e3 /railties
parent72f50e65ce95a27cb08373256ddd316ba621064e (diff)
downloadrails-6050dfc46b8ec70913d73e154926b9878c8f83c4.tar.gz
rails-6050dfc46b8ec70913d73e154926b9878c8f83c4.tar.bz2
rails-6050dfc46b8ec70913d73e154926b9878c8f83c4.zip
Make the rakefile tasks that set up a new project aware of switchtower
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2028 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/Rakefile4
-rw-r--r--railties/bin/switchtower15
3 files changed, 17 insertions, 4 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 5b025f498f..911ad7dc78 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Make the rake tasks (like fresh_rails_without_docs_using_links) aware of switchtower
+
* Added -w flag to ps in process/reaper #1934 [Scott Barron]
* Add integration with SwitchTower (rake tasks, default deploy.rb recipe)
diff --git a/railties/Rakefile b/railties/Rakefile
index 4aa932faa2..b681f30d5b 100644
--- a/railties/Rakefile
+++ b/railties/Rakefile
@@ -33,9 +33,9 @@ TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test )
LOG_FILES = %w( server.log development.log test.log production.log )
HTML_FILES = %w( 404.html 500.html index.html robots.txt favicon.ico javascripts/prototype.js javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js )
-BIN_FILES = %w( generate destroy breakpointer console server update runner profiler benchmarker process/reaper process/spinner process/spawner )
+BIN_FILES = %w( generate destroy breakpointer console server update runner profiler benchmarker process/reaper process/spinner process/spawner switchtower )
-VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties )
+VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties switchtower )
desc "Generates a fresh Rails package with documentation"
diff --git a/railties/bin/switchtower b/railties/bin/switchtower
index 741be775cc..82952a3f20 100644
--- a/railties/bin/switchtower
+++ b/railties/bin/switchtower
@@ -1,4 +1,15 @@
#!/usr/local/bin/ruby
-if not system "switchtower #{ARGV.join(" ")}"
- abort "Could not execute switchtower. Is it installed?"
+
+VENDOR = File.dirname(__FILE__) + "/../vendor"
+
+$:.unshift "#{VENDOR}/switchtower/lib"
+
+if File.directory?("#{VENDOR}/rails/switchtower")
+ $:.unshift "#{VENDOR}/rails/switchtower/lib"
+ load "#{VENDOR}/rails/switchtower/bin/switchtower"
+elsif File.directory?("#{VENDOR}/switchtower")
+ $:.unshift "#{VENDOR}/switchtower/lib"
+ load "#{VENDOR}/switchtower/bin/switchtower"
+elsif not system "switchtower #{ARGV.join(" ")}"
+ raise "could not locate switchtower to execute it"
end