lxc 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lxc/container.rb +7 -3
- data/lib/lxc/version.rb +1 -1
- metadata +3 -3
data/lib/lxc/container.rb
CHANGED
@@ -176,10 +176,14 @@ class LXC
|
|
176
176
|
# @param [Array] args Additional command-line arguments.
|
177
177
|
# @return [Symbol] Current state of the container.
|
178
178
|
def state(*args)
|
179
|
-
|
180
|
-
|
179
|
+
if self.exists?
|
180
|
+
result = self.info("--state", *args).collect{ |str| str.scan(REGEX_STATE) }
|
181
|
+
result.flatten!.compact!
|
181
182
|
|
182
|
-
|
183
|
+
(result.first.strip.downcase.to_sym rescue :unknown)
|
184
|
+
else
|
185
|
+
:not_created
|
186
|
+
end
|
183
187
|
end
|
184
188
|
|
185
189
|
# PID of the container
|
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.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
182
|
version: '0'
|
183
183
|
segments:
|
184
184
|
- 0
|
185
|
-
hash:
|
185
|
+
hash: 3311340983123551161
|
186
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
187
|
none: false
|
188
188
|
requirements:
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
segments:
|
193
193
|
- 0
|
194
|
-
hash:
|
194
|
+
hash: 3311340983123551161
|
195
195
|
requirements: []
|
196
196
|
rubyforge_project:
|
197
197
|
rubygems_version: 1.8.25
|