lib/kitchen/driver/aws/standard_platform/debian.rb in kitchen-ec2-3.7.1 vs lib/kitchen/driver/aws/standard_platform/debian.rb in kitchen-ec2-3.7.2
- old
+ new
@@ -58,10 +58,10 @@
search["architecture"] = architecture if architecture
search
end
def self.from_image(driver, image)
- if image.name =~ /debian/i
+ if /debian/i.match?(image.name)
image.name =~ /\b(\d+|#{DEBIAN_CODENAMES.values.join("|")})\b/i
version = (Regexp.last_match || [])[1]
if version && version.to_i == 0
version = DEBIAN_CODENAMES.find do |_v, codename|
codename == version.downcase