knife-windows 4.0.6 → 4.0.7

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
  SHA256:
3
- metadata.gz: 8f429ee0fa74c0d2ececf226e1605a165233e01d84071ec07dcd294bcce0e47a
4
- data.tar.gz: 7e45e692b1496971400cf3da7af3a39139589d17ccc9badff99aaa8d456f6c84
3
+ metadata.gz: 6f7b54f5b7e7859cd0964f315d6665981b2e7fb78776683b52b81a73bacc51e4
4
+ data.tar.gz: e69fe477779128138dca7e45c6839e096f45ebee16861860538d10056ead1c1d
5
5
  SHA512:
6
- metadata.gz: 9fadc2ce078b8845adefde49d8bfcf8e87940b690cb88b1ceab7f1659f413dea8093247e91151802c095bb99cb8f750441c87f0836845a58a83aa8a000ffda71
7
- data.tar.gz: 37022b1de2db4b3861617e9035b3197a691b690ba197bccf59b98758c1e77387ffa8837c3c3536e46a8e469a8507bb2e9ed57add8b4998c9ecd8f385c5f25de4
6
+ metadata.gz: 235a3c423f774569de51509ed0f8d717c01afbc66a58a4825091b16ab35987870757860baa35e3ec8767879fb42adea4964a2c11f45ccc6a5509ea116a30dccb
7
+ data.tar.gz: ef2598ce31d29f0bfc5ed933005f1d2b3fbb669d964d3eac5306435c3b3ca59ba9cda9d25e75e256846bc2a91b142a0fa1ff6dce7ce8864584fa3f7f42b28d02
@@ -1,5 +1,5 @@
1
1
  # Author:: Mukta Aphale (<mukta.aphale@clogeny.com>)
2
- # Copyright:: Copyright (c) 2014-2016 Chef Software, Inc.
2
+ # Copyright:: Copyright (c) Chef Software Inc.
3
3
  # License:: Apache License, Version 2.0
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -60,6 +60,10 @@ class Chef
60
60
  passphrase.strip
61
61
  end
62
62
 
63
+ def exitstatus
64
+ $?.exitstatus
65
+ end
66
+
63
67
  def run
64
68
  STDOUT.sync = STDERR.sync = true
65
69
 
@@ -68,7 +72,7 @@ class Chef
68
72
  if config[:cert_install]
69
73
  config[:cert_passphrase] = get_cert_passphrase unless config[:cert_passphrase]
70
74
  result = `powershell.exe -Command " '#{config[:cert_passphrase]}' | certutil -importPFX '#{config[:cert_install]}' AT_KEYEXCHANGE"`
71
- if $?.exitstatus
75
+ if exitstatus
72
76
  ui.info "Certificate installed to Certificate Store"
73
77
  result = `powershell.exe -Command " echo (Get-PfxCertificate #{config[:cert_install]}).thumbprint "`
74
78
  ui.info "Certificate Thumbprint: #{result}"
@@ -88,7 +92,7 @@ class Chef
88
92
  result = `winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname="#{config[:hostname]}";CertificateThumbprint="#{config[:cert_thumbprint]}";Port="#{config[:port]}"}`
89
93
  Chef::Log.debug result
90
94
 
91
- if $?.exitstatus == 0
95
+ if exitstatus == 0
92
96
  ui.info "WinRM listener created with Port: #{config[:port]} and CertificateThumbprint: #{config[:cert_thumbprint]}"
93
97
  else
94
98
  ui.error "Error creating WinRM listener. use -VV for more details."
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Windows
3
- VERSION = "4.0.6".freeze
3
+ VERSION = "4.0.7".freeze
4
4
  MAJOR, MINOR, TINY = VERSION.split(".")
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Mukta Aphale <mukta.aphale@clogeny.com>
3
- # Copyright:: Copyright (c) 2014-2016 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) Chef Software Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -41,7 +41,7 @@ describe Chef::Knife::WindowsListenerCreate do
41
41
  @listener.config[:port] = "5986"
42
42
  @listener.config[:basic_auth] = true
43
43
  expect(@listener).to receive(:`).with("winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname=\"host\";CertificateThumbprint=\"CERT-THUMBPRINT\";Port=\"5986\"}")
44
- expect($?).to receive(:exitstatus).and_return(100)
44
+ expect(@listener).to receive(:exitstatus).and_return(100)
45
45
  expect(@listener.ui).to receive(:error).with("Error creating WinRM listener. use -VV for more details.")
46
46
  expect(@listener.ui).to_not receive(:info).with("WinRM listener created with Port: 5986 and CertificateThumbprint: CERT-THUMBPRINT")
47
47
  expect { @listener.run }.to raise_error(SystemExit)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-windows
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.6
4
+ version: 4.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Chisamore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-09 00:00:00.000000000 Z
11
+ date: 2021-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.0.3
126
+ rubygems_version: 3.1.4
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Plugin that adds functionality to Chef's Knife CLI for configuring/interacting