Sha256: 15788c4fbf57da390b5c70ef2d0241f63798f6d67d6d0a71b554b8a53cda3487
Contents?: true
Size: 891 Bytes
Versions: 2
Compression:
Stored size: 891 Bytes
Contents
module Vagrant module Util # This class just contains some platform checking code. class Platform class << self def tiger? platform.include?("darwin8") end def leopard? platform.include?("darwin9") end [:darwin, :bsd, :linux].each do |type| define_method("#{type}?") do platform.include?(type.to_s) end end def windows? %W[mingw mswin].each do |text| return true if platform.include?(text) end false end def tar_file_options # create, write only, fail if the file exists, binary if windows File::WRONLY|File::EXCL|File::CREAT|(Mario::Platform.windows? ? File::BINARY : 0) end def platform RUBY_PLATFORM.to_s.downcase end end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
vagrantup-0.5.4 | lib/vagrant/util/platform.rb |
vagrant-0.5.4 | lib/vagrant/util/platform.rb |