dust-deploy 0.13.10 → 0.13.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/changelog.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =============
3
3
 
4
+ 0.13.11
5
+ ------------
6
+
7
+ - fixes node.scp issue, when target was a directory instead of a full path (including filename)
8
+
9
+
4
10
  0.13.10
5
11
  ------------
6
12
 
data/lib/dust/server.rb CHANGED
@@ -149,9 +149,12 @@ module Dust
149
149
 
150
150
  msg = messages.add("deploying #{File.basename source}", options)
151
151
 
152
+ # check if destination is a directory
153
+ is_dir = dir_exists?(destination, :quiet => true)
154
+
152
155
  # save permissions if the file already exists
153
156
  ret = exec "stat -c %a:%u:%g #{destination}"
154
- if ret[:exit_code] == 0
157
+ if ret[:exit_code] == 0 and not is_dir
155
158
  permissions, user, group = ret[:stdout].chomp.split ':'
156
159
  else
157
160
  # files = 644, dirs = 755
@@ -173,6 +176,11 @@ module Dust
173
176
  chown @node['user'], tmpfile, :quiet => true
174
177
  @ssh.scp.upload! source, tmpfile
175
178
  chown 'root', tmpfile, :quiet => true
179
+
180
+ # if destination is a directory, append real filename
181
+ destination = "#{destination}/#{File.basename(source)}" if is_dir
182
+
183
+ # move the file from the temporary location to where it actually belongs
176
184
  msg.parse_result(exec("mv -f #{tmpfile} #{destination}")[:exit_code])
177
185
 
178
186
  else
data/lib/dust/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dust
2
- VERSION = "0.13.10"
2
+ VERSION = "0.13.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dust-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.10
4
+ version: 0.13.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-16 00:00:00.000000000 Z
12
+ date: 2012-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json