Sha256: cf56ba0b2de83ea01b22d2d97678ae2832f3e94dc610fe65c18736823bdae194

Contents?: true

Size: 712 Bytes

Versions: 26

Compression:

Stored size: 712 Bytes

Contents

# == PlatformManager::Darwin
#
# A PlatformManager driver for Apple's Darwin.
class AutomateIt::PlatformManager::Darwin < AutomateIt::PlatformManager::Struct
  depends_on :files => ["/usr/sbin/scutil"], :programs => ["which", "uname"]

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

  def _prepare
    return if @struct[:release]
    @struct[:os] = "darwin"
    @struct[:arch] = `uname -p`.strip.downcase
    @struct[:distro] = "apple"
    @struct[:release] = `uname -r`.strip.downcase
    @struct
  end
  private :_prepare

  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/darwin.rb
automate-it-0.9.1 lib/automateit/platform_manager/darwin.rb
automate-it-0.9.0 lib/automateit/platform_manager/darwin.rb
automateit-0.71030 lib/automateit/platform_manager/darwin.rb
automateit-0.71031.1 lib/automateit/platform_manager/darwin.rb
automateit-0.71031.2 lib/automateit/platform_manager/darwin.rb
automateit-0.71012 lib/automateit/platform_manager/darwin.rb
automateit-0.71017 lib/automateit/platform_manager/darwin.rb
automateit-0.71021 lib/automateit/platform_manager/darwin.rb
automateit-0.71102 lib/automateit/platform_manager/darwin.rb
automateit-0.71031 lib/automateit/platform_manager/darwin.rb
automateit-0.71103 lib/automateit/platform_manager/darwin.rb
automateit-0.71101.2 lib/automateit/platform_manager/darwin.rb
automateit-0.71101.1 lib/automateit/platform_manager/darwin.rb
automateit-0.71101 lib/automateit/platform_manager/darwin.rb
automateit-0.71112 lib/automateit/platform_manager/darwin.rb
automateit-0.71221 lib/automateit/platform_manager/darwin.rb
automateit-0.71220 lib/automateit/platform_manager/darwin.rb
automateit-0.71219 lib/automateit/platform_manager/darwin.rb
automateit-0.71104 lib/automateit/platform_manager/darwin.rb