lib/beaker/platform.rb in beaker-5.8.1 vs lib/beaker/platform.rb in beaker-6.1.0
- old
+ new
@@ -1,44 +1,22 @@
module Beaker
# This class create a Platform object inheriting from String. It supports
# all String methods while adding several platform-specific use cases.
class Platform < String
# Supported platforms
- # rubocop:disable Layout/LineLength
- PLATFORMS = /^(alpine|amazon|huaweios|cisco_nexus|cisco_ios_xr|(free|open)bsd|osx|centos|fedora|debian|oracle|redhat|redhatfips|scientific|opensuse|sles|ubuntu|windows|solaris|aix|archlinux|el|eos|cumulus|f5|netscaler)\-.+\-.+$/
- # rubocop:enable Layout/LineLength
+ PLATFORMS = /^(alpine|amazon|(free|open)bsd|osx|centos|fedora|debian|oracle|redhat|redhatfips|scientific|opensuse|sles|ubuntu|windows|solaris|aix|archlinux|el)\-.+\-.+$/
# Platform version numbers vs. codenames conversion hash
PLATFORM_VERSION_CODES =
{ :debian => { "forky" => "14",
"trixie" => "13",
"bookworm" => "12",
"bullseye" => "11",
- "buster" => "10",
- "stretch" => "9",
- "jessie" => "8",
- "wheezy" => "7",
- "squeeze" => "6", },
+ "buster" => "10", },
:ubuntu => { "noble" => "2404",
"jammy" => "2204",
"focal" => "2004",
- "eoan" => "1910",
- "disco" => "1904",
- "cosmic" => "1810",
- "bionic" => "1804",
- "artful" => "1710",
- "zesty" => "1704",
- "yakkety" => "1610",
- "xenial" => "1604",
- "wily" => "1510",
- "vivid" => "1504",
- "utopic" => "1410",
- "trusty" => "1404",
- "saucy" => "1310",
- "raring" => "1304",
- "quantal" => "1210",
- "precise" => "1204",
- "lucid" => "1004", },
+ "bionic" => "1804", },
:osx => { "highsierra" => "1013",
"sierra" => "1012",
"elcapitan" => "1011",
"yosemite" => "1010",
"mavericks" => "109", }, }
@@ -58,13 +36,10 @@
# Creates the Platform object. Checks to ensure that the platform String
# provided meets the platform formatting rules. Platforms name must be of
# the format /^OSFAMILY-VERSION-ARCH.*$/ where OSFAMILY is one of:
# * amazon
- # * huaweios
- # * cisco_nexus
- # * cisco_ios_xr
# * freebsd
# * openbsd
# * osx
# * centos
# * fedora
@@ -78,12 +53,9 @@
# * ubuntu
# * windows
# * solaris
# * aix
# * el
- # * cumulus
- # * f5
- # * netscaler
# * archlinux
def initialize(name)
raise ArgumentError, "Unsupported platform name #{name}" if !PLATFORMS.match?(name)
super