Sha256: 2ec7b13a668297507bc15595ab9c7bfd1a2c71270ff1e5d4f3adce7e856720c9
Contents?: true
Size: 1.04 KB
Versions: 22
Compression:
Stored size: 1.04 KB
Contents
# Copyright (C) 2011-2012 RightScale, Inc, All Rights Reserved Worldwide. # # THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE # AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use, # reproduction, modification, or disclosure of this program is # strictly prohibited. Any use of this program by an authorized # licensee is strictly subject to the terms and conditions, # including confidentiality obligations, set forth in the applicable # License Agreement between RightScale.com, Inc. and # the licensee module RightConf # Linux specific implementation class Platform attr_reader :flavor, :release # Initialize flavor and release def init @flavor = 'mac_os_x' @release = `sw_vers -productVersion` distros.keys.each do |k| if @release =~ /^10\.#{k}\.[0-9]+/ @flavor = distros[k] return end end end # Mac OS X distros used to setup 'flavor' def distros { 5 => 'leopard', 6 => 'snow leopard', 7 => 'lion' } end end end
Version data entries
22 entries across 22 versions & 1 rubygems