lxc 0.0.6 → 0.0.7

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 (34) hide show
  1. data/.coveralls.yml +1 -0
  2. data/.gitignore +0 -1
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +1 -6
  6. data/Gemfile +2 -1
  7. data/README.md +1 -0
  8. data/Rakefile +5 -12
  9. data/lib/lxc.rb +23 -8
  10. data/lib/lxc/config.rb +157 -0
  11. data/lib/lxc/container.rb +10 -1
  12. data/lib/lxc/version.rb +1 -1
  13. data/lxc.gemspec +20 -3
  14. data/spec/lxc/container_spec.rb +81 -4
  15. data/spec/spec_helper.rb +3 -24
  16. data/spec/{fixtures → support/fixtures}/0.7.5/lxc-checkconfig.out +0 -0
  17. data/spec/{fixtures → support/fixtures}/0.7.5/lxc-info-pid-stopped.out +0 -0
  18. data/spec/{fixtures → support/fixtures}/0.7.5/lxc-info-state-stopped.out +0 -0
  19. data/spec/{fixtures → support/fixtures}/0.7.5/lxc-ls-w-containers.out +0 -0
  20. data/spec/{fixtures → support/fixtures}/0.7.5/lxc-ls-wo-containers.out +0 -0
  21. data/spec/{fixtures → support/fixtures}/0.7.5/lxc-ps.out +0 -0
  22. data/spec/{fixtures → support/fixtures}/0.7.5/lxc-version.out +0 -0
  23. data/spec/{fixtures → support/fixtures}/0.7.5/lxc-wait.out +0 -0
  24. data/spec/{fixtures → support/fixtures}/0.8.0-rc2/lxc-checkconfig.out +0 -0
  25. data/spec/{fixtures → support/fixtures}/0.8.0-rc2/lxc-info-pid-stopped.out +0 -0
  26. data/spec/{fixtures → support/fixtures}/0.8.0-rc2/lxc-info-state-stopped.out +0 -0
  27. data/spec/{fixtures → support/fixtures}/0.8.0-rc2/lxc-ls-w-containers.out +0 -0
  28. data/spec/{fixtures → support/fixtures}/0.8.0-rc2/lxc-ls-wo-containers.out +0 -0
  29. data/spec/{fixtures → support/fixtures}/0.8.0-rc2/lxc-ps.out +0 -0
  30. data/spec/{fixtures → support/fixtures}/0.8.0-rc2/lxc-version.out +0 -0
  31. data/spec/{fixtures → support/fixtures}/0.8.0-rc2/lxc-wait.out +0 -0
  32. data/spec/support/install-lxc.sh +8 -0
  33. metadata +147 -123
  34. data/.rvmrc.template +0 -1
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore CHANGED
@@ -16,4 +16,3 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  *log
19
- .rvmrc
@@ -0,0 +1 @@
1
+ lxc
@@ -0,0 +1 @@
1
+ ruby-1.9.3
@@ -5,12 +5,7 @@ rvm:
5
5
  - 1.9.3
6
6
  - 2.0.0
7
7
 
8
- before_install:
9
- - sudo apt-get -qq -y --force-yes update
10
-
11
- bundler_args: --binstubs
12
-
13
- script: "bin/rake test"
8
+ before_install: sudo ./spec/support/install-lxc.sh
14
9
 
15
10
  notifications:
