virtualbox 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/Readme.md +9 -9
  2. data/VERSION +1 -1
  3. data/docs/GettingStarted.md +11 -11
  4. data/docs/WhatsNew.md +1 -1
  5. data/lib/virtualbox.rb +10 -1
  6. data/lib/virtualbox/abstract_model.rb +47 -29
  7. data/lib/virtualbox/abstract_model/attributable.rb +16 -16
  8. data/lib/virtualbox/abstract_model/dirty.rb +10 -10
  9. data/lib/virtualbox/abstract_model/relatable.rb +22 -22
  10. data/lib/virtualbox/abstract_model/validatable.rb +4 -4
  11. data/lib/virtualbox/attached_device.rb +23 -23
  12. data/lib/virtualbox/command.rb +9 -9
  13. data/lib/virtualbox/dvd.rb +7 -7
  14. data/lib/virtualbox/ext/subclass_listing.rb +1 -1
  15. data/lib/virtualbox/extra_data.rb +17 -17
  16. data/lib/virtualbox/forwarded_port.rb +23 -23
  17. data/lib/virtualbox/hard_drive.rb +27 -27
  18. data/lib/virtualbox/image.rb +25 -18
  19. data/lib/virtualbox/nic.rb +22 -22
  20. data/lib/virtualbox/proxies/collection.rb +4 -4
  21. data/lib/virtualbox/shared_folder.rb +25 -25
  22. data/lib/virtualbox/storage_controller.rb +16 -16
  23. data/lib/virtualbox/vm.rb +95 -42
  24. data/test/virtualbox/abstract_model/attributable_test.rb +28 -28
  25. data/test/virtualbox/abstract_model/dirty_test.rb +13 -13
  26. data/test/virtualbox/abstract_model/relatable_test.rb +36 -36
  27. data/test/virtualbox/abstract_model/validatable_test.rb +22 -22
  28. data/test/virtualbox/abstract_model_test.rb +46 -36
  29. data/test/virtualbox/attached_device_test.rb +47 -47
  30. data/test/virtualbox/command_test.rb +12 -12
  31. data/test/virtualbox/dvd_test.rb +15 -19
  32. data/test/virtualbox/ext/subclass_listing_test.rb +2 -2
  33. data/test/virtualbox/extra_data_test.rb +37 -37
  34. data/test/virtualbox/forwarded_port_test.rb +31 -31
  35. data/test/virtualbox/hard_drive_test.rb +40 -48
  36. data/test/virtualbox/image_test.rb +36 -33
  37. data/test/virtualbox/nic_test.rb +22 -22
  38. data/test/virtualbox/proxies/collection_test.rb +6 -6
  39. data/test/virtualbox/shared_folder_test.rb +36 -36
  40. data/test/virtualbox/storage_controller_test.rb +14 -14
  41. data/test/virtualbox/vm_test.rb +121 -70
  42. data/test/virtualbox_test.rb +19 -0
  43. data/virtualbox.gemspec +5 -3
  44. metadata +4 -2
@@ -0,0 +1,19 @@
1
+ require File.join(File.dirname(__FILE__), 'test_helper')
2
+
3
+ class VirtualBoxTest < Test::Unit::TestCase
4
+ setup do
5
+ VirtualBox::Command.stubs(:execute)
6
+ end
7
+
8
+ context "the version" do
9
+ should "return version" do
10
+ VirtualBox::Command.expects(:vboxmanage).with("-v").returns("ver").once
11
+ assert_equal "ver", VirtualBox.version
12
+ end
13
+
14
+ should "chomp the string" do
15
+ VirtualBox::Command.expects(:vboxmanage).with("-v").returns("ver \n\n").once
16
+ assert_equal "ver", VirtualBox.version
17
+ end
18
+ end
19
+ end
data/virtualbox.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{virtualbox}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mitchell Hashimoto"]
12
- s.date = %q{2010-01-30}
12
+ s.date = %q{2010-01-31}
13
13
  s.description = %q{Create and modify virtual machines in VirtualBox using pure ruby.}
14
14
  s.email = %q{mitchell.hashimoto@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -66,6 +66,7 @@ Gem::Specification.new do |s|
66
66
  "test/virtualbox/shared_folder_test.rb",
67
67
  "test/virtualbox/storage_controller_test.rb",
68
68
  "test/virtualbox/vm_test.rb",
69
+ "test/virtualbox_test.rb",
69
70
  "virtualbox.gemspec"
70
71
  ]
71
72
  s.homepage = %q{http://github.com/mitchellh/virtualbox}
@@ -92,7 +93,8 @@ Gem::Specification.new do |s|
92
93
  "test/virtualbox/proxies/collection_test.rb",
93
94
  "test/virtualbox/shared_folder_test.rb",
94
95
  "test/virtualbox/storage_controller_test.rb",
95
- "test/virtualbox/vm_test.rb"
96
+ "test/virtualbox/vm_test.rb",
97
+ "test/virtualbox_test.rb"
96
98
  ]
97
99
 
98
100
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtualbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Hashimoto
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-30 00:00:00 -08:00
12
+ date: 2010-01-31 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -72,6 +72,7 @@ files:
72
72
  - test/virtualbox/shared_folder_test.rb
73
73
  - test/virtualbox/storage_controller_test.rb
74
74
  - test/virtualbox/vm_test.rb
75
+ - test/virtualbox_test.rb
75
76
  - virtualbox.gemspec
76
77
  has_rdoc: true
77
78
  homepage: http://github.com/mitchellh/virtualbox
@@ -121,3 +122,4 @@ test_files:
121
122
  - test/virtualbox/shared_folder_test.rb
122
123
  - test/virtualbox/storage_controller_test.rb
123
124
  - test/virtualbox/vm_test.rb
125
+ - test/virtualbox_test.rb