knife-azure 3.0.4 → 3.0.5

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: 17210f56bc1b6b7efd7152512c8ee5c416d0eb6afed2139f757bbd96f20baaa8
4
- data.tar.gz: 3cba997f30e540035c9b4495326c09e70d45a3c0d7c9f84d01377168bf73837f
3
+ metadata.gz: '09efc06fd6788aa94f2af8ace7bd411b9d90c4f3df736a0559997bc5298a5336'
4
+ data.tar.gz: 6cfd515b9371c8d4a7c0c7ed58575f581470c2ecd3ed7604329291c2fb1a1eec
5
5
  SHA512:
6
- metadata.gz: 884f5d06b3ad5159a97a81434e508185c64c0850f135b2b71094f70076aeecc0b7670f58d83215531344b903820caefeacec85aee53f7d254cbbbe22eca21548
7
- data.tar.gz: f57c4e8b5cad7a9437a4292c1c41b2ff668d9c42f32c322ef1f1ac7fe87d735b8fff7c8d2859500958f3e11616487e0606960f75d39c7948fbdc0fdb46723924
6
+ metadata.gz: a8e905e8136596fa27fa18898f73dd871138f52118792939df1be75da3f4122bcf358529605793b0a517fb7cf37036bf0b3b7f85ff57ffcec1a8aa1efff45652
7
+ data.tar.gz: 25b0054daa620887733644c1ad87983fd7e5c325de4781071c81773dee39f83c7a8c2a308c9ee1341220583be9415d8596fa8ac9cf525fd32d0d2facec11c8d0
@@ -19,8 +19,8 @@
19
19
  # XPLAT stores the access token and other information in windows credential manager.
20
20
  # Using FFI to call CredRead function
21
21
  require "chef"
22
- require "mixlib/shellout"
23
- require "ffi"
22
+ require "mixlib/shellout" unless defined?(Mixlib::ShellOut)
23
+ require "ffi" unless defined?(FFI)
24
24
  require "chef/win32/api"
25
25
 
26
26
  module Azure
@@ -16,9 +16,10 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require "net/https"
20
- require "uri"
21
- require "nokogiri"
19
+ require "net/http" unless defined?(Net::HTTP)
20
+ require "openssl" unless defined?(OpenSSL)
21
+ require "uri" unless defined?(URI)
22
+ require "nokogiri" unless defined?(Nokogiri)
22
23
 
23
24
  module AzureAPI
24
25
 
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require "securerandom"
19
+ require "securerandom" unless defined?(SecureRandom)
20
20
  require_relative "utility"
21
21
 
22
22
  module Azure
@@ -32,7 +32,7 @@ class Chef
32
32
  include Knife::Bootstrap::Bootstrapper
33
33
 
34
34
  deps do
35
- require "securerandom"
35
+ require "securerandom" unless defined?(SecureRandom)
36
36
  require "readline"
37
37
  require "chef/json_compat"
38
38
  require "chef/knife/bootstrap"
@@ -31,7 +31,7 @@ class Chef
31
31
  include Knife::Bootstrap::Bootstrapper
32
32
 
33
33
  deps do
34
- require "securerandom"
34
+ require "securerandom" unless defined?(SecureRandom)
35
35
  include Knife::AzurermBase
36
36
  end
37
37
 
@@ -29,7 +29,7 @@ class Chef
29
29
  include Knife::Bootstrap::Bootstrapper
30
30
 
31
31
  deps do
32
- require "time"
32
+ require "time" unless defined?(Time)
33
33
  include Knife::AzurermBase
34
34
  end
35
35
 
@@ -204,10 +204,10 @@ class Chef
204
204
  end
205
205
 
206
206
  def parse_publish_settings_file(filename)
207
- require "nokogiri"
208
- require "base64"
209
- require "openssl"
210
- require "uri"
207
+ require "nokogiri" unless defined?(Nokogiri)
208
+ require "base64" unless defined?(Base64)
209
+ require "openssl" unless defined?(OpenSSL)
210
+ require "uri" unless defined?(URI)
211
211
  begin
212
212
  doc = Nokogiri::XML(File.open(find_file(filename)))
213
213
  profile = doc.at_css("PublishProfile")
@@ -235,8 +235,8 @@ class Chef
235
235
  end
236
236
 
237
237
  def parse_azure_profile(filename, errors)
238
- require "openssl"
239
- require "uri"
238
+ require "openssl" unless defined?(OpenSSL)
239
+ require "uri" unless defined?(URI)
240
240
  errors = [] if errors.nil?
241
241
  azure_profile = File.read(File.expand_path(filename))
242
242
  azure_profile = JSON.parse(azure_profile)
@@ -35,8 +35,8 @@ class Chef
35
35
  require "chef/json_compat"
36
36
  require_relative "../../../azure/resource_management/ARM_interface"
37
37
  require "chef/mixin/shell_out"
38
- require "time"
39
- require "json"
38
+ require "time" unless defined?(Time)
39
+ require "json" unless defined?(JSON)
40
40
 
41
41
  if Chef::Platform.windows?
42
42
  require_relative "../../azure/resource_management/windows_credentials"
@@ -172,10 +172,10 @@ class Chef
172
172
  end
173
173
 
174
174
  def parse_publish_settings_file(filename)
175
- require "nokogiri"
176
- require "base64"
177
- require "openssl"
178
- require "uri"
175
+ require "nokogiri" unless defined?(Nokogiri)
176
+ require "base64" unless defined?(Base64)
177
+ require "openssl" unless defined?(OpenSSL)
178
+ require "uri" unless defined?(URI)
179
179
  begin
180
180
  doc = Nokogiri::XML(File.open(find_file(filename)))
181
181
  profile = doc.at_css("PublishProfile")
@@ -17,7 +17,7 @@
17
17
 
18
18
  module Knife
19
19
  module Azure
20
- VERSION = "3.0.4".freeze
20
+ VERSION = "3.0.5".freeze
21
21
  MAJOR, MINOR, TINY = VERSION.split(".")
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barry Davis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-08-06 00:00:00.000000000 Z
12
+ date: 2020-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef