Sha256: bdb5292afaea48a0ea72e5a12260d45e08d4ad509b9ab1e52e49d52e05ad29c6

Contents?: true

Size: 634 Bytes

Versions: 7

Compression:

Stored size: 634 Bytes

Contents

=begin rdoc
  Vmx file creator
  
  Usage:
    Vmx.new({
      :name => "MyPP",
     :vmx_disk => {
       :image_size => "2G"
     },
     :base_directory => "/tmp/vmx"
    }).compile
=end
class Vmx
  include Dslify
  
  default_options(
    :name => "PoolParty",
    :base_directory => "~/Documents/Virtual\ Machines.localized"
  )
  
  def initialize(o={})
    dsl_options o
    @vmx_file = VmxFile.new o
    @vmx_disk = VmxDisk.new o    
  end
  
  def compile
    ::FileUtils.mkdir_p "#{base_directory}/#{options[:name]}"
    vmdk = @vmx_disk.compile
    @vmx_file.set("ide0:0.fileName", vmdk)
    @vmx_file.compile    
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
auser-poolparty-1.1.6 lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb
auser-poolparty-1.1.7 lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb
auser-poolparty-1.2.0 lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb
auser-poolparty-1.2.1 lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb
auser-poolparty-1.2.2 lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb
fairchild-poolparty-1.1.5 lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb
poolparty-1.2.2 lib/poolparty/net/remoter_bases/vmrun/utilities/vmx.rb