virtualbox 0.8.1 → 0.8.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.
@@ -1,5 +1,5 @@
1
1
  module VirtualBox
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
 
4
4
  module Version
5
5
  # Returns a boolean denoting whether the current VirtualBox
data/lib/virtualbox/vm.rb CHANGED
@@ -472,7 +472,7 @@ module VirtualBox
472
472
  # as well
473
473
  session = Lib.lib.session
474
474
  interface.launch_vm_process(session, mode.to_s, "").wait
475
- session.unlock_machine
475
+ session.unlock_machine if session.state == :open
476
476
  true
477
477
  end
478
478
 
data/lib/virtualbox.rb CHANGED
@@ -8,4 +8,4 @@ VirtualBox::GlobLoader.glob_require(libdir, %w{ext/logger ext/platform ext/subcl
8
8
  # Setup the top-level module methods
9
9
  module VirtualBox
10
10
  extend Version
11
- end
11
+ end
@@ -118,7 +118,7 @@ class ApplianceTest < Test::Unit::TestCase
118
118
  end
119
119
 
120
120
  should "call write on interface and wait for completion" do
121
- @interface.expects(:write).with("ovf-1.0", @instance.path).once.returns(@progress)
121
+ @interface.expects(:write).with("ovf-1.0", true, @instance.path).once.returns(@progress)
122
122
  @progress.expects(:wait)
123
123
 
124
124
  @instance.export
@@ -144,13 +144,13 @@ class ApplianceTest < Test::Unit::TestCase
144
144
  end
145
145
 
146
146
  should "call export on the VM interface with the appliance" do
147
- @machine_interface.expects(:export).with(@interface).once
147
+ @machine_interface.expects(:export).with(@interface, @instance.path).once
148
148
  @instance.add_machine(@machine)
149
149
  end
150
150
 
151
151
  should "add to the description for each option given" do
152
152
  sys = mock("sys")
153
- @machine_interface.expects(:export).with(@interface).once.returns(sys)
153
+ @machine_interface.expects(:export).with(@interface, @instance.path).once.returns(sys)
154
154
  sys.expects(:add_description).with(:foo, :bar, :bar)
155
155
  @instance.add_machine(@machine, { :foo => :bar })
156
156
  end
@@ -267,6 +267,7 @@ class VMTest < Test::Unit::TestCase
267
267
  mode = "foo"
268
268
  @interface.expects(:launch_vm_process).with(@session, mode, "").once.returns(@progress).in_sequence(start_seq)
269
269
  @progress.expects(:wait).in_sequence(start_seq)
270
+ @session.expects(:unlock_machine).in_sequence(start_seq)
270
271
  assert @instance.start(mode)
271
272
  end
272
273
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 1
9
- version: 0.8.1
8
+ - 2
9
+ version: 0.8.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mitchell Hashimoto
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-07 00:00:00 -08:00
17
+ date: 2011-01-16 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -435,7 +435,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
435
435
  requirements:
436
436
  - - ">="
437
437
  - !ruby/object:Gem::Version
438
- hash: -618556609550442000
438
+ hash: 4340137299598754492
439
439
  segments:
440
440
  - 0
441
441
  version: "0"