vagrant-multi-putty 1.4.2 → 1.4.3

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/README.md CHANGED
@@ -73,6 +73,7 @@ There are currently a few additional configuration parameters available:
73
73
  * `config.putty.after_modal`: Configure a post hook block that will be called
74
74
  once all child putty processes have exited and modal mode is enabled. The
75
75
  default block is empty.
76
+ * `config.putty.session`: Load settings from a saved putty session.
76
77
 
77
78
  #### Example usage of after_modal post hook
78
79
  This is an example which uses the the win32-activate gem written by nazoking. This
@@ -57,8 +57,18 @@ module VagrantMultiPutty
57
57
  # If ssh_info is nil, the machine is not ready for ssh.
58
58
  raise Vagrant::Errors::SSHNotReady if ssh_info.nil?
59
59
 
60
+ ssh_options = []
61
+
62
+ # Load a saved putty session if provided. Putty (v0.63 at least) appears
63
+ # to have a weird bug where a hostname specified on the command line will
64
+ # not override the hostname in a session unless the hostname comes after
65
+ # the -load option. This doesn't appear to affect any other command line
66
+ # options aside from hostname.
67
+ ssh_options += ["-load", vm.config.putty.session] if
68
+ vm.config.putty.session
69
+
60
70
  # Load options from machine ssh_info.
61
- ssh_options = [ssh_info[:host]]
71
+ ssh_options += [ssh_info[:host]]
62
72
  # config.putty.username overrides the machines ssh_info username.
63
73
  ssh_options += ["-l", vm.config.putty.username || ssh_info[:username]]
64
74
  ssh_options += ["-P", ssh_info[:port].to_s]
@@ -4,6 +4,7 @@ module VagrantMultiPutty
4
4
  attr_accessor :private_key_path
5
5
  attr_accessor :after_modal_hook
6
6
  attr_accessor :modal
7
+ attr_accessor :session
7
8
 
8
9
  def after_modal &proc
9
10
  @after_modal_hook = proc
@@ -14,6 +15,7 @@ module VagrantMultiPutty
14
15
  @private_key_path = UNSET_VALUE
15
16
  @after_modal_hook = UNSET_VALUE
16
17
  @modal = UNSET_VALUE
18
+ @session = UNSET_VALUE
17
19
  end
18
20
 
19
21
  def finalize!
@@ -21,6 +23,7 @@ module VagrantMultiPutty
21
23
  @private_key_path = nil if @private_key_path == UNSET_VALUE
22
24
  @after_modal_hook = Proc.new{ } if @after_modal_hook == UNSET_VALUE
23
25
  @modal = false if @modal == UNSET_VALUE
26
+ @session = nil if @session == UNSET_VALUE
24
27
  end
25
28
 
26
29
  def validate(machine)
@@ -1,3 +1,3 @@
1
1
  module VagrantMultiPutty
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-multi-putty
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
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: 2013-12-14 00:00:00.000000000 Z
12
+ date: 2014-01-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Vagrant plugin to allow VM ssh with PuTTY (multi-vm supported)
15
15
  email:
@@ -44,7 +44,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
44
44
  version: '0'
45
45
  segments:
46
46
  - 0
47
- hash: -4207126925764807584
47
+ hash: -1411506420703789958
48
48
  required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements: