Sha256: 3dae73d423ed7ca76d83a44d569dc816b220cfeb8184224149a2c7f83420eac6

Contents?: true

Size: 627 Bytes

Versions: 31

Compression:

Stored size: 627 Bytes

Contents

# == PlatformManager::Gentoo
#
# A PlatformManager driver for Gentoo Linux.
class AutomateIt::PlatformManager::Gentoo < AutomateIt::PlatformManager::Uname
  GENTOO_RELEASE = "/etc/gentoo-release"

  depends_on :files => [GENTOO_RELEASE]

  def suitability(method, *args) # :nodoc:
    # Must be higher than PlatformManager::Struct
    return available? ? 3 : 0
  end

  def _prepare
    return if @struct[:distro]
    @struct[:distro] = "gentoo"
    @struct[:release] = File.read(GENTOO_RELEASE).strip.match(/\s([\d\.]+)$/)[1]
    @struct
  end
  private :_prepare

  def query(search)
    _prepare
    super(search)
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
automate-it-0.9.2 lib/automateit/platform_manager/gentoo.rb
automate-it-0.9.1 lib/automateit/platform_manager/gentoo.rb
automate-it-0.9.0 lib/automateit/platform_manager/gentoo.rb
automateit-0.70923 lib/automateit/platform_manager/gentoo.rb
automateit-0.70930 lib/automateit/platform_manager/gentoo.rb
automateit-0.71003 lib/automateit/platform_manager/gentoo.rb
automateit-0.70928 lib/automateit/platform_manager/gentoo.rb
automateit-0.71030 lib/automateit/platform_manager/gentoo.rb
automateit-0.71031.1 lib/automateit/platform_manager/gentoo.rb
automateit-0.71031.2 lib/automateit/platform_manager/gentoo.rb
automateit-0.71006 lib/automateit/platform_manager/gentoo.rb
automateit-0.71017 lib/automateit/platform_manager/gentoo.rb
automateit-0.71012 lib/automateit/platform_manager/gentoo.rb
automateit-0.71021 lib/automateit/platform_manager/gentoo.rb
automateit-0.71103 lib/automateit/platform_manager/gentoo.rb
automateit-0.71031 lib/automateit/platform_manager/gentoo.rb
automateit-0.71101 lib/automateit/platform_manager/gentoo.rb
automateit-0.71101.1 lib/automateit/platform_manager/gentoo.rb
automateit-0.71101.2 lib/automateit/platform_manager/gentoo.rb
automateit-0.71102 lib/automateit/platform_manager/gentoo.rb