Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 6589

Show
Ignore:
Timestamp:
04/27/07 02:20:21 (3 years ago)
Author:
minam
Message:

Start writing tests for the deployment code. Make the copy strategy checkout to a customizable tmpdir, instead of merely using cwd

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/capistrano/CHANGELOG

    r6542 r6589  
    11*SVN* 
    22 
     3* Make the copy strategy check out to a temporary directory [Jamis Buck] 
     4 
     5 
     6*1.99.0 (2.0 Preview 1)* April 24, 2007 
     7 
    38* Add `capify' script to make it easier to prepare a project for deployment using cap [Jamis Buck] 
    49 
     
    1823 
    1924* Merged the Configuration and Actor classes, performed various other massive refactorings of the code [Jamis Buck] 
     25 
    2026 
    2127*1.4.1* (February 24, 2007) 
  • tools/capistrano/lib/capistrano/recipes/deploy/strategy/copy.rb

    r6525 r6589  
    11require 'capistrano/recipes/deploy/strategy/base' 
    22require 'fileutils' 
     3require 'tempfile'  # Dir.tmpdir 
    34 
    45module Capistrano 
     
    5253          # name the local copy and archive file. 
    5354          def destination 
    54             @destination ||= File.basename(configuration[:release_path]
     55            @destination ||= File.join(tmpdir, File.basename(configuration[:release_path])
    5556          end 
    5657 
     
    7576          # compressed to. 
    7677          def filename 
    77             @filename ||= "#{destination}.#{compression_extension}" 
     78            @filename ||= File.join(tmpdir, "#{File.basename(destination)}.#{compression_extension}") 
     79          end 
     80 
     81          # The directory to which the copy should be checked out 
     82          def tmpdir 
     83            @tmpdir ||= configuration[:copy_dir] || Dir.tmpdir 
    7884          end 
    7985 
     
    8187          # temporarily stored. 
    8288          def remote_filename 
    83             @remote_filename ||= "/tmp/#{filename}" 
     89            @remote_filename ||= "/tmp/#{File.basename(filename)}" 
    8490          end 
    8591 
  • tools/capistrano/Rakefile

    r6319 r6589  
    5151desc "Publish the beta gem" 
    5252task :pgem => [:package] do  
    53   Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload 
    54   `ssh davidhh@wrath.rubyonrails.org './gemupdate.sh'` 
     53  Rake::SshFilePublisher.new("wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload 
     54  `ssh wrath.rubyonrails.org './gemupdate.sh'` 
    5555end 
    5656