lxc 0.4.0 → 0.4.1

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.
Files changed (3) hide show
  1. data/lib/lxc/version.rb +1 -1
  2. data/lib/lxc.rb +5 -4
  3. metadata +2 -8
data/lib/lxc/version.rb CHANGED
@@ -2,7 +2,7 @@ class LXC
2
2
 
3
3
  unless const_defined?(:VERSION)
4
4
  # LXC Gem Version
5
- VERSION = "0.4.0"
5
+ VERSION = "0.4.1"
6
6
  end
7
7
 
8
8
  end
data/lib/lxc.rb CHANGED
@@ -108,12 +108,13 @@ class LXC
108
108
  # Runs the "lxc-version" command.
109
109
  #
110
110
  # @param [Array] args Additional command-line arguments.
111
- # @return [String] The installed version of LXC.
111
+ # @return [String] The installed version of LXC. Returns nil if lxc-version
112
+ # is not found.
112
113
  def version(*args)
113
- result = self.exec("lxc-version", *args).scan(REGEX_VERSION)
114
- result.flatten!.compact!
115
-
114
+ result = self.exec("lxc-version", *args).scan(REGEX_VERSION).flatten.compact
116
115
  result.first.strip
116
+ rescue
117
+ nil
117
118
  end
118
119
 
119
120
  # Linux container configuration check
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.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-02 00:00:00.000000000 Z
12
+ date: 2013-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ztk
@@ -217,18 +217,12 @@ 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: 3922610314625450617
223
220
  required_rubygems_version: !ruby/object:Gem::Requirement
224
221
  none: false
225
222
  requirements:
226
223
  - - ! '>='
227
224
  - !ruby/object:Gem::Version
228
225
  version: '0'
229
- segments:
230
- - 0
231
- hash: 3922610314625450617
232
226
  requirements: []
233
227
  rubyforge_project:
234
228
  rubygems_version: 1.8.25