knife-ec2 2.0.3 → 2.0.4

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: '0792e566da930105ef238d8d64cb2fe79501895dcace746aa1a255b3e9d4a7f5'
4
- data.tar.gz: 9078a6bb126100a28800abc87cd20d0344b33cbe090303795f414a9523e427d3
3
+ metadata.gz: 16530eadac768b8b35d935346fe20b291ff40623b302b2c050c5b63e8c38879f
4
+ data.tar.gz: 49d24390d1c3e6ba4bcfe330628bf1b1debd8bf4bd38725b1892eb8c066a624d
5
5
  SHA512:
6
- metadata.gz: 4992729a869dd890f29f7d1d52cf957a4faf4d806f295abd62e760e60e0f9cb2916984c5f06e93538e362e39b71db2b9b56e8f2778661b04dafc6949b681e75d
7
- data.tar.gz: a9f75d6fd86635c9cd67dcd50fc52ed5aae503d8004e212f53fc9d87f0b7159936a4f274b996e56a829cf28e04758c08b34e555c63096412553646561ca6142f
6
+ metadata.gz: 26a987b8e84c65929f8ad6bdaab50258320a7b58747a689c61e4d294f156ad612338cf57a1fd34a6a33cd1c510d3812faa061a1ae978315c258343093c6ea08d
7
+ data.tar.gz: 8e7e4e7e3cc6c7181555ab0b412f7560b6f976554c8671c9586daf7832d6937a9af51b42997a8f6844fb7b05d21ae2b36c831bbabb5d1f078c8d152763d3f63e
@@ -28,9 +28,9 @@ class Chef
28
28
  include Knife::Ec2Base
29
29
 
30
30
  deps do
31
- require "tempfile"
32
- require "uri"
33
- require "net/ssh"
31
+ require "tempfile" unless defined?(Tempfile)
32
+ require "uri" unless defined?(URI)
33
+ require "net/ssh" unless defined?(Net::SSH)
34
34
  require "net/ssh/gateway"
35
35
  Chef::Knife::Bootstrap.load_deps
36
36
  end
@@ -826,7 +826,7 @@ class Chef
826
826
 
827
827
  # base64-encoded text
828
828
  def encode_data(text)
829
- require "base64"
829
+ require "base64" unless defined?(Base64)
830
830
  Base64.encode64(text)
831
831
  end
832
832
 
@@ -1321,8 +1321,8 @@ class Chef
1321
1321
  end
1322
1322
 
1323
1323
  def decrypt_admin_password(encoded_password, key)
1324
- require "base64"
1325
- require "openssl"
1324
+ require "base64" unless defined?(Base64)
1325
+ require "openssl" unless defined?(OpenSSL)
1326
1326
  private_key = OpenSSL::PKey::RSA.new(key)
1327
1327
  encrypted_password = Base64.decode64(encoded_password)
1328
1328
  private_key.private_decrypt(encrypted_password)
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Ec2
3
- VERSION = "2.0.3".freeze
3
+ VERSION = "2.0.4".freeze
4
4
  MAJOR, MINOR, TINY = VERSION.split(".")
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-06 00:00:00.000000000 Z
11
+ date: 2020-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef