Sha256: bd8ef71f9a25972da41db4d5a6d50db9c1a0f1dfa45b5c7b1e440fdf2f175aa9

Contents?: true

Size: 743 Bytes

Versions: 26

Compression:

Stored size: 743 Bytes

Contents

# == PlatformManager::SunOS
#
# A PlatformManager driver for SunOS.
class AutomateIt::PlatformManager::SunOS < AutomateIt::PlatformManager::Uname
  def self.token
    :sunos
  end

  depends_on \
    :programs => %w(uname),
    :callbacks => [lambda {
      begin
        not `uname -s`.match(/SunOS/i).nil?
      rescue
        false
      end
    }]

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

  def _prepare
    return if @struct[:release]
    @struct[:distro] = "sun"
    @struct[:release] = `uname -r`.strip.downcase
    @struct
  end

  def query(search)
    _prepare
    super(search)
  end

  def single_vendor?
    return true
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
automate-it-0.9.2 lib/automateit/platform_manager/sunos.rb
automate-it-0.9.1 lib/automateit/platform_manager/sunos.rb
automate-it-0.9.0 lib/automateit/platform_manager/sunos.rb
automateit-0.71030 lib/automateit/platform_manager/sunos.rb
automateit-0.71031.1 lib/automateit/platform_manager/sunos.rb
automateit-0.71031.2 lib/automateit/platform_manager/sunos.rb
automateit-0.71012 lib/automateit/platform_manager/sunos.rb
automateit-0.71017 lib/automateit/platform_manager/sunos.rb
automateit-0.71021 lib/automateit/platform_manager/sunos.rb
automateit-0.71102 lib/automateit/platform_manager/sunos.rb
automateit-0.71031 lib/automateit/platform_manager/sunos.rb
automateit-0.71103 lib/automateit/platform_manager/sunos.rb
automateit-0.71101.2 lib/automateit/platform_manager/sunos.rb
automateit-0.71101.1 lib/automateit/platform_manager/sunos.rb
automateit-0.71101 lib/automateit/platform_manager/sunos.rb
automateit-0.71221 lib/automateit/platform_manager/sunos.rb
automateit-0.71219 lib/automateit/platform_manager/sunos.rb
automateit-0.71220 lib/automateit/platform_manager/sunos.rb
automateit-0.71112 lib/automateit/platform_manager/sunos.rb
automateit-0.71104 lib/automateit/platform_manager/sunos.rb