vagrant-winrm 0.5.0 → 0.6.0

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Njk3N2M1M2U5ZGNjNzM0NDg5YWJmNDhmZjllNDU5ZmY4Mzg4NWI0Nw==
4
+ ZTU3YTE1ZWZjZGM0YTg5NTYwNTRjYjc4NzJlYmMxMDA4YTAyMDM2YQ==
5
5
  data.tar.gz: !binary |-
6
- Mzc5MTZlYThlNjk3YWE0NWQ4MzcwMTcxYjBlYTc2MTRmNDExY2ExMA==
6
+ MTY1NjQwNmZhOWM2MzMwN2ZiYzlhOTkyNTliNjViMjVmNDMyMTI2Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTQ4MDU2MjAwODY1ZGNjNmVmMGI3YTllMjkwYjkzNzZhZDkwNjEzZGIyN2M5
10
- NmQwOWJmZGIzNjdlYmVhZDhlYjk4NWNlYjlmODk2NmQwNDE1OGIwZmQ1ZTFk
11
- MTBjOWQ1ZmRiZTNlMzcxMTJlNDA3YWZhYzliNWRhYmQzMTI0NDI=
9
+ MTUwY2I3MTliMWZiYzg3NTAzODVhMjQwYWNmNjQ3NDEzM2FkMDllN2YzYmE1
10
+ NzYwZmRhN2U0ZmJkZDg0MjU1NzI5MGRiYzI5YmU2ZjAwZWI0N2I5ZjFlZjA4
11
+ OWIyMmNhNjBkM2VjM2Q0ZmM0NDU4YWRjM2ZlNmQ1NmE4ODY1NDE=
12
12
  data.tar.gz: !binary |-
13
- OTcyZmIwZmE3Zjc0ODc4YzVhMGRjMzY2ZWY2MTVmOGQ2OTNjOTA2YTAwZjU0
14
- NmYxYzkyOTVhNzA2YmJhZjNmODNmMTRlZGViYzg4MjM0YWU3ZTc2ODQwZjc0
15
- YjVjMGU3NDRkZGRhNjBlZDg1ZjQwZjVhMjYwMTJlNWI1YTNhMDk=
13
+ OTZhZjZhMjNiNDA3OGE4M2MyOTY4ODJhMGYzYWM1MmQ3NDY5MzYyMmUxMTZj
14
+ ZGJlYjdmNjljMDg2MGIxYTZmZjA3MDgyOWMxYTgzYzcwZjU0MjY3ZmYwMjYx
15
+ NDY4NWYwZmI4Njg0N2Q1YjQyZGYzMjcwZjc3OWYxOTA0ZWMzMzI=
@@ -1,5 +1,6 @@
1
1
  require 'optparse'
2
2
  require 'vagrant/util/safe_puts'
3
+ require 'vagrant/../../plugins/communicators/winrm/helper'
3
4
 
4
5
  module VagrantPlugins
5
6
  module VagrantWinRM
@@ -30,8 +31,8 @@ module VagrantPlugins
30
31
 
31
32
  variables = {
32
33
  host_key: options[:host] || machine.name || 'vagrant',
33
- winrm_host: machine.config.winrm.host,
34
- winrm_port: machine.config.winrm.port,
34
+ winrm_host: VagrantPlugins::CommunicatorWinRM::Helper.winrm_info(machine)[:host],
35
+ winrm_port: VagrantPlugins::CommunicatorWinRM::Helper.winrm_info(machine)[:port],
35
36
  winrm_user: machine.config.winrm.username,
36
37
  winrm_password: machine.config.winrm.password
37
38
  }
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module VagrantWinRM
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  end
@@ -11,6 +11,39 @@ require './lib/vagrant-winrm/commands/winrm.rb'
11
11
  require './lib/vagrant-winrm/commands/winrm_config.rb'
12
12
  require './lib/vagrant-winrm/commands/winrm_upload.rb'
