Class: VagrantPlugins::Unison::SshCommand
- Inherits:
-
Object
- Object
- VagrantPlugins::Unison::SshCommand
- Defined in:
- lib/vagrant-unison-morroni/ssh_command.rb
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(machine, unison_paths) ⇒ SshCommand
constructor
A new instance of SshCommand.
- #uri ⇒ Object
Constructor Details
#initialize(machine, unison_paths) ⇒ SshCommand
Returns a new instance of SshCommand.
4 5 6 7 |
# File 'lib/vagrant-unison-morroni/ssh_command.rb', line 4 def initialize(machine, unison_paths) @machine = machine @unison_paths = unison_paths end |
Instance Method Details
#command ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/vagrant-unison-morroni/ssh_command.rb', line 9 def command %W( -p #{ssh_info[:port]} #{proxy_command} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null #{key_paths} ).compact.join(' ') end |
#uri ⇒ Object
19 20 21 22 23 24 |
# File 'lib/vagrant-unison-morroni/ssh_command.rb', line 19 def uri username = ssh_info[:username] host = ssh_info[:host] "ssh://#{username}@#{host}/#{@unison_paths.guest}" end |