Sha256: bb9b990ad78f64b67cd23d881aecbf8fa7724d8cd5e3c18e5e28c2fa0cfe0032
Contents?: true
Size: 886 Bytes
Versions: 7
Compression:
Stored size: 886 Bytes
Contents
module Aua::OperatingSystems::Linux def self.extend?(agent) agent.platform_string == "X11" || agent.app_comments_string.match(PATTERN_LINUX) end PATTERN_LINUX = /(l|L)inux/ def platform :X11 end def os_name :Linux end def os_version @os_version ||= if app_comments_string =~ /OpenBSD/ "OpenBSD" elsif products.include?("Ubuntu") "Ubuntu" elsif products.include?("Red") && products.include?("Hat") "Red Hat" elsif products.include?("CentOS") "CentOS" elsif products.include?("Gentoo") "Gentoo" elsif products.include?("SUSE") "SUSE" elsif products.include?("Fedora") "Fedora" elsif app_comments_string =~ /FreeBSD/ "FreeBSD" elsif raw =~ /SunOS/ "Solaris" elsif raw =~ /Debian/ "Debian" elsif raw =~ /Maemo/ "Maemo" end end end
Version data entries
7 entries across 7 versions & 1 rubygems