Sha256: 7f1db458a2519bd00804733abfb25c026c5cedffecad1713beb2f07d3cec1ca8

Contents?: true

Size: 683 Bytes

Versions: 1

Compression:

Stored size: 683 Bytes

Contents

module KnifeSolo::Bootstraps
  class Darwin < Base

    def issue
      run_command("sw_vers -productVersion").stdout.strip
    end

    def distro
      case issue
      when %r{10.5}
          {:type => 'gem', :version => 'leopard'}
      when %r{10.6}
          {:type => 'gem', :version => 'snow_leopard'}
      else
          raise "OSX version #{issue} not supported"
      end
    end

    def has_xcode_installed?
      result = run_command("xcodebuild -version")
      result.success?
    end

    def run_pre_bootstrap_checks
      raise 'xcode not installed, which is required to do anything.  please install and run again.' unless has_xcode_installed?
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
knife-solo-0.3.0.pre2 lib/knife-solo/bootstraps/darwin.rb