Skip to content

Commit

Permalink
fix: switch string matching method to support older rubies
Browse files Browse the repository at this point in the history
  • Loading branch information
justintsteele committed Aug 26, 2024
1 parent a24357b commit 16bf0d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/kitchen/driver/oci/models/iscsi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def initialize(config, state, oci, api)
attr_reader :attachment_type

def attachment_details(volume_details, server_id, volume_config)
device = volume_config[:device] unless server_os(server_id).downcase.match?(/windows/)
device = volume_config[:device] unless server_os(server_id).downcase =~ /windows/
OCI::Core::Models::AttachIScsiVolumeDetails.new(
display_name: "#{attachment_type}-#{volume_details.display_name}",
volume_id: volume_details.id,
Expand Down
2 changes: 1 addition & 1 deletion lib/kitchen/driver/oci/models/paravirtual.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def initialize(config, state, oci, api)
attr_reader :attachment_type

def attachment_details(volume_details, server_id, volume_config)
device = volume_config[:device] unless server_os(server_id).downcase.match?(/windows/)
device = volume_config[:device] unless server_os(server_id).downcase =~ /windows/
OCI::Core::Models::AttachParavirtualizedVolumeDetails.new(
display_name: "#{attachment_type}-#{volume_details.display_name}",
volume_id: volume_details.id,
Expand Down

0 comments on commit 16bf0d0

Please sign in to comment.