macinbox 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 474f8768420d2c194e78c4c92696cbeba1138c08
4
- data.tar.gz: eb7adcd5810db338a8c81ea38287590ac6597dce
3
+ metadata.gz: 99b011adb0f62501e0bbbf6fe41b354c4c698f11
4
+ data.tar.gz: f91366d4caa707cfda00119d5fa32d85841fb0d4
5
5
  SHA512:
6
- metadata.gz: 36080184de62a0730413d1ef1c464f9050db3edc969838468b77c073d1e6ac273091530fcaecd8cc152dc1a4effdd8fad128ac684bd2fa26fc1c7a9df8852348
7
- data.tar.gz: 79a8b56feb78da81bd4a82cae61a81fea3ef18b4b97811e7ec9047277026986a7f44183314a7e0a8845829d080765c1863e5a57da79424682cfec159b6ab72eb
6
+ metadata.gz: 8f4756269191d2d7211ee52d946d8c97d4c42ae42fd6814d3e73f21d200aa18ce0a4d4f65e8629129520ac8b221a8ee4acfc6639c839ee558a0f096fe2d35ed9
7
+ data.tar.gz: 1ffe9d0be48525b0076603161bb017181263377dcf73ab3cbde19ff69f4b378b7b96baed595099d289a8e5d828d85222b7031fffed55d0a4f6e17d12ee43418d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- macinbox (1.0.1)
4
+ macinbox (1.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -121,6 +121,7 @@ module Macinbox
121
121
  config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", disabled: true
122
122
  config.vm.synced_folder ".", "/vagrant", disabled: true
123
123
  config.vm.provider "vmware_fusion" do |v|
124
+ v.vmx["ethernet0.virtualDev"] = "e1000e"
124
125
  v.gui = #{@gui}
125
126
  end
126
127
  end
@@ -114,9 +114,9 @@ module Macinbox
114
114
  bundle_short_version = Task.backtick %W[ defaults read #{"/Applications/VMware Fusion.app/Contents/Info.plist"} CFBundleShortVersionString ]
115
115
  darwin_iso_url = "http://softwareupdate.vmware.com/cds/vmw-desktop/fusion/#{bundle_short_version}/#{bundle_version}/packages/com.vmware.fusion.tools.darwin.zip.tar"
116
116
  Dir.chdir(@temp_dir) do
117
- Task.run %W[ curl -O #{darwin_iso_url} ]
117
+ Task.run %W[ curl #{darwin_iso_url} -O ] + (@debug ? [] : %W[ -s -S ])
118
118
  Task.run %W[ tar -xf com.vmware.fusion.tools.darwin.zip.tar com.vmware.fusion.tools.darwin.zip ]
119
- Task.run %W[ unzip com.vmware.fusion.tools.darwin.zip payload/darwin.iso ]
119
+ Task.run %W[ unzip ] + (@debug ? [] : %W[ -qq ]) + %W[ com.vmware.fusion.tools.darwin.zip payload/darwin.iso ]
120
120
  end
121
121
  tools_image = "#{@temp_dir}/payload/darwin.iso"
122
122
  end
@@ -30,16 +30,11 @@ module Macinbox
30
30
  Logger.info "Mounting the image..." do
31
31
 
32
32
  @collector.on_cleanup do
33
- %x( hdiutil detach -quiet -force #{@mountpoint.shellescape} > /dev/null 2>&1 ) if @mountpoint
34
33
  %x( diskutil eject #{@device.shellescape} > /dev/null 2>&1 ) if @device
35
34
  end
36
35
 
37
- @mountpoint = "#{@temp_dir}/image_mountpoint"
38
-
39
- FileUtils.mkdir @mountpoint
40
-
41
36
  @device = %x(
42
- hdiutil attach #{@input_image.shellescape} -mountpoint #{@mountpoint.shellescape} -nobrowse -owners on |
37
+ hdiutil attach #{@input_image.shellescape} -nomount |
43
38
  grep _partition_scheme |
44
39
  cut -f1 |
45
40
  tr -d [:space:]
@@ -55,7 +50,8 @@ module Macinbox
55
50
  Task.run %W[ #{rawdiskCreator} create #{@device} fullDevice rawdisk lsilogic ]
56
51
  Task.run %W[ #{vdiskmanager} -t 0 -r rawdisk.vmdk macinbox.vmdk ]
57
52
  end
58
- %x( diskutil eject #{@device.shellescape} > /dev/null 2>&1 )
53
+ Task.run %W[ diskutil eject #{@device.shellescape} ]
54
+ @device = nil
59
55
  end
60
56
 
61
57
  Logger.info "Moving the VMDK to the destination..." do
@@ -21,7 +21,7 @@ module Macinbox
21
21
  vagrant_boxes_dir = File.expand_path "~/.vagrant.d/boxes"
22
22
  raise Macinbox::Error.new("~/.vagrant.d/boxes not found") unless File.exist? vagrant_boxes_dir
23
23
  box_name = @box_name
24
- box_version = Dir["#{vagrant_boxes_dir}/#{box_name}/*"].map { |o| File.basename(o).to_i }.sort.last.next rescue 0
24
+ box_version = Dir["#{vagrant_boxes_dir}/#{box_name}/*/*"].map { |o| o.split('/')[-2].to_i }.sort.last.next rescue 0
25
25
  box_provider = "vmware_fusion"
26
26
  target_box_dir = "#{vagrant_boxes_dir}/#{box_name}/#{box_version}/#{box_provider}"
27
27
  raise Macinbox::Error.new("box already exists") if File.exist? target_box_dir
@@ -1,3 +1,3 @@
1
1
  module Macinbox
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macinbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Kramer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-07 00:00:00.000000000 Z
11
+ date: 2018-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler