chef-metal-lxc 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ad611e66ac9a796b8a0c125031d1cf32848a5ed
4
- data.tar.gz: 0cfc4b4906340f4d689d1ec647fa8882429a4eb9
3
+ metadata.gz: 99c02b50b618cb09fbab3b0dd350e97428669196
4
+ data.tar.gz: a4bfc8a2a18d5dc37b83397d414b8563cd6dfe5b
5
5
  SHA512:
6
- metadata.gz: 475be1de802665c6f8c963ff2694acd434fdbbe24709fa9f24cc2477a74aee4a50c1041eecca5e67f1fc13f8bcd7b508d9a4927f92cc0347234a7a6ecbc435f2
7
- data.tar.gz: d6fdd96c32aed28b57c37a74c107aa773b9718dace9c875f6729af72bddce4bf635acddb3eee1c6196ee0ab427ab488e0890c37ebe7d8809ba4be864c5fd0536
6
+ metadata.gz: 28e9b881dc2782e2061b70d55a5f97cb68734f57bee784a08110c4c40a05fca05730534ff8bd273cc9add141111e08084b310cdee055798a4ce8e78acb0c02e2
7
+ data.tar.gz: 0cff384fcab3645a5b2d86f9b16eddea3af5552273d8c209e0594b2d46726c45c90693f9ad6c5560582bcf1464e22f1c001c1b85281a9e0e92360c5a39adac53
@@ -11,9 +11,9 @@ module ChefMetalLXC
11
11
  class LXCTransport < ChefMetal::Transport
12
12
  @@active_transports = []
13
13
 
14
- class LXCExecuteResult < Struct.new(:stdout, :stderr, :exitstatus)
14
+ class LXCExecuteResult < Struct.new(:command, :options, :stdout, :stderr, :exitstatus)
15
15
  def error!
16
- raise "Error: code #{exitstatus}.\nSTDOUT:#{stdout}\nSTDERR:#{stderr}" if exitstatus != 0
16
+ raise "Error: '#{command}' failed with exit code #{exitstatus}.\nSTDOUT:#{stdout}\nSTDERR:#{stderr}" if exitstatus != 0
17
17
  end
18
18
  end
19
19
 
@@ -41,12 +41,13 @@ module ChefMetalLXC
41
41
  File.join(rootfs, path)
42
42
  end
43
43
 
44
- def execute(command)
44
+ def execute(command, options = {})
45
45
  Chef::Log.info("Executing #{command} on #{name}")
46
46
  container.execute do
47
47
  begin
48
+ # TODO support streaming (shell out needs work)
48
49
  out = shell_out(command)
49
- LXCExecuteResult.new(out.stdout,out.stderr, out.exitstatus)
50
+ LXCExecuteResult.new(command, options, out.stdout, out.stderr, out.exitstatus)
50
51
  rescue Exception => e
51
52
  LXCExecuteResult.new('', e.message, -1)
52
53
  end
@@ -1,3 +1,3 @@
1
1
  module ChefMetalLXC
2
- VERSION = '0.3'
2
+ VERSION = '0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-metal-lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ranjib Dey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-06 00:00:00.000000000 Z
11
+ date: 2014-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '0.5'
33
+ version: '0.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '0.5'
40
+ version: '0.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ruby-lxc
43
43
  requirement: !ruby/object:Gem::Requirement