wordmove-sshbump 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -59,13 +59,18 @@ module Wordmove
59
59
 
60
60
  arguments = [ "-azLK" ]
61
61
 
62
- if options.ssh.password
63
- password_file = Tempfile.new('rsync_password')
64
- password_file.write(options.ssh.password)
65
- password_file.close
66
- arguments << "--password-file=#{password_file.path}"
62
+ if options.ssh
63
+ if options.ssh.password
64
+ password_file = Tempfile.new('rsync_password')
65
+ password_file.write(options.ssh.password)
66
+ password_file.close
67
+ arguments << "--password-file=#{password_file.path}"
68
+ end
69
+ if options.ssh.port
70
+ arguments << " -e 'ssh -p #{options.ssh.port}'"
71
+ end
67
72
  end
68
-
73
+
69
74
  arguments << [ "--exclude-from=#{exclude_file.path}", "--delete", source_dir, destination_dir ]
70
75
  arguments.flatten! # do we need this?
71
76
  locally_run "rsync", *arguments
@@ -1,3 +1,3 @@
1
1
  module Wordmove
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordmove-sshbump
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stefano Verna