13
13
 
14
+ def mock_env
15
+ let(:idx) { double('idx') }
16
+ let(:communicator) { double('communicator') }
17
+ let(:winrm_config) {
18
+ double('winrm_config', host: 'winrm_super_host', port: 32424, username: 'usern@me', password: 'p4ssw0rd').tap do |config|
19
+ allow(config).to receive(:[]) { |key| config.send(key) }
20
+ end
21
+ }
22
+ let(:config_vm) { double('config_vm', communicator: :winrm) }
23
+ let(:machine_config) { double('machine_config', winrm: winrm_config, vm: config_vm) }
24
+
25
+ let(:provider) {
26
+ double('provider', to_sym: :virtualbox).tap do |provider|
27
+ allow(provider).to receive(:capability?).and_return(true)
28
+ allow(provider).to receive(:capability).with(:winrm_info).and_return(winrm_config)
29
+ end
30
+ }
31
+
32
+ let(:machine) {
33
+ double(
34
+ 'machine',
35
+ config: machine_config,
36
+ name: 'vagrant',
37
+ provider: provider,
38
+ config: machine_config,
39
+ communicate: communicator,
40
+ ui: double('ui', opts: {}),
41
+ state: nil
42
+ )
43
+ }
44
+ let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: provider) }
45
+ end
46
+
14
47
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
15
48
  RSpec.configure do |config|
16
49
  config.run_all_when_everything_filtered = true
@@ -6,22 +6,7 @@ describe VagrantPlugins::VagrantWinRM::WinRMConfig, :unit => true do
6
6
  =begin ############
7
7
  # Here we mock!
8
8
  =end ##############
9
-
10
- let(:idx) { double('idx') }
11
- let(:winrm_config) { double('winrm_config', host: 'winrm_super_host', port: 32424, username: 'usern@me', password: 'p4ssw0rd') }
12
- let(:machine_config) { double('machine_config', winrm: winrm_config) }
13
- let(:machine) {
14
- double(
15
- 'machine',
16
- config: machine_config,
17
- name: 'vagrant',
18
- provider: 'virtualbox',
19
- config: machine_config,
20
- ui: double('ui', opts: {}),
21
- state: nil
22
- )
23
- }
24
- let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') }
9
+ mock_env
25
10
 
26
11
  before do
27
12
  # Mock the local env creation
@@ -6,13 +6,7 @@ describe VagrantPlugins::VagrantWinRM::WinRM, :unit => true do
6
6
  =begin ############
7
7
  # Here we mock!
8
8
  =end ##############
9
-
10
- let(:idx) { double('idx') }
11
- let(:communicator) { double('communicator') }
12
- let(:config_vm) { double('config_vm', communicator: :winrm) }
13
- let(:machine_config) { double('machine_config', vm: config_vm) }
14
- let(:machine) { double('machine', config: machine_config, name: 'vagrant', provider: 'virtualbox', config: machine_config, communicate: communicator, ui: double('ui', opts: {})) }
15
- let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') }
9
+ mock_env
16
10
 
17
11
  before do
18
12
  # Mock the local env creation
@@ -6,13 +6,7 @@ describe VagrantPlugins::VagrantWinRM::WinRMUpload, :unit => true do
6
6
  =begin ############
7
7
  # Here we mock!
8
8
  =end ##############
9
-
10
- let(:idx) { double('idx') }
11
- let(:communicator) { double('communicator') }
12
- let(:config_vm) { double('config_vm', communicator: :winrm) }
13
- let(:machine_config) { double('machine_config', vm: config_vm) }
14
- let(:machine) { double('machine', config: machine_config, name: 'vagrant', provider: 'virtualbox', config: machine_config, communicate: communicator, state:nil, ui: double('ui', opts: {})) }
15
- let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') }
9
+ mock_env
16
10
 
17
11
  before do
18
12
  # Mock the local env creation
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-winrm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Baptiste Courtois
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-04 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitar