Skip to content

Commit

Permalink
Make the rakefile tasks that set up a new project aware of switchtower
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2028 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jamis committed Aug 17, 2005
1 parent 72f50e6 commit 6050dfc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 2 additions & 0 deletions railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN* *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] * Added -w flag to ps in process/reaper #1934 [Scott Barron]


* Add integration with SwitchTower (rake tasks, default deploy.rb recipe) * Add integration with SwitchTower (rake tasks, default deploy.rb recipe)
Expand Down
4 changes: 2 additions & 2 deletions railties/Rakefile
Expand Up @@ -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 ) 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 ) 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" desc "Generates a fresh Rails package with documentation"
Expand Down
15 changes: 13 additions & 2 deletions railties/bin/switchtower
@@ -1,4 +1,15 @@
#!/usr/local/bin/ruby #!/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 end

0 comments on commit 6050dfc

Please sign in to comment.