kitchen-oci 1.18.0 → 1.18.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
  SHA256:
3
- metadata.gz: 04441716ec20ae5cf111a087f07990af96826770804f92a67edaa7335622391a
4
- data.tar.gz: 378640fe182082b49904fcef4671c7954bb794a51090c7e29a74ad25128addd0
3
+ metadata.gz: dc3416b97957d72c5262acfed751b388a1387a5e18b85fc02193bc88c2283c72
4
+ data.tar.gz: 2946ba6f22ac36f50e6699c8d20acbf628ba19ad0d6f80b042d89f3e269aff20
5
5
  SHA512:
6
- metadata.gz: 8cddfba0d04e8a8634656694b1158e9ea6e87eed48bb78b1f949d32aa2b2d0e58de38326c802da9ece1de1d5da209eab75c6b7d6e1e6f2c0e7224fa1dc81033a
7
- data.tar.gz: 7ed171e81ff8ab9d2559df7b9a4bab80d5d7fee5440ac0816971def8b48e6d4e65eed1b098b2f95cd1d5658e702c8523e053d05998a2929cb41636b846f4d674
6
+ metadata.gz: 5c260f31d16ba17bfdffb4384b93263d7ffe415e45c65a1f6c7b432ca78aa0cc89f14140988cbe9918c01b2c7b2496b2126d3584bc8792e4a31c954b2a6164e0
7
+ data.tar.gz: d7ba936db2bc7d265bab692250a595b2b94bfe9f5fe85dd9536e5d6b583bb68454c56d5d8240df5042b27b667d5c94063a4f2f3fa14d6ba4db31769e1904ad4c
@@ -66,13 +66,19 @@ module Kitchen
66
66
  def generic_api(klass)
67
67
  params = {}
68
68
  params[:proxy_settings] = api_proxy if api_proxy
69
- params[:signer] = if config[:use_instance_principals]
70
- OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new
71
- elsif config[:use_token_auth]
72
- token_signer
73
- end
69
+ params[:signer] = signer
74
70
  params[:config] = oci_config unless config[:use_instance_principals]
75
- klass.new(**params.compact)
71
+ # this is to accommodate old versions of ruby that do not have a compact method on a Hash
72
+ params.reject! { |_, v| v.nil? }
73
+ klass.new(**params)
74
+ end
75
+
76
+ def signer
77
+ if config[:use_instance_principals]
78
+ OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new
79
+ elsif config[:use_token_auth]
80
+ token_signer
81
+ end
76
82
  end
77
83
 
78
84
  def token_signer
@@ -65,7 +65,9 @@ module Kitchen
65
65
  end
66
66
 
67
67
  def config_loader(opts = {})
68
- OCI::ConfigFileLoader.load_config(**opts.compact)
68
+ # this is to accommodate old versions of ruby that do not have a compact method on a Hash
69
+ opts.reject! { |_, v| v.nil? }
70
+ OCI::ConfigFileLoader.load_config(**opts)
69
71
  rescue OCI::ConfigFileLoader::Errors::ConfigFileNotFoundError
70
72
  OCI::Config.new
71
73
  end
@@ -63,7 +63,7 @@ module Kitchen
63
63
 
64
64
  def image_id_by_name
65
65
  image_name = config[:image_name].gsub(" ", "-")
66
- image_list = images.select { |i| i.display_name.match?(/#{image_name}/) }
66
+ image_list = images.select { |i| i.display_name.match(/#{image_name}/) }
67
67
  raise "unable to find image_id" if image_list.empty?
68
68
 
69
69
  image_list = filter_image_list(image_list, image_name) if image_list.count > 1
@@ -73,7 +73,7 @@ module Kitchen
73
73
  end
74
74
 
75
75
  def filter_image_list(image_list, image_name)
76
- image_list.select { |i| i.display_name.match?(/#{image_name}-[0-9]{4}\.[0-9]{2}\.[0-9]{2}/) }
76
+ image_list.select { |i| i.display_name.match(/#{image_name}-[0-9]{4}\.[0-9]{2}\.[0-9]{2}/) }
77
77
  end
78
78
 
79
79
  def latest_image_id(image_list)
@@ -20,6 +20,6 @@
20
20
  module Kitchen
21
21
  module Driver
22
22
  # Version string for Oracle OCI Kitchen driver
23
- OCI_VERSION = "1.18.0"
23
+ OCI_VERSION = "1.18.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-oci
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Pearson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-04-04 00:00:00.000000000 Z
12
+ date: 2024-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oci