lxc 0.4.1 → 0.5.0
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.
- data/lib/lxc.rb +14 -0
- data/lib/lxc/version.rb +1 -1
- metadata +7 -1
data/lib/lxc.rb
CHANGED
@@ -127,6 +127,20 @@ class LXC
|
|
127
127
|
ZTK::ANSI.uncolor(self.exec("lxc-checkconfig", *args)).split("\n")
|
128
128
|
end
|
129
129
|
|
130
|
+
# Linux containers installed?
|
131
|
+
#
|
132
|
+
# Checks the output of "lxc-checkconfig" to see if it returns a
|
133
|
+
# 'command not found' error.
|
134
|
+
#
|
135
|
+
# @return [Boolean] True if LXC is installed; false otherwise.
|
136
|
+
def installed?
|
137
|
+
if !!(self.checkconfig.join =~ /command not found/)
|
138
|
+
false
|
139
|
+
else
|
140
|
+
true
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
130
144
|
# Linux container command execution wrapper
|
131
145
|
#
|
132
146
|
# Runs the supplied LXC command. The first element in the "args" splat is the
|
data/lib/lxc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lxc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -217,12 +217,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
217
|
- - ! '>='
|
218
218
|
- !ruby/object:Gem::Version
|
219
219
|
version: '0'
|
220
|
+
segments:
|
221
|
+
- 0
|
222
|
+
hash: 2956744155980302345
|
220
223
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
224
|
none: false
|
222
225
|
requirements:
|
223
226
|
- - ! '>='
|
224
227
|
- !ruby/object:Gem::Version
|
225
228
|
version: '0'
|
229
|
+
segments:
|
230
|
+
- 0
|
231
|
+
hash: 2956744155980302345
|
226
232
|
requirements: []
|
227
233
|
rubyforge_project:
|
228
234
|
rubygems_version: 1.8.25
|