libvirt-ext 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +52 -0
- data/LICENSE.txt +165 -0
- data/README.md +19 -0
- data/Rakefile +46 -0
- data/VERSION +1 -0
- data/lib/libvirt-ext.rb +223 -0
- data/test/helper.rb +18 -0
- data/test/test_libvirt-ext.rb +7 -0
- metadata +171 -0
data/.document
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (3.2.12)
|
5
|
+
i18n (~> 0.6)
|
6
|
+
multi_json (~> 1.0)
|
7
|
+
bourne (1.1.2)
|
8
|
+
mocha (= 0.10.5)
|
9
|
+
enum (1.0.0)
|
10
|
+
git (1.2.5)
|
11
|
+
i18n (0.6.4)
|
12
|
+
jeweler (1.8.4)
|
13
|
+
bundler (~> 1.0)
|
14
|
+
git (>= 1.2.5)
|
15
|
+
rake
|
16
|
+
rdoc
|
17
|
+
json (1.7.7)
|
18
|
+
metaclass (0.0.1)
|
19
|
+
mocha (0.10.5)
|
20
|
+
metaclass (~> 0.0.1)
|
21
|
+
multi_json (1.6.1)
|
22
|
+
rake (10.0.3)
|
23
|
+
rdoc (4.0.0)
|
24
|
+
json (~> 1.4)
|
25
|
+
ruby-libvirt (0.4.0)
|
26
|
+
shoulda (3.3.2)
|
27
|
+
shoulda-context (~> 1.0.1)
|
28
|
+
shoulda-matchers (~> 1.4.1)
|
29
|
+
shoulda-context (1.0.2)
|
30
|
+
shoulda-matchers (1.4.2)
|
31
|
+
activesupport (>= 3.0.0)
|
32
|
+
bourne (~> 1.1.2)
|
33
|
+
simplecov (0.7.1)
|
34
|
+
multi_json (~> 1.0)
|
35
|
+
simplecov-html (~> 0.7.1)
|
36
|
+
simplecov-html (0.7.1)
|
37
|
+
uuidtools (2.1.3)
|
38
|
+
yard (0.8.5.2)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
bundler
|
45
|
+
enum
|
46
|
+
jeweler
|
47
|
+
rdoc
|
48
|
+
ruby-libvirt
|
49
|
+
shoulda
|
50
|
+
simplecov
|
51
|
+
uuidtools
|
52
|
+
yard
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
libvirt-ext
|
2
|
+
===========
|
3
|
+
|
4
|
+
Contributing to libvirt-ext
|
5
|
+
===========================
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
+
* Fork the project.
|
10
|
+
* Start a feature/bugfix branch.
|
11
|
+
* Commit and push until you are happy with your contribution.
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
Copyright
|
16
|
+
=========
|
17
|
+
|
18
|
+
Copyright (c) 2013 Denis Knauf. See LICENSE.txt for
|
19
|
+
further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "libvirt-ext"
|
18
|
+
gem.homepage = "http://github.com/DenisKnauf/libvirt-ext"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Extents ruby-libvirt with usefull functions}
|
21
|
+
gem.description = %Q{ruby-libvirt is only a mapped api and unrubish. libvirt-ext extents functionality to be more rubish.}
|
22
|
+
gem.email = "Denis.Knauf@gmail.com"
|
23
|
+
gem.authors = ["Denis Knauf"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
#require 'rcov/rcovtask'
|
36
|
+
#Rcov::RcovTask.new do |test|
|
37
|
+
#test.libs << 'test'
|
38
|
+
#test.pattern = 'test/**/test_*.rb'
|
39
|
+
#test.verbose = true
|
40
|
+
#test.rcov_opts << '--exclude "gems/*"'
|
41
|
+
#end
|
42
|
+
|
43
|
+
task :default => :test
|
44
|
+
|
45
|
+
require 'yard'
|
46
|
+
YARD::Rake::YardocTask.new
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0
|
data/lib/libvirt-ext.rb
ADDED
@@ -0,0 +1,223 @@
|
|
1
|
+
require 'libvirt'
|
2
|
+
require 'enum'
|
3
|
+
require 'uuidtools'
|
4
|
+
|
5
|
+
class Enum
|
6
|
+
class <<self
|
7
|
+
alias [] find
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
module Libvirt
|
12
|
+
class <<self
|
13
|
+
def ensure_close_if_block_given c
|
14
|
+
if block_given?
|
15
|
+
begin yield c
|
16
|
+
ensure c.close
|
17
|
+
end
|
18
|
+
else
|
19
|
+
c
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def connect uri = nil, &e
|
24
|
+
ensure_close_if_block_given open( uri), &e
|
25
|
+
end
|
26
|
+
|
27
|
+
def connect_read_only uri = nil, &e
|
28
|
+
ensure_close_if_block_given open_read_only( uri), &e
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class Connect
|
33
|
+
def each_active_domain
|
34
|
+
return Enumerator.new( self, __callee__) unless block_given?
|
35
|
+
list_domains.each {|id| yield lookup_domain_by_id( id) }
|
36
|
+
end
|
37
|
+
|
38
|
+
def each_inactive_domain
|
39
|
+
return Enumerator.new( self, __callee__) unless block_given?
|
40
|
+
list_defined_domains.each {|name| yield lookup_domain_by_name( name) }
|
41
|
+
end
|
42
|
+
|
43
|
+
def each_domain &e
|
44
|
+
return Enumerator.new( self, __callee__) unless block_given?
|
45
|
+
each_active_domain &e
|
46
|
+
each_inactive_domain &e
|
47
|
+
end
|
48
|
+
|
49
|
+
def active_domains() each_active_domain.to_a end
|
50
|
+
def inactive_domains() each_inactive_domain.to_a end
|
51
|
+
def domains() each_domain.to_a end
|
52
|
+
def lookup_domain id_uuid_or_name
|
53
|
+
case id_uuid_or_name
|
54
|
+
when UUIDTools::UUID then lookup_domain_by_uuid id_uuid_or_name.to_s
|
55
|
+
when Numeric then lookup_domain_by_id id_uuid_or_name
|
56
|
+
when String
|
57
|
+
begin UUIDTools::UUID.parse id_uuid_or_name
|
58
|
+
rescue Object
|
59
|
+
if id_uuid_or_name == id_uuid_or_name.to_i.to_s
|
60
|
+
lookup_domain_by_id id_uuid_or_name
|
61
|
+
else
|
62
|
+
lookup_domain_by_name id_uuid_or_name
|
63
|
+
end
|
64
|
+
end
|
65
|
+
else raise ArgumentError, "UUID or domain name expected."
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def inspect
|
70
|
+
"#<#{self.class.name} #{uri}>"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
class Domain
|
75
|
+
class CloseReason < Enum
|
76
|
+
enum_fields :comment
|
77
|
+
start_at 0
|
78
|
+
enum do
|
79
|
+
Error 'Misc I/O Error'
|
80
|
+
EOF 'End-of-file from server'
|
81
|
+
KeepAlive 'Keepalive timer triggered'
|
82
|
+
Client 'Client requested it'
|
83
|
+
Last '--'
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
class BlockedReason < Enum
|
88
|
+
enum_fields :comment
|
89
|
+
start_at 0
|
90
|
+
enum do
|
91
|
+
Unkown 'the reason is unknown'
|
92
|
+
Last '--'
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
class CrashedReason < Enum
|
97
|
+
enum_fields :comment
|
98
|
+
start_at 0
|
99
|
+
enum do
|
100
|
+
Unkown 'the reason is unknown'
|
101
|
+
Last '--'
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
class NostateReason < Enum
|
106
|
+
enum_fields :comment
|
107
|
+
start_at 0
|
108
|
+
enum do
|
109
|
+
Unkown 'the reason is unknown'
|
110
|
+
Last '--'
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
class PMSuspendedReason < Enum
|
115
|
+
enum_fields :comment
|
116
|
+
start_at 0
|
117
|
+
enum do
|
118
|
+
Unkown 'the reason is unknown'
|
119
|
+
Last '--'
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
class PMSuspendedDiskReason < Enum
|
124
|
+
enum_fields :comment
|
125
|
+
start_at 0
|
126
|
+
enum do
|
127
|
+
Unkown 'the reason is unknown'
|
128
|
+
Last '--'
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
class PausedReason < Enum
|
133
|
+
enum_fields :comment
|
134
|
+
start_at 0
|
135
|
+
enum do
|
136
|
+
Unkown 'the reason is unknown'
|
137
|
+
User 'paused on user request'
|
138
|
+
Migration 'paused for offline migration'
|
139
|
+
Save 'paused for save'
|
140
|
+
Dump 'paused for offline core dump'
|
141
|
+
IOError 'paused due to a disk I/O error'
|
142
|
+
Watchdog 'paused due to a watchdog event'
|
143
|
+
FromSnapshot 'paused after restoring from snapshot'
|
144
|
+
ShuttingDown 'paused during shutdown process'
|
145
|
+
Snapshot 'paused while creating a snapshot'
|
146
|
+
Last '--'
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
class RunningReason < Enum
|
151
|
+
enum_fields :comment
|
152
|
+
start_at 0
|
153
|
+
enum do
|
154
|
+
Unknown 'the reason is unknown'
|
155
|
+
Booted 'normal startup from boot'
|
156
|
+
Migrated 'migrated from another host'
|
157
|
+
Restored 'restored from a state file'
|
158
|
+
FromSnapshot 'restored from snapshot'
|
159
|
+
Unpaused 'returned from paused state'
|
160
|
+
MigrationCanceled 'returned from migration'
|
161
|
+
SaveCaneled 'returned from failed save process'
|
162
|
+
Wakeup 'returned from pmsuspended due to wakeup event'
|
163
|
+
Last '--'
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
class ShutdownReason < Enum
|
168
|
+
enum_fields :comment
|
169
|
+
start_at 0
|
170
|
+
enum do
|
171
|
+
Unkown 'the reason is unknown'
|
172
|
+
User 'shutting down on user request'
|
173
|
+
Last '--'
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
class ShutoffReason < Enum
|
178
|
+
enum_fields :comment
|
179
|
+
start_at 0
|
180
|
+
enum do
|
181
|
+
Unkown 'the reason is unknown'
|
182
|
+
Shutdown 'normal shutdown'
|
183
|
+
Destroyed 'forced poweroff'
|
184
|
+
Crashed 'domain crashed'
|
185
|
+
Migrated 'migrated to another host'
|
186
|
+
Saved 'saved to a file'
|
187
|
+
Failed 'domain failed to start'
|
188
|
+
FromSnapshot 'restoed from a snapshot which was taken while domain was shutoff'
|
189
|
+
Last '--'
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
class State < Enum
|
194
|
+
enum_fields :commend, :reasons
|
195
|
+
start_at 0
|
196
|
+
enum do
|
197
|
+
Nostate 'no state', NostateReason
|
198
|
+
Running 'the domain is running', RunningReason
|
199
|
+
Blocked 'the domain is blocked on resource', BlockedReason
|
200
|
+
Paused 'the domain is paused by user', PausedReason
|
201
|
+
Shutdown 'the domain is being shut down', ShutdownReason
|
202
|
+
Shutoff 'the domain is shut off', ShutoffReason
|
203
|
+
Crashed 'the domain is crashed', CrashedReason
|
204
|
+
PMSuspended 'the domain is suspended by guest power management', PMSuspendedReason
|
205
|
+
Last '--'
|
206
|
+
end
|
207
|
+
|
208
|
+
def self.[] *s
|
209
|
+
state, reason = s.flatten
|
210
|
+
state = find state
|
211
|
+
if reason
|
212
|
+
[state, state.reasons.find( reason)]
|
213
|
+
else state
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
def inspect
|
219
|
+
state, reason = State[self.state]
|
220
|
+
"#<#{self.class.name}: #{uuid} #{name} #{state.title}[#{reason.title}]>"
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'libvirt-ext'
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: libvirt-ext
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Denis Knauf
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-16 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: ruby-libvirt
|
16
|
+
requirement: &70347300 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70347300
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: enum
|
27
|
+
requirement: &70347000 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70347000
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: uuidtools
|
38
|
+
requirement: &70346740 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70346740
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: shoulda
|
49
|
+
requirement: &70346450 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70346450
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: yard
|
60
|
+
requirement: &70346080 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70346080
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: &70345670 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70345670
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: rdoc
|
82
|
+
requirement: &70345260 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70345260
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: bundler
|
93
|
+
requirement: &70345010 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *70345010
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: jeweler
|
104
|
+
requirement: &70344700 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: *70344700
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: simplecov
|
115
|
+
requirement: &70344390 !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - ! '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
type: :development
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: *70344390
|
124
|
+
description: ruby-libvirt is only a mapped api and unrubish. libvirt-ext extents functionality
|
125
|
+
to be more rubish.
|
126
|
+
email: Denis.Knauf@gmail.com
|
127
|
+
executables: []
|
128
|
+
extensions: []
|
129
|
+
extra_rdoc_files:
|
130
|
+
- LICENSE.txt
|
131
|
+
- README.md
|
132
|
+
files:
|
133
|
+
- .document
|
134
|
+
- Gemfile
|
135
|
+
- Gemfile.lock
|
136
|
+
- LICENSE.txt
|
137
|
+
- README.md
|
138
|
+
- Rakefile
|
139
|
+
- VERSION
|
140
|
+
- lib/libvirt-ext.rb
|
141
|
+
- test/helper.rb
|
142
|
+
- test/test_libvirt-ext.rb
|
143
|
+
homepage: http://github.com/DenisKnauf/libvirt-ext
|
144
|
+
licenses:
|
145
|
+
- MIT
|
146
|
+
post_install_message:
|
147
|
+
rdoc_options: []
|
148
|
+
require_paths:
|
149
|
+
- lib
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
152
|
+
requirements:
|
153
|
+
- - ! '>='
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
segments:
|
157
|
+
- 0
|
158
|
+
hash: 760051597
|
159
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
|
+
none: false
|
161
|
+
requirements:
|
162
|
+
- - ! '>='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
requirements: []
|
166
|
+
rubyforge_project:
|
167
|
+
rubygems_version: 1.8.11
|
168
|
+
signing_key:
|
169
|
+
specification_version: 3
|
170
|
+
summary: Extents ruby-libvirt with usefull functions
|
171
|
+
test_files: []
|