public
Fork of jamis/capistrano
Description: Remote multi-server automation tool
Homepage: http://www.capify.org
Clone URL: git://github.com/halorgium/capistrano.git
Start writing tests for the deployment code. Make the copy strategy 
checkout to a customizable tmpdir, instead of merely using cwd


git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6589 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
jamis (author)
Thu Apr 26 19:20:21 -0700 2007
commit  c472b3641f5b09702b6cc8f8d8f2efdb807cb6e5
tree    548df89ba471d44ad704196c78ca09ac2413c090
parent  eb6b1effc9883ca947afa95018c617f1dd5ef2f6
...
1
2
 
 
 
 
 
3
4
5
...
18
19
20
 
21
22
23
...
1
2
3
4
5
6
7
8
9
10
...
23
24
25
26
27
28
29
0
@@ -1,5 +1,10 @@
0
 *SVN*
0
 
0
+* Make the copy strategy check out to a temporary directory [Jamis Buck]
0
+
0
+
0
+*1.99.0 (2.0 Preview 1)* April 24, 2007
0
+
0
 * Add `capify' script to make it easier to prepare a project for deployment using cap [Jamis Buck]
0
 
0
 * Make sure the sudo helper understands the SuSE dialect of the sudo password prompt [Steven Wisener]
0
@@ -18,6 +23,7 @@
0
 
0
 * Merged the Configuration and Actor classes, performed various other massive refactorings of the code [Jamis Buck]
0
 
0
+
0
 *1.4.1* (February 24, 2007)
0
 
0
 * Use the no-auth-cache option with subversion so that username/password tokens do not get cached by capistrano usage [jonathan]
...
50
51
52
53
54
 
 
55
56
57
...
59
60
61
62
63
 
...
50
51
52
 
 
53
54
55
56
57
...
59
60
61
 
62
63
0
@@ -50,8 +50,8 @@ end
0
 
0
 desc "Publish the beta gem"
0
 task :pgem => [:package] do
0
- Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
0
- `ssh davidhh@wrath.rubyonrails.org './gemupdate.sh'`
0
+ Rake::SshFilePublisher.new("wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
0
+ `ssh wrath.rubyonrails.org './gemupdate.sh'`
0
 end
0
 
0
 desc "Clean up generated directories and files"
0
@@ -59,4 +59,4 @@ task :clean do
0
   rm_rf "pkg"
0
   rm_rf "doc"
0
   rm_rf "coverage"
0
-end
0
\ No newline at end of file
0
+end
...
1
2
 
3
4
5
...
51
52
53
54
 
55
56
57
...
74
75
76
77
 
 
 
 
 
 
78
79
80
81
82
83
 
84
85
86
...
1
2
3
4
5
6
...
52
53
54
 
55
56
57
58
...
75
76
77
 
78
79
80
81
82
83
84
85
86
87
88
 
89
90
91
92
0
@@ -1,5 +1,6 @@
0
 require 'capistrano/recipes/deploy/strategy/base'
0
 require 'fileutils'
0
+require 'tempfile' # Dir.tmpdir
0
 
0
 module Capistrano
0
   module Deploy
0
@@ -51,7 +52,7 @@ module Capistrano
0
           # Returns the basename of the release_path, which will be used to
0
           # name the local copy and archive file.
0
           def destination
0
- @destination ||= File.basename(configuration[:release_path])
0
+ @destination ||= File.join(tmpdir, File.basename(configuration[:release_path]))
0
           end
0
 
0
           # Returns the value of the :copy_strategy variable, defaulting to
0
@@ -74,13 +75,18 @@ module Capistrano
0
           # Returns the name of the file that the source code will be
0
           # compressed to.
0
           def filename
0
- @filename ||= "#{destination}.#{compression_extension}"
0
+ @filename ||= File.join(tmpdir, "#{File.basename(destination)}.#{compression_extension}")
0
+ end
0
+
0
+ # The directory to which the copy should be checked out
0
+ def tmpdir
0
+ @tmpdir ||= configuration[:copy_dir] || Dir.tmpdir
0
           end
0
 
0
           # The location on the remote server where the file should be
0
           # temporarily stored.
0
           def remote_filename
0
- @remote_filename ||= "/tmp/#{filename}"
0
+ @remote_filename ||= "/tmp/#{File.basename(filename)}"
0
           end
0
 
0
           # The compression method to use, defaults to :gzip.

Comments

    No one has commented yet.