cangallo 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/canga +9 -0
- data/lib/cangallo.rb +1 -0
- data/lib/cangallo/qcow2.rb +21 -1
- data/lib/cangallo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f28a4e56d37526b9211c6c841b8557d2dad1577
|
4
|
+
data.tar.gz: a1ed9b9e4f6bc3bb415b60dd0581dbc0774e29fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19682de08a165a693215ce92a4df771aecd778cfcb84caddbdc35a285ac5c951d9cea29eef68e630e21be13d61c3bb27db33af184494687eb222cb2710b27e08
|
7
|
+
data.tar.gz: 845149b932fb7dee71080ea2c3232959ab539b728f869ac2a58209d747d55defbaddde76b0fb2f8e985d1dcfcd57f100b86fe25b5ccc7abdc9af80b70d58fd9f
|
data/bin/canga
CHANGED
@@ -300,6 +300,15 @@ class Canga < Thor
|
|
300
300
|
|
301
301
|
repository.write_index
|
302
302
|
end
|
303
|
+
|
304
|
+
desc "check_system", "check system configuration"
|
305
|
+
def check_system
|
306
|
+
check = Cangallo::Check.new
|
307
|
+
|
308
|
+
rc = check.check
|
309
|
+
|
310
|
+
exit(-1) if rc
|
311
|
+
end
|
303
312
|
end
|
304
313
|
|
305
314
|
Canga.start(ARGV)
|
data/lib/cangallo.rb
CHANGED
data/lib/cangallo/qcow2.rb
CHANGED
@@ -25,6 +25,26 @@ class Cangallo
|
|
25
25
|
class Qcow2
|
26
26
|
attr_reader :path
|
27
27
|
|
28
|
+
def self.qemu_img=(path)
|
29
|
+
@@qemu_img = path
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.qemu_img
|
33
|
+
@@qemu_img ||= "qemu-img"
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.qemu_img_version
|
37
|
+
text = execute("--version")
|
38
|
+
|
39
|
+
m = text.match(/^qemu-img version (\d+\.\d+\.\d+),/)
|
40
|
+
|
41
|
+
if m
|
42
|
+
m[1]
|
43
|
+
else
|
44
|
+
nil
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
28
48
|
def initialize(path=nil)
|
29
49
|
@path=path
|
30
50
|
end
|
@@ -119,7 +139,7 @@ class Cangallo
|
|
119
139
|
end
|
120
140
|
|
121
141
|
def self.execute(command, *params)
|
122
|
-
command = "
|
142
|
+
command = "#{qemu_img} #{command} #{params.join(' ')}"
|
123
143
|
STDERR.puts command
|
124
144
|
|
125
145
|
status, stdout, stderr = systemu command
|
data/lib/cangallo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cangallo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Fontan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.5.
|
77
|
+
rubygems_version: 2.5.2
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Cangallo!!
|