chef-lxc 0.1.2 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ba99730c548bcf0e27a3131a9c4ccd53f49ddcf
4
- data.tar.gz: 13952edcce410d0c0999515a6bb89a786aff0cea
3
+ metadata.gz: 82d501f875d1abf562a893e4f3b4534fc612e304
4
+ data.tar.gz: 8d8d6bb519022d075cd5fcc0cfcd2c0930539ae0
5
5
  SHA512:
6
- metadata.gz: a506cbb2277209230a1fcdef0b1149aea9f1d827f8f8e7f3268562dfaaef454115513d60e2e1d69885190f9215e027bac6155f9399476581042942f9364e994f
7
- data.tar.gz: dab1929786fd6efbd9df24d08943fbc9d58715b838678b994b5cdc32ef1231807122fc2eb8c0044fad2a58950f0827873e43c1e0723eea202218dae2c4efb030
6
+ metadata.gz: 94b0b095341452c57c043b25e8c638805dc95696b4b3f6a5e04e870d81354c361f1a2f6bd9c9f4b2251a449152d641caa2c8cb019872df936ec5647847fc7b26
7
+ data.tar.gz: 0bd86128c42f08920d6b8c01fd97a41a3b71fd18c89b17bffe8a6dcc479005820cbd1e7df10efc9c49fe58fad2ac4d2dbfb68b3463fb4882c1ac35097c3c9112
@@ -11,16 +11,22 @@ class Chef
11
11
  recipe_in_container(self, recipe_content, &block)
12
12
  end
13
13
 
14
- def command(command, opts = {})
14
+ def command(cmd, opts = {})
15
15
  live_stream = opts[:live_stream] || $stdout
16
16
  out = execute(wait: true) do
17
- cmd = Mixlib::ShellOut.new(command)
17
+ cmd = Mixlib::ShellOut.new(cmd)
18
18
  cmd.live_stream = live_stream
19
19
  cmd.run_command
20
20
  cmd.exitstatus
21
21
  end
22
22
  out
23
23
  end
24
+
25
+ def command!(cmd, opts = {})
26
+ exitstatus = command(cmd, opts)
27
+ raise "Failed to execute: '#{cmd}'.\nExit code: #{exitstatus}" unless exitstatus.zero?
28
+ exitstatus
29
+ end
24
30
  end
25
31
  end
26
32
  end
@@ -1,5 +1,5 @@
1
1
  class Chef
2
2
  module LXC
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ranjib Dey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-10 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef