linux_container 0.8 → 0.9
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 +15 -0
- data/CHANGELOG +1 -0
- data/lib/linux_container.rb +12 -4
- data/linux_container.gemspec +3 -12
- data/test/test_all.rb +1 -1
- metadata +5 -7
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZTA5NGM3ZTczYmRkZjVkNGM4NmNmZjcxN2U3ZGUyZDJlNjFjMzgxMQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NWU1OWEwNzAwZWQ4ZjIxZTY0OWJhYTA5NzA2ODBhZDM4N2I5Mzk1Ng==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Y2JkODhkNTVlNDUwYmI0NjY4MzllNzRkMzM4Y2MyNGI3MTAxODFkMjAzZmE0
|
10
|
+
ZGUzZDZmMjRiZDQ4MjIxZTYzZGEwODYwNjkwZTVmYjgwYzFiMTY0NzY2ZmU2
|
11
|
+
ZWE5MTNjMGE5OTUxY2FlMzIzMTEzYmVhNGQ2NDJiOGZiMjFkMmQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTYxOWYzYTA2YTVkZTAwNzQ0YWMxZjU4Y2Q4ZWJiYjM3MmNhNTMxY2FiYjlj
|
14
|
+
ZjhlNWFkYzdhNDM5NzcxNjhkODQyMDIxYzljNGY0NjVlMjRiZmY0YTRjNzcw
|
15
|
+
ZDNkNzY3YWU1M2NhODJmNDBlMjJmZTEyYzFiZDM1YmViYjI1YzY=
|
data/CHANGELOG
CHANGED
data/lib/linux_container.rb
CHANGED
@@ -44,10 +44,18 @@ class LinuxContainer
|
|
44
44
|
lxc_execute('clone', '-o',fromname, *args)
|
45
45
|
end
|
46
46
|
|
47
|
-
def start_ephemeral
|
48
|
-
|
49
|
-
args
|
50
|
-
|
47
|
+
def start_ephemeral(config={})
|
48
|
+
defaults = {'orig' => name, 'user' => username}
|
49
|
+
args = []
|
50
|
+
if self.class.version == '0.8'
|
51
|
+
defaults.merge!('union-type' => 'aufs')
|
52
|
+
args.push '-U', defaults.delete('union-type')
|
53
|
+
else
|
54
|
+
defaults.merge!('union-type' => 'overlayfs')
|
55
|
+
args << '-d'
|
56
|
+
end
|
57
|
+
args.push *defaults.merge!(config).map {|k, v| "--#{k}=#{v}" }
|
58
|
+
logfile_path = bg_execute('lxc-start-ephemeral', *args)
|
51
59
|
newname = nil
|
52
60
|
while newname.nil?
|
53
61
|
sleep 1
|
data/linux_container.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "linux_container"
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.9"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Andrew Snow"]
|
9
|
-
s.date = "2013-03-
|
9
|
+
s.date = "2013-03-18"
|
10
10
|
s.description = "Ruby gem for ephemeral LXC linux containers"
|
11
11
|
s.email = "andrew@modulus.org"
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "README.md", "lib/linux_container.rb"]
|
@@ -15,16 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Linux_container", "--main", "README.md"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = "linux_container"
|
18
|
-
s.rubygems_version = "
|
18
|
+
s.rubygems_version = "2.0.2"
|
19
19
|
s.summary = "Ruby gem for ephemeral LXC linux containers"
|
20
20
|
s.test_files = ["test/test_all.rb"]
|
21
|
-
|
22
|
-
if s.respond_to? :specification_version then
|
23
|
-
s.specification_version = 3
|
24
|
-
|
25
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
26
|
-
else
|
27
|
-
end
|
28
|
-
else
|
29
|
-
end
|
30
21
|
end
|
data/test/test_all.rb
CHANGED
@@ -51,7 +51,7 @@ class TestLinuxContainer < MiniTest::Unit::TestCase
|
|
51
51
|
assert_equal "hi\n", $ec.execute('echo hi')
|
52
52
|
$ec.stop
|
53
53
|
assert($ec.wait_for { !running? }, 'wait_for !running?')
|
54
|
-
assert($ec.wait_for { File.exists?($ec.dir) }, 'wait_for directory deletion')
|
54
|
+
assert($ec.wait_for { !File.exists?($ec.dir) }, 'wait_for directory deletion')
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linux_container
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: '0.8'
|
4
|
+
version: '0.9'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Andrew Snow
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: Ruby gem for ephemeral LXC linux containers
|
15
14
|
email: andrew@modulus.org
|
@@ -29,6 +28,7 @@ files:
|
|
29
28
|
- linux_container.gemspec
|
30
29
|
homepage: https://github.com/andys/linux_container
|
31
30
|
licenses: []
|
31
|
+
metadata: {}
|
32
32
|
post_install_message:
|
33
33
|
rdoc_options:
|
34
34
|
- --line-numbers
|
@@ -44,18 +44,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
44
44
|
- - ! '>='
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
|
-
none: false
|
48
47
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
48
|
requirements:
|
50
49
|
- - ! '>='
|
51
50
|
- !ruby/object:Gem::Version
|
52
51
|
version: '1.2'
|
53
|
-
none: false
|
54
52
|
requirements: []
|
55
53
|
rubyforge_project: linux_container
|
56
|
-
rubygems_version:
|
54
|
+
rubygems_version: 2.0.2
|
57
55
|
signing_key:
|
58
|
-
specification_version:
|
56
|
+
specification_version: 4
|
59
57
|
summary: Ruby gem for ephemeral LXC linux containers
|
60
58
|
test_files:
|
61
59
|
- test/test_all.rb
|