vagrant-windows-domain 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a229ad007dcbe70866e50934f61fa5f64f43604
4
- data.tar.gz: 9f8d84d07974fd3477df0668f6e33f917210c53f
3
+ metadata.gz: 42f3d186357fa789c5cfe433c9dcb260b30f0d1e
4
+ data.tar.gz: a0d0b75ed02779afc0c96fc7dd21c5fdcde19cd3
5
5
  SHA512:
6
- metadata.gz: 855602d71f7b086551907ebb97a4a4ea48ccea97838983a9c76cc8956cad4c76fbb6ce783c51cbbc629ea66275f7ae3b960615a50f29e2069af9eee3f1a36531
7
- data.tar.gz: 9b694ca5053521836793f9a888ca25077a5c3f42c054c763a18ce929def348cbe9518cebda8f613f4292512b5f8acc4068acb80b60a32eeb0ebc67dabe52fa70
6
+ metadata.gz: 0177c73b416054d338634b3abda33249f5c652eee85fbfc365b86d9039421afca652f603e3a0d6d30b89b16116e3ec974dea67c57f53407ecdd9eed3474065db
7
+ data.tar.gz: 1cd8a084046bc000aee30493c8c28e115810eb64cba17e698c9b6540c7555fcf9ccb3e3b24af5876d2ace64b957495fa60bc713b09eb9859ca6297b1eba4d02c
@@ -45,12 +45,12 @@ module VagrantPlugins
45
45
  # @param [Config] root_config The default configuration from the Vagrant hierarchy.
46
46
  def configure(root_config)
47
47
  raise WindowsDomainError, :unsupported_platform if !windows?
48
-
49
- verify_guest_capability
50
48
  end
51
49
 
52
50
  # Run the Provisioner!
53
51
  def provision
52
+ verify_guest_capability
53
+
54
54
  @old_computer_name = get_guest_computer_name(machine)
55
55
 
56
56
  @machine.env.ui.say(:info, "Connecting guest machine to domain '#{config.domain}' with computer name '#{config.computer_name}'")
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module WindowsDomain
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
@@ -45,12 +45,6 @@ describe VagrantPlugins::WindowsDomain::Provisioner do
45
45
  expect { subject.configure(root_config) }.to raise_error("Unsupported platform detected. Vagrant Windows Domain only works on Windows guest environments.")
46
46
  end
47
47
 
48
- it "should verify the guest has the required powershell cmdlets/capabilities" do
49
- expect(communicator).to receive(:sudo).with("which Add-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>nil, :binary=>"Add-Computer"})
50
- expect(communicator).to receive(:sudo).with("which Remove-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>nil, :binary=>"Remove-Computer"})
51
- subject.configure(root_config)
52
- end
53
-
54
48
  end
55
49
 
56
50
  describe "provision" do
@@ -64,8 +58,8 @@ describe VagrantPlugins::WindowsDomain::Provisioner do
64
58
  allow(shell).to receive(:powershell).with("$env:COMPUTERNAME").and_yield(:stdout, "myoldcomputername")
65
59
  allow(root_config).to receive(:vm).and_return(vm)
66
60
  allow(vm).to receive(:communicator).and_return(:winrm)
67
- expect(communicator).to receive(:sudo).with("which Add-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>"foo.com", :binary=>"Add-Computer"})
68
- expect(communicator).to receive(:sudo).with("which Remove-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>"foo.com", :binary=>"Remove-Computer"})
61
+ allow(communicator).to receive(:sudo).with("which Add-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>"foo.com", :binary=>"Add-Computer"})
62
+ allow(communicator).to receive(:sudo).with("which Remove-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>"foo.com", :binary=>"Remove-Computer"})
69
63
 
70
64
  root_config.domain = "foo.com"
71
65
  root_config.username = "username"
@@ -113,7 +107,6 @@ describe VagrantPlugins::WindowsDomain::Provisioner do
113
107
 
114
108
  it "join with credentials if provided" do
115
109
  args = subject.generate_command_arguments
116
- puts args
117
110
  end
118
111
 
119
112
  it "not join with credentials if 'unsecure' option provided" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-windows-domain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Fellows