matschaffer/knife-solo

View on GitHub
lib/knife-solo/bootstraps/darwin.rb

Summary

Maintainability
A
0 mins
Test Coverage
module KnifeSolo::Bootstraps
  class Darwin < Base

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

    def distro
      case issue
      when %r{10.(?:[6-9]|10)}
        {:type => 'omnibus'}
      else
        raise "OS X version #{issue} not supported"
      end
    end
  end
end