lib/kitchen/driver/aws/standard_platform/amazon.rb in kitchen-ec2-3.7.1 vs lib/kitchen/driver/aws/standard_platform/amazon.rb in kitchen-ec2-3.7.2
- old
+ new
@@ -37,10 +37,10 @@
search["architecture"] = architecture if architecture
search
end
def self.from_image(driver, image)
- if image.name =~ /amzn-ami/i
+ if /amzn-ami/i.match?(image.name)
image.name =~ /\b(\d+(\.\d+[\.\d])?)/i
new(driver, "amazon", (Regexp.last_match || [])[1], image.architecture)
end
end
end