16
11
  irc: "irc.freenode.net#jovelabs"
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in lxc.gemspec
3
+ gem 'coveralls', :require => false
4
+
4
5
  gemspec
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/lxc.png)](http://badge.fury.io/rb/lxc)
2
2
  [![Dependency Status](https://gemnasium.com/zpatten/lxc.png)](https://gemnasium.com/zpatten/lxc)
3
3
  [![Build Status](https://secure.travis-ci.org/zpatten/lxc.png)](http://travis-ci.org/zpatten/lxc)
4
+ [![Coverage Status](https://coveralls.io/repos/zpatten/lxc/badge.png?branch=master)](https://coveralls.io/r/zpatten/lxc)
4
5
  [![Code Climate](https://codeclimate.com/github/zpatten/lxc.png)](https://codeclimate.com/github/zpatten/lxc)
5
6
 
6
7
  # LXC
data/Rakefile CHANGED
@@ -24,21 +24,14 @@ require 'bundler/gem_tasks'
24
24
 
25
25
  require 'rspec/core/rake_task'
26
26
  RSpec::Core::RakeTask.new(:spec)
27
- task :default => :spec
28
- task :test => :spec
27
+ task :default => [:spec]
28
+ task :test => [:spec]
29
29
 
30
30
  ################################################################################
31
31
 
32
- desc "Run RSpec with code coverage"
33
- task :coverage do
34
- `rake spec COVERAGE=true`
35
- case RUBY_PLATFORM
36
- when /darwin/
37
- `open coverage/index.html`
38
- when /linux/
39
- `google-chrome coverage/index.html`
40
- end
41
- end
32
+ require 'coveralls/rake/task'
33
+ Coveralls::RakeTask.new
34
+ task :coveralls => [:spec, 'coveralls:push']
42
35
 
43
36
  ################################################################################
44
37
 
data/lib/lxc.rb CHANGED
@@ -8,8 +8,9 @@ require 'lxc/version'
8
8
  class LXC
9
9
 
10
10
  # Top-Level Error Class
11
- class Error < StandardError; end
11
+ class LXCError < StandardError; end
12
12
 
13
+ autoload :Config, 'lxc/config'
13
14
  autoload :Container, 'lxc/container'
14
15
 
15
16
  # Controls if sudo is prefixed on all executed commands.
@@ -50,9 +51,19 @@ class LXC
50
51
  # @see http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed CommandLineFu - Remove Color Codes (Special Characters) with SED
51
52
  SED_REMOVE_ANSI = %q(sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g")
52
53
 
53
- def initialize
54
- @use_sudo = false
55
- @use_ssh = nil
54
+ def initialize(options={})
55
+ @ui = (options[:ui] || ZTK::UI.new)
56
+ @use_sudo = (options[:use_sudo] || false)
57
+ @use_ssh = (options[:use_ssh] || nil)
58
+ end
59
+
60
+ # LXC configuration class
61
+ #
62
+ # Gets the LXC configuration class object
63
+ #
64
+ # @return [LXC::Config] Returns the LXC configuration object.
65
+ def config
66
+ @config ||= LXC::Config.new(self, "/etc/lxc/lxc.conf")
56
67
  end
57
68
 
58
69
  # Initialize container object
@@ -85,7 +96,7 @@ class LXC
85
96
  # @param [Array] args Additional command-line arguments.
86
97
  # @return [Array<String>] A list of container names.
87
98
  def ls(*args)
88
- self.exec("lxc-ls", *args).split("\n").uniq
99
+ self.exec("lxc-ls", *args).split("\n").join(' ').split.uniq
89
100
  end
90
101
 
91
102
  # Check if a container exists
@@ -163,10 +174,14 @@ class LXC
163
174
  end
164
175
  end
165
176
  else
166
- if @use_ssh.respond_to?(:exec!)
167
- output << @use_ssh.exec!(arguments)
177
+ if @use_ssh.is_a?(ZTK::SSH)
178
+ output << @use_ssh.exec(arguments, :silence => true, :ignore_exit_status => true).output
168
179
  else
169
- raise Error, "The object you assigned to use_ssh does not respond to #exec!"
180
+ if @use_ssh.respond_to?(:exec!)
181
+ output << @use_ssh.exec!(arguments)
182
+ else
183
+ raise LXCError, "The object you assigned to use_ssh does not respond to #exec!"
184
+ end
170
185
  end
171
186
  end
172
187
 
@@ -0,0 +1,157 @@
1
+ class LXC
2
+
3
+ # Config Error Class
4
+ class ConfigError < LXCError; end
5
+
6
+ # Main Config Class
7
+ #
8
+ # @author Zachary Patten <zachary@jovelabs.net>
9
+ class Config
10
+
11
+ attr_accessor :networks
12
+
13
+ def initialize(lxc, filename)
14
+ raise ConfigError, "You must supply a LXC object!" if lxc.nil?
15
+ raise ConfigError, "You must supply a configuration filename!" if filename.nil?
16
+
17
+ @lxc = lxc
18
+ @filename = filename
19
+
20
+ self.clear
21
+ end
22
+
23
+ # Loads the specified LXC configuration
24
+ #
25
+ # Loads the filename specified at instantiation and converts it to an
26
+ # internal hash so that we can manipulate it easier.
27
+ #
28
+ # @return [Hash] LXC configuration hash.
29
+ def load
30
+ parse_config(@lxc.exec("cat #{@filename} 2>/dev/null"))
31
+ end
32
+
33
+ # Saves the specified LXC configuration
34
+ #
35
+ # Saves the internal hash out to an LXC configuration file.
36
+ #
37
+ # @return [Hash] LXC configuration hash.
38
+ def save
39
+ use_sudo = (@lxc.use_sudo ? 'sudo ' : nil)
40
+
41
+ script = Array.new
42
+ script << "cat <<EOF | #{use_sudo}tee #{@filename}"
43
+ script << build_config
44
+ script << "EOF"
45
+ script = script.join("\n")
46
+
47
+ @lxc.exec(script)
48
+ end
49
+
50
+ # Clear configuration
51
+ #
52
+ # Clears out the current configuration, leaving an empty configuration
53
+ # behind
54
+ #
55
+ # @return [Hash] LXC configuration hash.
56
+ def clear
57
+ @config = Hash.new
58
+ @networks = Array.new
59
+
60
+ true
61
+ end
62
+
63
+ # Configuration keys
64
+ #
65
+ # Returns all of the configuration keys
66
+ #
67
+ # @return [Array] An array of the current configurations keys.
68
+ def keys
69
+ @config.keys
70
+ end
71
+
72
+ # Configuration Values
73
+ #
74
+ # Returns all of the configuration values
75
+ #
76
+ # @return [Array] An array of the current configurations values.
77
+ def values
78
+ @config.values
79
+ end
80
+
81
+ # Configuration Key/Value Assignment
82
+ #
83
+ # Allows setting the internal hash values.
84
+ def []=(key, value)
85
+ @config.merge!(key => [value]) { |k,o,n| k = (o + n) }
86
+ end
87
+
88
+ # Configuration Key/Value Query
89
+ #
90
+ # Allows getting the internal hash value for an internal hash key.
91
+ def [](key)
92
+ @config[key]
93
+ end
94
+
95
+ # Provides a concise string representation of the class
96
+ # @return [String]
97
+ def inspect
98
+ @config.inspect
99
+ end
100
+
101
+ private
102
+
103
+ def build_values(key, value)
104
+ content = Array.new
105
+
106
+ if value.is_a?(Array)
107
+ value.each do |v|
108
+ content << "#{key} = #{v}"
109
+ end
110
+ else
111
+ content << "#{key} = #{value}"
112
+ end
113
+
114
+ content
115
+ end
116
+
117
+ def build_config
118
+ content = Array.new
119
+ @config.each do |key, value|
120
+ content << build_values(key, value)
121
+ end
122
+ @networks.each do |network|
123
+ network.each do |key, value|
124
+ content << build_values(key, value)
125
+ end
126
+ end
127
+ content.join("\n")
128
+ end
129
+
130
+ def parse_config(content)
131
+ @config = Hash.new
132
+ @networks = Array.new
133
+ network = nil
134
+
135
+ content.split("\n").map(&:strip).each do |line|
136
+ key, value = line.split('=').map(&:strip)
137
+ if key =~ /network/
138
+ if key =~ /network.type/
139
+ # this is a new network object
140
+ @networks << network
141
+ network = Hash.new
142
+ else
143
+ # add to previous network object
144
+ end
145
+ network.merge!(key => [value]) { |k,o,n| k = (o + n) }
146
+ else
147
+ @config.merge!(key => [value]) { |k,o,n| k = (o + n) }
148
+ end
149
+ end
150
+ @networks << network
151
+ @networks.compact!
152
+
153
+ true
154
+ end
155
+
156
+ end
157
+ end
@@ -3,7 +3,7 @@ require 'timeout'
3
3
  class LXC
4
4
 
5
5
  # Container Error Class
6
- class ContainerError < Error; end
6
+ class ContainerError < LXCError; end
7
7
 
8
8
  # Main Container Class
9
9
  #
@@ -72,6 +72,15 @@ class LXC
72
72
  @name = name
73
73
  end
74
74
 
75
+ # LXC configuration class
76
+ #
77
+ # Gets the LXC configuration class object
78
+ #
79
+ # @return [LXC::Config] Returns the LXC configuration object.
80
+ def config
81
+ @config ||= LXC::Config.new(@lxc, "/etc/lxc/#{@name}")
82
+ end
83
+
75
84
  # Create the container
76
85
  #
77
86
  # Runs the "lxc-create" command.
@@ -2,7 +2,7 @@ class LXC
2
2
 
3
3
  unless const_defined?(:VERSION)
4
4
  # LXC Gem Version
5
- VERSION = "0.0.6"
5
+ VERSION = "0.0.7"
6
6
  end
7
7
 
8
8
  end
@@ -1,4 +1,22 @@
1
- # coding: utf-8
1
+ ################################################################################
2
+ #
3
+ # Author: Zachary Patten <zachary@jovelabs.net>
4
+ # Copyright: Copyright (c) Zachary Patten
5
+ # License: Apache License, Version 2.0
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+ ################################################################################
2
20
  lib = File.expand_path('../lib', __FILE__)
3
21
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
22
  require 'lxc/version'
@@ -20,11 +38,10 @@ Gem::Specification.new do |spec|
20
38
 
21
39
  spec.add_dependency("ztk")
22
40
 
23
- spec.add_development_dependency("bundler", "~> 1.3")
41
+ spec.add_development_dependency("bundler")
24
42
  spec.add_development_dependency("pry")
25
43
  spec.add_development_dependency("rake")
26
44
  spec.add_development_dependency("redcarpet")
27
45
  spec.add_development_dependency("rspec")
28
- spec.add_development_dependency("simplecov")
29
46
  spec.add_development_dependency("yard")
30
47
  end
@@ -29,8 +29,72 @@ describe LXC::Container do
29
29
  LXC_VERSIONS.each do |lxc_version|
30
30
  context "LXC Target Version #{lxc_version}" do
31
31
 
32
+ describe "#stopped?" do
33
+ it "should return true for an un-created container" do
34
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
35
+
36
+ subject.stopped?.should == true
37
+ end
38
+ end
39
+
40
+ describe "#starting?" do
41
+ it "should return false for an un-created container" do
42
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
43
+
44
+ subject.starting?.should == false
45
+ end
46
+ end
47
+
48
+ describe "#running?" do
49
+ it "should return false for an un-created container" do
50
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
51
+
52
+ subject.running?.should == false
53
+ end
54
+ end
55
+
56
+ describe "#stopping?" do
57
+ it "should return false for an un-created container" do
58
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
59
+
60
+ subject.stopping?.should == false
61
+ end
62
+ end
63
+
64
+ describe "#aborting?" do
65
+ it "should return false for an un-created container" do
66
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
67
+
68
+ subject.aborting?.should == false
69
+ end
70
+ end
71
+
72
+ describe "#freezing?" do
73
+ it "should return false for an un-created container" do
74
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
75
+
76
+ subject.freezing?.should == false
77
+ end
78
+ end
79
+
80
+ describe "#frozen?" do
81
+ it "should return false for an un-created container" do
82
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
83
+
84
+ subject.frozen?.should == false
85
+ end
86
+ end
87
+
88
+ describe "#thawed?" do
89
+ it "should return false for an un-created container" do
90
+ subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
91
+
92
+ subject.thawed?.should == false
93
+ end
94
+ end
95
+
32
96
  describe "#exists?" do
33
- it "should return false for an un-created remote container" do
97
+ it "should return false for an un-created container" do
34
98
  subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-ls-wo-containers.out") }
35
99
 
36
100
  subject.exists?.should == false
@@ -38,7 +102,7 @@ describe LXC::Container do
38
102
  end
39
103
 
40
104
  describe "#pid" do
41
- it "should return -1 for an un-created remote container" do
105
+ it "should return -1 for an un-created container" do
42
106
  subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-pid-stopped.out") }
43
107
 
44
108
  subject.pid.should == -1
@@ -46,21 +110,34 @@ describe LXC::Container do
46
110
  end
47
111
 
48
112
  describe "#state" do
49
- it "should return stopped for an un-created remote container" do
113
+ it "should return stopped for an un-created container" do
50
114
  subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-info-state-stopped.out") }
51
115
 
52
116
  subject.state.should == :stopped
53
117
  end
54
118
  end
55
119
 
120
+ describe "#config" do
121
+ it "should return an LXC::Config object" do
122
+ subject.config.should be_kind_of(LXC::Config)
123
+ end
124
+ end
125
+
56
126
  describe "#wait" do
57
- it "should be successfully when waiting to stop a non-existant remote container" do
127
+ it "should be successfully when waiting to stop a non-existant container" do
58
128
  subject.stub(:exec) { lxc_fixture(lxc_version, "lxc-wait.out") }
59
129
 
60
130
  subject.wait([:stopped], 120).should == true
61
131
  end
62
132
  end
63
133
 
134
+ describe "#inspect" do
135
+ it "should return an information string about our class instance" do
136
+ subject.inspect.should be_kind_of(String)
137
+ subject.inspect.length.should be > 0
138
+ end
139
+ end
140
+
64
141
  end
65
142
  end
66
143
 
@@ -17,35 +17,14 @@
17
17
  # limitations under the License.
18
18
  #
19
19
  ################################################################################
20
- require 'simplecov'
21
- SimpleCov.start do
22
- add_filter '/spec/'
23
- end if ENV["COVERAGE"]
20
+ require 'coveralls'
21
+ Coveralls.wear!
24
22
  ################################################################################
25
23
  require 'lxc'
26
24
 
27
- ENV['LOG_LEVEL'] = "DEBUG"
28
-
29
- RSpec.configure do |config|
30
-
31
- config.before(:all) do
32
- $stdout = File.open("/dev/null", "w")
33
- $stderr = File.open("/dev/null", "w")
34
- $stdin = File.open("/dev/null", "r")
35
- $logger = ZTK::Logger.new(File.join("/tmp", "test.log"))
36
-
37
- $logger.info { "=" * 80 }
38
- $logger.info { "STARTING LXC v#{LXC::VERSION} TEST RUN @ #{Time.now.utc}" }
39
- $logger.info { "=" * 80 }
40
- end
41
-
42
- end
43
-
44
- ################################################################################
45
-
46
25
  LXC_VERSIONS = %w(0.7.5 0.8.0-rc2)
47
26
 
48
27
  def lxc_fixture(version, filename)
49
- filepath = File.expand_path(File.join(File.dirname(__FILE__), "fixtures", version, filename))
28
+ filepath = File.expand_path(File.join(File.dirname(__FILE__), "support", "fixtures", version, filename))
50
29
  IO.read(filepath)
51
30
  end
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+ apt-get -qq update
3
+ cat <<EOF | tee /usr/sbin/policy-rc.d
4
+ #!/bin/sh
5
+ exit 101
6
+ EOF
7
+ chmod 755 /usr/sbin/policy-rc.d
8
+ apt-get -qq install lxc
metadata CHANGED
@@ -1,118 +1,141 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: lxc
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.7
4
5
  prerelease:
5
- version: 0.0.6
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Zachary Patten
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2013-04-14 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: ztk
17
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
18
17
  none: false
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
27
31
  name: bundler
28
- requirement: &id002 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
29
33
  none: false
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: "1.3"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
34
38
  type: :development
35
39
  prerelease: false
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
38
47
  name: pry
39
- requirement: &id003 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
40
49
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
45
54
  type: :development
46
55
  prerelease: false
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
49
63
  name: rake
50
- requirement: &id004 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
51
65
  none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
56
70
  type: :development
57
71
  prerelease: false
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
60
79
  name: redcarpet
61
- requirement: &id005 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
62
81
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: "0"
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
67
86
  type: :development
68
87
  prerelease: false
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
71
95
  name: rspec
72
- requirement: &id006 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
73
97
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: "0"
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
78
102
  type: :development
79
103
  prerelease: false
80
- version_requirements: *id006
81
- - !ruby/object:Gem::Dependency
82
- name: simplecov
83
- requirement: &id007 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
84
105
  none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: "0"
89
- type: :development
90
- prerelease: false
91
- version_requirements: *id007
92
- - !ruby/object:Gem::Dependency
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
93
111
  name: yard
94
- requirement: &id008 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
95
113
  none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: "0"
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
100
118
  type: :development
101
119
  prerelease: false
102
- version_requirements: *id008
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
103
126
  description: An interface for controlling local or remote Linux Containers (LXC)
104
- email:
127
+ email:
105
128
  - zachary@jovelabs.com
106
- executables:
129
+ executables:
107
130
  - lxc-console
108
131
  extensions: []
109
-
110
132
  extra_rdoc_files: []
111
-
112
- files:
133
+ files:
134
+ - .coveralls.yml
113
135
  - .gitignore
114
136
  - .rspec
115
- - .rvmrc.template
137
+ - .ruby-gemset
138
+ - .ruby-version
116
139
  - .travis.yml
117
140
  - Gemfile
118
141
  - LICENSE
@@ -120,79 +143,80 @@ files:
120
143
  - Rakefile
121
144
  - bin/lxc-console
122
145
  - lib/lxc.rb
146
+ - lib/lxc/config.rb
123
147
  - lib/lxc/container.rb
124
148
  - lib/lxc/version.rb
125
149
  - lxc.gemspec
126
- - spec/fixtures/0.7.5/lxc-checkconfig.out
127
- - spec/fixtures/0.7.5/lxc-info-pid-stopped.out
128
- - spec/fixtures/0.7.5/lxc-info-state-stopped.out
129
- - spec/fixtures/0.7.5/lxc-ls-w-containers.out
130
- - spec/fixtures/0.7.5/lxc-ls-wo-containers.out
131
- - spec/fixtures/0.7.5/lxc-ps.out
132
- - spec/fixtures/0.7.5/lxc-version.out
133
- - spec/fixtures/0.7.5/lxc-wait.out
134
- - spec/fixtures/0.8.0-rc2/lxc-checkconfig.out
135
- - spec/fixtures/0.8.0-rc2/lxc-info-pid-stopped.out
136
- - spec/fixtures/0.8.0-rc2/lxc-info-state-stopped.out
137
- - spec/fixtures/0.8.0-rc2/lxc-ls-w-containers.out
138
- - spec/fixtures/0.8.0-rc2/lxc-ls-wo-containers.out
139
- - spec/fixtures/0.8.0-rc2/lxc-ps.out
140
- - spec/fixtures/0.8.0-rc2/lxc-version.out
141
- - spec/fixtures/0.8.0-rc2/lxc-wait.out
142
150
  - spec/lxc/container_spec.rb
143
151
  - spec/lxc_spec.rb
144
152
  - spec/spec_helper.rb
153
+ - spec/support/fixtures/0.7.5/lxc-checkconfig.out
154
+ - spec/support/fixtures/0.7.5/lxc-info-pid-stopped.out
155
+ - spec/support/fixtures/0.7.5/lxc-info-state-stopped.out
156
+ - spec/support/fixtures/0.7.5/lxc-ls-w-containers.out
157
+ - spec/support/fixtures/0.7.5/lxc-ls-wo-containers.out
158
+ - spec/support/fixtures/0.7.5/lxc-ps.out
159
+ - spec/support/fixtures/0.7.5/lxc-version.out
160
+ - spec/support/fixtures/0.7.5/lxc-wait.out
161
+ - spec/support/fixtures/0.8.0-rc2/lxc-checkconfig.out
162
+ - spec/support/fixtures/0.8.0-rc2/lxc-info-pid-stopped.out
163
+ - spec/support/fixtures/0.8.0-rc2/lxc-info-state-stopped.out
164
+ - spec/support/fixtures/0.8.0-rc2/lxc-ls-w-containers.out
165
+ - spec/support/fixtures/0.8.0-rc2/lxc-ls-wo-containers.out
166
+ - spec/support/fixtures/0.8.0-rc2/lxc-ps.out
167
+ - spec/support/fixtures/0.8.0-rc2/lxc-version.out
168
+ - spec/support/fixtures/0.8.0-rc2/lxc-wait.out
169
+ - spec/support/install-lxc.sh
145
170
  homepage: https://github.com/zpatten/lxc
146
- licenses:
171
+ licenses:
147
172
  - Apache 2.0
148
173
  post_install_message:
149
174
  rdoc_options: []
150
-
151
- require_paths:
175
+ require_paths:
152
176
  - lib
153
- required_ruby_version: !ruby/object:Gem::Requirement
177
+ required_ruby_version: !ruby/object:Gem::Requirement
154
178
  none: false
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- hash: -1821779695803479880
159
- segments:
179
+ requirements:
180
+ - - ! '>='
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ segments:
160
184
  - 0
161
- version: "0"
162
- required_rubygems_version: !ruby/object:Gem::Requirement
185
+ hash: 2206051210403266464
186
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
187
  none: false
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- hash: -1821779695803479880
168
- segments:
188
+ requirements:
189
+ - - ! '>='
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ segments:
169
193
  - 0
170
- version: "0"
194
+ hash: 2206051210403266464
171
195
  requirements: []
172
-
173
196
  rubyforge_project:
174
197
  rubygems_version: 1.8.25
175
198
  signing_key:
176
199
  specification_version: 3
177
200
  summary: An interface for controlling local or remote Linux Containers (LXC)
178
- test_files:
179
- - spec/fixtures/0.7.5/lxc-checkconfig.out
180
- - spec/fixtures/0.7.5/lxc-info-pid-stopped.out
181
- - spec/fixtures/0.7.5/lxc-info-state-stopped.out
182
- - spec/fixtures/0.7.5/lxc-ls-w-containers.out
183
- - spec/fixtures/0.7.5/lxc-ls-wo-containers.out
184
- - spec/fixtures/0.7.5/lxc-ps.out
185
- - spec/fixtures/0.7.5/lxc-version.out
186
- - spec/fixtures/0.7.5/lxc-wait.out
187
- - spec/fixtures/0.8.0-rc2/lxc-checkconfig.out
188
- - spec/fixtures/0.8.0-rc2/lxc-info-pid-stopped.out
189
- - spec/fixtures/0.8.0-rc2/lxc-info-state-stopped.out
190
- - spec/fixtures/0.8.0-rc2/lxc-ls-w-containers.out
191
- - spec/fixtures/0.8.0-rc2/lxc-ls-wo-containers.out
192
- - spec/fixtures/0.8.0-rc2/lxc-ps.out
193
- - spec/fixtures/0.8.0-rc2/lxc-version.out
194
- - spec/fixtures/0.8.0-rc2/lxc-wait.out
201
+ test_files:
195
202
  - spec/lxc/container_spec.rb
196
203
  - spec/lxc_spec.rb
197
204
  - spec/spec_helper.rb
205
+ - spec/support/fixtures/0.7.5/lxc-checkconfig.out
206
+ - spec/support/fixtures/0.7.5/lxc-info-pid-stopped.out
207
+ - spec/support/fixtures/0.7.5/lxc-info-state-stopped.out
208
+ - spec/support/fixtures/0.7.5/lxc-ls-w-containers.out
209
+ - spec/support/fixtures/0.7.5/lxc-ls-wo-containers.out
210
+ - spec/support/fixtures/0.7.5/lxc-ps.out
211
+ - spec/support/fixtures/0.7.5/lxc-version.out
212
+ - spec/support/fixtures/0.7.5/lxc-wait.out
213
+ - spec/support/fixtures/0.8.0-rc2/lxc-checkconfig.out
214
+ - spec/support/fixtures/0.8.0-rc2/lxc-info-pid-stopped.out
215
+ - spec/support/fixtures/0.8.0-rc2/lxc-info-state-stopped.out
216
+ - spec/support/fixtures/0.8.0-rc2/lxc-ls-w-containers.out
217
+ - spec/support/fixtures/0.8.0-rc2/lxc-ls-wo-containers.out
218
+ - spec/support/fixtures/0.8.0-rc2/lxc-ps.out
219
+ - spec/support/fixtures/0.8.0-rc2/lxc-version.out
220
+ - spec/support/fixtures/0.8.0-rc2/lxc-wait.out
221
+ - spec/support/install-lxc.sh
198
222
  has_rdoc:
@@ -1 +0,0 @@
1
- rvm use ruby-1.9.3@lxc --create