lib/knife-solo/bootstraps/darwin.rb in knife-solo-0.3.0.pre2 vs lib/knife-solo/bootstraps/darwin.rb in knife-solo-0.3.0.pre3
- old
+ new
@@ -1,29 +1,17 @@
module KnifeSolo::Bootstraps
class Darwin < Base
def issue
- run_command("sw_vers -productVersion").stdout.strip
+ @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'}
+ when %r{10.[6-8]}
+ {:type => 'omnibus'}
else
- raise "OSX version #{issue} not supported"
+ raise "OS X 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