Sha256: a6974b711a99186b35003bfd02108b41f69f9b8cd5bb0d7d7bbdeb7177bcbec2

Contents?: true

Size: 728 Bytes

Versions: 8

Compression:

Stored size: 728 Bytes

Contents

module KnifeSolo::Bootstraps
  class Darwin < Base

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

    def gem_packages
      ['chef']
    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

8 entries across 8 versions & 1 rubygems

Version Path
knife-solo-0.3.0.pre1 lib/knife-solo/bootstraps/darwin.rb
knife-solo-0.2.0 lib/knife-solo/bootstraps/darwin.rb
knife-solo-0.2.0.pre1 lib/knife-solo/bootstraps/darwin.rb
knife-solo-0.1.0 lib/knife-solo/bootstraps/darwin.rb
knife-solo-0.1.0.pre1 lib/knife-solo/bootstraps/darwin.rb
knife-solo-0.0.15 lib/knife-solo/bootstraps/darwin.rb
knife-solo-0.0.14 lib/knife-solo/bootstraps/darwin.rb
knife-solo-0.0.13 lib/knife-solo/bootstraps/darwin.rb