lxc 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.rspec +1 -0
- data/.rvmrc.template +1 -0
- data/.travis.yml +16 -0
- data/LICENSE +202 -22
- data/README.md +28 -16
- data/Rakefile +82 -2
- data/bin/lxc-console +19 -0
- data/lib/lxc.rb +178 -3
- data/lib/lxc/container.rb +193 -0
- data/lib/lxc/version.rb +2 -2
- data/lxc.gemspec +27 -14
- data/spec/fixtures/0.7.5/lxc-checkconfig.out +28 -0
- data/spec/fixtures/0.7.5/lxc-ls-w-containers.out +2 -0
- data/spec/fixtures/0.7.5/lxc-ls-wo-containers.out +0 -0
- data/spec/fixtures/0.7.5/lxc-ps.out +4 -0
- data/spec/fixtures/0.7.5/lxc-version.out +1 -0
- data/spec/fixtures/0.8.0-rc2/lxc-checkconfig.out +28 -0
- data/spec/fixtures/0.8.0-rc2/lxc-ls-w-containers.out +2 -0
- data/spec/fixtures/0.8.0-rc2/lxc-ls-wo-containers.out +0 -0
- data/spec/fixtures/0.8.0-rc2/lxc-ps.out +4 -0
- data/spec/fixtures/0.8.0-rc2/lxc-version.out +1 -0
- data/spec/lxc_spec.rb +193 -0
- data/spec/spec_helper.rb +51 -0
- metadata +175 -9
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,51 @@
|
|
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
|
+
################################################################################
|
20
|
+
require 'simplecov'
|
21
|
+
SimpleCov.start do
|
22
|
+
add_filter '/spec/'
|
23
|
+
end if ENV["COVERAGE"]
|
24
|
+
################################################################################
|
25
|
+
require 'lxc'
|
26
|
+
|
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
|
+
LXC_VERSIONS = %w(0.7.5 0.8.0-rc2)
|
47
|
+
|
48
|
+
def lxc_fixture(version, filename)
|
49
|
+
filepath = File.expand_path(File.join(File.dirname(__FILE__), "fixtures", version, filename))
|
50
|
+
IO.read(filepath)
|
51
|
+
end
|
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.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,25 +9,172 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
|
12
|
+
date: 2013-04-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: ztk
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
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
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.3'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.3'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: pry
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
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
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
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
|
79
|
+
name: redcarpet
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
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
|
95
|
+
name: rspec
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: simplecov
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: yard
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
description: An interface for controlling local or remote Linux Containers (LXC)
|
15
143
|
email:
|
16
144
|
- zachary@jovelabs.com
|
17
|
-
executables:
|
145
|
+
executables:
|
146
|
+
- lxc-console
|
18
147
|
extensions: []
|
19
148
|
extra_rdoc_files: []
|
20
149
|
files:
|
21
150
|
- .gitignore
|
151
|
+
- .rspec
|
152
|
+
- .rvmrc.template
|
153
|
+
- .travis.yml
|
22
154
|
- Gemfile
|
23
155
|
- LICENSE
|
24
156
|
- README.md
|
25
157
|
- Rakefile
|
158
|
+
- bin/lxc-console
|
26
159
|
- lib/lxc.rb
|
160
|
+
- lib/lxc/container.rb
|
27
161
|
- lib/lxc/version.rb
|
28
162
|
- lxc.gemspec
|
163
|
+
- spec/fixtures/0.7.5/lxc-checkconfig.out
|
164
|
+
- spec/fixtures/0.7.5/lxc-ls-w-containers.out
|
165
|
+
- spec/fixtures/0.7.5/lxc-ls-wo-containers.out
|
166
|
+
- spec/fixtures/0.7.5/lxc-ps.out
|
167
|
+
- spec/fixtures/0.7.5/lxc-version.out
|
168
|
+
- spec/fixtures/0.8.0-rc2/lxc-checkconfig.out
|
169
|
+
- spec/fixtures/0.8.0-rc2/lxc-ls-w-containers.out
|
170
|
+
- spec/fixtures/0.8.0-rc2/lxc-ls-wo-containers.out
|
171
|
+
- spec/fixtures/0.8.0-rc2/lxc-ps.out
|
172
|
+
- spec/fixtures/0.8.0-rc2/lxc-version.out
|
173
|
+
- spec/lxc_spec.rb
|
174
|
+
- spec/spec_helper.rb
|
29
175
|
homepage: https://github.com/zpatten/lxc
|
30
|
-
licenses:
|
176
|
+
licenses:
|
177
|
+
- Apache 2.0
|
31
178
|
post_install_message:
|
32
179
|
rdoc_options: []
|
33
180
|
require_paths:
|
@@ -38,16 +185,35 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
38
185
|
- - ! '>='
|
39
186
|
- !ruby/object:Gem::Version
|
40
187
|
version: '0'
|
188
|
+
segments:
|
189
|
+
- 0
|
190
|
+
hash: 4541588393573481545
|
41
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
192
|
none: false
|
43
193
|
requirements:
|
44
194
|
- - ! '>='
|
45
195
|
- !ruby/object:Gem::Version
|
46
196
|
version: '0'
|
197
|
+
segments:
|
198
|
+
- 0
|
199
|
+
hash: 4541588393573481545
|
47
200
|
requirements: []
|
48
201
|
rubyforge_project:
|
49
|
-
rubygems_version: 1.8.
|
202
|
+
rubygems_version: 1.8.25
|
50
203
|
signing_key:
|
51
204
|
specification_version: 3
|
52
|
-
summary:
|
53
|
-
test_files:
|
205
|
+
summary: An interface for controlling local or remote Linux Containers (LXC)
|
206
|
+
test_files:
|
207
|
+
- spec/fixtures/0.7.5/lxc-checkconfig.out
|
208
|
+
- spec/fixtures/0.7.5/lxc-ls-w-containers.out
|
209
|
+
- spec/fixtures/0.7.5/lxc-ls-wo-containers.out
|
210
|
+
- spec/fixtures/0.7.5/lxc-ps.out
|
211
|
+
- spec/fixtures/0.7.5/lxc-version.out
|
212
|
+
- spec/fixtures/0.8.0-rc2/lxc-checkconfig.out
|
213
|
+
- spec/fixtures/0.8.0-rc2/lxc-ls-w-containers.out
|
214
|
+
- spec/fixtures/0.8.0-rc2/lxc-ls-wo-containers.out
|
215
|
+
- spec/fixtures/0.8.0-rc2/lxc-ps.out
|
216
|
+
- spec/fixtures/0.8.0-rc2/lxc-version.out
|
217
|
+
- spec/lxc_spec.rb
|
218
|
+
- spec/spec_helper.rb
|
219
|
+
has_rdoc:
|