virtualbox 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/virtualbox/com/implementer/mscom.rb +10 -5
- data/lib/virtualbox/network_adapter.rb +9 -0
- data/lib/virtualbox/version.rb +1 -1
- metadata +26 -15
@@ -59,11 +59,16 @@ module VirtualBox
|
|
59
59
|
value = nil
|
60
60
|
begin
|
61
61
|
value = @object.send(COM::FFI::Util.camelize(name.to_s), *args)
|
62
|
-
rescue
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
62
|
+
rescue Exception => e
|
63
|
+
if jruby_exception && e.instance_of?(jruby_exception)
|
64
|
+
# JRuby exception is screwed up. We just throw a generic
|
65
|
+
# COMException and call it good.
|
66
|
+
raise Exceptions::COMException.new(:function => name,
|
67
|
+
:result_code => 0)
|
68
|
+
else
|
69
|
+
# Reraise the exception since we're not interested in it
|
70
|
+
raise
|
71
|
+
end
|
67
72
|
end
|
68
73
|
|
69
74
|
# TODO: Multiple return values
|
@@ -58,6 +58,7 @@ module VirtualBox
|
|
58
58
|
attribute :nat_network
|
59
59
|
attribute :internal_network
|
60
60
|
attribute :host_only_interface
|
61
|
+
attribute :bridged_interface
|
61
62
|
attribute :interface, :readonly => true, :property => false
|
62
63
|
relationship :nat_driver, :NATEngine, :lazy => true
|
63
64
|
|
@@ -130,6 +131,14 @@ module VirtualBox
|
|
130
131
|
end
|
131
132
|
end
|
132
133
|
|
134
|
+
# Gets the bridged interface object associated with the class if it
|
135
|
+
# exists.
|
136
|
+
def bridged_interface_object
|
137
|
+
VirtualBox::Global.global.host.network_interfaces.find do |ni|
|
138
|
+
ni.name == bridged_interface
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
133
142
|
# Save a network adapter.
|
134
143
|
def save
|
135
144
|
modify_adapter do |adapter|
|
data/lib/virtualbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: virtualbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 63
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
9
|
+
- 2
|
10
|
+
version: 0.9.2
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Mitchell Hashimoto
|
@@ -14,65 +15,72 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2011-
|
18
|
-
default_executable:
|
18
|
+
date: 2011-08-28 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
|
+
none: false
|
22
23
|
requirements:
|
23
24
|
- - ~>
|
24
25
|
- !ruby/object:Gem::Version
|
26
|
+
hash: 5
|
25
27
|
segments:
|
26
28
|
- 1
|
27
29
|
- 0
|
28
30
|
- 9
|
29
31
|
version: 1.0.9
|
30
|
-
requirement: *id001
|
31
32
|
name: ffi
|
32
|
-
prerelease: false
|
33
33
|
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
requirement: *id001
|
34
36
|
- !ruby/object:Gem::Dependency
|
35
37
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
36
39
|
requirements:
|
37
40
|
- - ~>
|
38
41
|
- !ruby/object:Gem::Version
|
42
|
+
hash: 31
|
39
43
|
segments:
|
40
44
|
- 0
|
41
45
|
- 1
|
42
46
|
- 2
|
43
47
|
version: 0.1.2
|
44
|
-
requirement: *id002
|
45
48
|
name: contest
|
46
|
-
prerelease: false
|
47
49
|
type: :development
|
50
|
+
prerelease: false
|
51
|
+
requirement: *id002
|
48
52
|
- !ruby/object:Gem::Dependency
|
49
53
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
50
55
|
requirements:
|
51
56
|
- - ~>
|
52
57
|
- !ruby/object:Gem::Version
|
58
|
+
hash: 43
|
53
59
|
segments:
|
54
60
|
- 0
|
55
61
|
- 9
|
56
62
|
- 8
|
57
63
|
version: 0.9.8
|
58
|
-
requirement: *id003
|
59
64
|
name: mocha
|
60
|
-
prerelease: false
|
61
65
|
type: :development
|
66
|
+
prerelease: false
|
67
|
+
requirement: *id003
|
62
68
|
- !ruby/object:Gem::Dependency
|
63
69
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
64
71
|
requirements:
|
65
72
|
- - ~>
|
66
73
|
- !ruby/object:Gem::Version
|
74
|
+
hash: 63
|
67
75
|
segments:
|
68
76
|
- 0
|
69
77
|
- 9
|
70
78
|
- 2
|
71
79
|
version: 0.9.2
|
72
|
-
requirement: *id004
|
73
80
|
name: rake
|
74
|
-
prerelease: false
|
75
81
|
type: :development
|
82
|
+
prerelease: false
|
83
|
+
requirement: *id004
|
76
84
|
description: Create and modify virtual machines in VirtualBox using pure ruby
|
77
85
|
email:
|
78
86
|
- mitchell.hashimoto@gmail.com
|
@@ -407,7 +415,6 @@ files:
|
|
407
415
|
- test/virtualbox/vrde_server_test.rb
|
408
416
|
- test/virtualbox_test.rb
|
409
417
|
- virtualbox.gemspec
|
410
|
-
has_rdoc: true
|
411
418
|
homepage: http://github.com/mitchellh/virtualbox
|
412
419
|
licenses: []
|
413
420
|
|
@@ -417,16 +424,20 @@ rdoc_options: []
|
|
417
424
|
require_paths:
|
418
425
|
- lib
|
419
426
|
required_ruby_version: !ruby/object:Gem::Requirement
|
427
|
+
none: false
|
420
428
|
requirements:
|
421
429
|
- - ">="
|
422
430
|
- !ruby/object:Gem::Version
|
431
|
+
hash: 3
|
423
432
|
segments:
|
424
433
|
- 0
|
425
434
|
version: "0"
|
426
435
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
436
|
+
none: false
|
427
437
|
requirements:
|
428
438
|
- - ">="
|
429
439
|
- !ruby/object:Gem::Version
|
440
|
+
hash: 23
|
430
441
|
segments:
|
431
442
|
- 1
|
432
443
|
- 3
|
@@ -435,7 +446,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
435
446
|
requirements: []
|
436
447
|
|
437
448
|
rubyforge_project: virtualbox
|
438
|
-
rubygems_version: 1.
|
449
|
+
rubygems_version: 1.8.6
|
439
450
|
signing_key:
|
440
451
|
specification_version: 3
|
441
452
|
summary: Create and modify virtual machines in VirtualBox using pure ruby
|