le1t0-capistrano 2.5.18.017 → 2.5.18.018

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.018 / Aug 20, 2010
2
+
3
+ fix uploading-files-with-parameterized-file-name
4
+
1
5
  == 2.5.18.017 / Aug 13, 2010
2
6
 
3
7
  Support variables scopes (i.e. setting variables to different value for different servers)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.18.017
1
+ 2.5.18.018
@@ -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.017"
8
+ s.version = "2.5.18.018"
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-13}
12
+ s.date = %q{2010-08-20}
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"]
@@ -19,8 +19,9 @@ module Capistrano
19
19
  def scope(scope_name, &block)
20
20
  old_scope = @scope
21
21
  @scope = scope_name
22
- yield
22
+ result = yield
23
23
  @scope = old_scope
24
+ result
24
25
  end
25
26
 
26
27
  # Set a variable to the given value.
@@ -122,10 +122,11 @@ module Capistrano
122
122
  end
123
123
 
124
124
  if proc.is_a?(Proc)
125
- from = proc.call(from.is_a?(StringIO) ? from.string : from, session.xserver.host)
125
+ from_string = proc.call(from.is_a?(StringIO) ? from.string : from, session.xserver.host)
126
+ from = File.exist?(from_string) || from_string.is_a?(StringIO) ? from_string : StringIO.new(from_string.to_s)
126
127
  elsif direction == :up && from.is_a?(StringIO) && from.string =~ /%\{host\}/
127
128
  from_string = from.string.gsub(/%\{host\}/, session.xserver.host)
128
- from = File.exist?(from_string) ? from_string : StringIO.new(from_string)
129
+ from = File.exist?(from_string) || from_string.is_a?(StringIO) ? from_string : StringIO.new(from_string.to_s)
129
130
  end
130
131
 
131
132
  channel = case direction
@@ -187,10 +188,11 @@ module Capistrano
187
188
  :host => session.xserver.host)
188
189
 
189
190
  if proc.is_a?(Proc)
190
- from = proc.call(from.is_a?(StringIO) ? from.string : from, session.xserver.host)
191
+ from_string = proc.call(from.is_a?(StringIO) ? from.string : from, session.xserver.host)
192
+ from = File.exist?(from_string) || from_string.is_a?(StringIO) ? from_string : StringIO.new(from_string.to_s)
191
193
  elsif direction == :up && from.is_a?(StringIO) && from.string =~ /%\{host\}/
192
194
  from_string = from.string.gsub(/%\{host\}/, session.xserver.host)
193
- from = File.exist?(from_string) ? from_string : StringIO.new(from_string)
195
+ from = File.exist?(from_string) || from_string.is_a?(StringIO) ? from_string : StringIO.new(from_string.to_s)
194
196
  end
195
197
 
196
198
  case direction
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 2
7
7
  - 5
8
8
  - 18
9
- - 17
10
- version: 2.5.18.017
9
+ - 18
10
+ version: 2.5.18.018
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-13 00:00:00 +02:00
18
+ date: 2010-08-20 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency