le1t0-capistrano 2.5.18.015 → 2.5.18.016

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 2.5.18.016 / Aug 12, 2010
2
+
3
+ Add uploading files with parameterized file name
4
+
1
5
  == 2.5.18.015 / Aug 4, 2010
2
6
 
3
7
  Fix loading TeeIO
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.18.015
1
+ 2.5.18.016
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{le1t0-capistrano}
8
- s.version = "2.5.18.015"
8
+ s.version = "2.5.18.016"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Le1t0"]
12
- s.date = %q{2010-08-04}
12
+ s.date = %q{2010-08-12}
13
13
  s.description = %q{Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH.}
14
14
  s.email = ["dev@ewout.to"]
15
15
  s.executables = ["capify", "cap"]
@@ -120,6 +120,11 @@ module Capistrano
120
120
  logger.trace "[#{channel[:host]}] #{name}" if logger && sent == 0
121
121
  end
122
122
 
123
+ if direction == :up && from.is_a?(StringIO) && from.string =~ /%\{host\}/
124
+ from_string = from.string.gsub(/%\{host\}/, session.xserver.host)
125
+ from = File.exist?(from_string) ? from_string : StringIO.new(from_string)
126
+ end
127
+
123
128
  channel = case direction
124
129
  when :up
125
130
  session.scp.upload(from, to, options, &real_callback)
@@ -178,6 +183,11 @@ module Capistrano
178
183
  :server => session.xserver,
179
184
  :host => session.xserver.host)
180
185
 
186
+ if direction == :up && from.is_a?(StringIO) && from.string =~ /%\{host\}/
187
+ from_string = from.string.gsub(/%\{host\}/, session.xserver.host)
188
+ from = File.exist?(from_string) ? from_string : StringIO.new(from_string)
189
+ end
190
+
181
191
  case direction
182
192
  when :up
183
193
  sftp.upload(from, to, opts, &real_callback)
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 2
7
7
  - 5
8
8
  - 18
9
- - 15
10
- version: 2.5.18.015
9
+ - 16
10
+ version: 2.5.18.016
11
11
  platform: ruby
12
12
  authors:
13
13
  - Le1t0
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-04 00:00:00 +02:00
18
+ date: 2010-08-12 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency