lib/beaker-puppet/helpers/puppet_helpers.rb in beaker-puppet-1.22.0 vs lib/beaker-puppet/helpers/puppet_helpers.rb in beaker-puppet-1.22.1
- old
+ new
@@ -10,10 +10,10 @@
# for these methods to execute correctly
module PuppetHelpers
# Return the regular expression pattern for an IPv4 address
def ipv4_regex
- Resolv::IPv4::Regex
+ return /(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/
end
# Return the IP address that given hostname returns when resolved on
# the given host.
#