linux_container 1.4 → 1.5

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Mjc1ZDc1MDMyZTBhNDJhZDNmMGRlZTgzZjIzZjNiMzEyZDlhMzUyZg==
4
+ NTc3NjJiMDNlMDAyZjRkM2VlMjE2ZWM3MWJlNzI4YmNlODQxMzQ5OQ==
5
5
  data.tar.gz: !binary |-
6
- NzU1MDUyMjQyYzk2OWE5NTg4ZmRmOGEzYzRhNjVjMTAxNzBjZjYwNQ==
6
+ NTYwMzc0MzM2NmE4YTAyNjg1ZDgxMDZjNzM2NWM3NmE3MmIxZTY2Nw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MWVmMmQxMzhkZTQ1MjI2MGQ2ZjEyOGM0OTZjZWZhNGQ2ZTcyNzAzNzM4YjA2
10
- NDM2YTcwZDc5ZjAyYWQ5YjcyZDgyODk2Y2ViZDI1MzVjMjVkNDcwNjZiMzdm
11
- NWY4N2U0OTIxYWMwYTQyMjk1ZGMwZjA2NDk1NWM3YzUyZDg2NjY=
9
+ M2MxZmM4NWUwZjU5NjYzNzU0NjYxNGU5MWJhNzNhZjNhODc5NmFkYmNmN2M5
10
+ YTExNWM0MThhOGJjM2IzYWJiZjUwNTUyZTg0ZWRjMjA4ZmRiMjhjMTQ2N2Nh
11
+ YjM1MTY4YzIwMmMxMTdkOTE5OTg2NzI3YTFjZDc3MTg1YTAzMTc=
12
12
  data.tar.gz: !binary |-
13
- MjJiM2EyZTAwZjVkYjY1Yjc0Njk2NjQ1NTdlNTVlNzBhMDYxMzIzM2QyMjJi
14
- M2U5MjQyMjk0ZGI3ODRmMGJlMTc3Y2Q3NDQyNzc5MWE3OTQ5MWNiY2FhMjkx
15
- YzYwNTI5ZDBmMjM1ZmNhMjJkYjE5OWZjZDA0NTJmZjJkNGUxNjI=
13
+ YTY0N2ZlOWExYjk4NTRlN2ExMGQ3Yzk5NmY0NmU4OTExYTBiN2ZlOGJmYzA0
14
+ OGM0NGEwYzdiZjA3MWZjNjA4MTFkMTQ3NzA1ZDkxNzM5MmFkMDk3ZjYyZmU3
15
+ ZmZmNGJkNzcxNzgwZGI3ZGM3N2RjOWJiNzQyYTdkNTY3MWIxM2Y=
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v1.5. match new ephemeral container naming scheme
1
2
  v1.4. parent_container feature
2
3
  v1.3. make aufs overridable for lxc 0.9+
3
4
  v1.2. make overlayfs overridable for lxc 0.8
@@ -47,7 +47,7 @@ class LinuxContainer
47
47
 
48
48
  def parent_container
49
49
  n = name.dup
50
- self.class.new(name: n) if n.sub!(/-temp-[0-9A-Za-z]+$/, '')
50
+ self.class.new(name: n) if n.sub!(/(-temp)?-[0-9A-Za-z]+$/, '')
51
51
  end
52
52
 
53
53
  def start_ephemeral(config={})
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "linux_container"
5
- s.version = "1.4"
5
+ s.version = "1.5"
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-04-24"
9
+ s.date = "2013-05-03"
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"]
data/test/test_all.rb CHANGED
@@ -15,7 +15,7 @@ class TestLinuxContainer < MiniTest::Unit::TestCase
15
15
  $sshkey = "/tmp/linuxcontainergemtestssh#{$$}"
16
16
  `ssh-keygen -q -t rsa -f #{$sshkey} -N ''` unless File.exists?($sshkey)
17
17
  $c = LinuxContainer.new(name: 'linuxcontainergemtest', ssh_key_path: $sshkey)
18
- $c.create or raise "Create failed"
18
+ $c.create(release: 'precise') or raise "Create failed"
19
19
  end
20
20
 
21
21
  def test_state
@@ -44,7 +44,7 @@ class TestLinuxContainer < MiniTest::Unit::TestCase
44
44
 
45
45
  def test_ephemeral
46
46
  assert($ec = $c.start_ephemeral)
47
- assert_match /^linuxcontainergemtest-temp-[a-zA-Z0-9]+$/, $ec.name
47
+ assert_match /^linuxcontainergemtest(-temp)?-[_a-zA-Z0-9]+$/, $ec.name
48
48
  assert_equal $c.name, $ec.parent_container.name
49
49
  assert($ec.wait_for { running? }, 'wait_for running?')
50
50
  assert($ec.wait_for { ip }, 'wait_for ip')
@@ -61,7 +61,7 @@ class TestLinuxContainer < MiniTest::Unit::TestCase
61
61
  def test_ephemeral_overlayfs
62
62
  assert($ec = $c.start_ephemeral('union-type' => 'overlayfs'))
63
63
  assert($ec.wait_for { running? }, 'wait_for running?')
64
- assert_match /type overlayfs/, `mount`.lines.grep(/#{$ec.name}/).first
64
+ assert($ec.wait_for { ip }, 'wait_for ip')
65
65
  $ec.stop
66
66
  assert($ec.wait_for { !running? }, 'wait_for !running?')
67
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linux_container
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.4'
4
+ version: '1.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Snow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-24 00:00:00.000000000 Z
11
+ date: 2013-05-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby gem for ephemeral LXC linux containers
14
14
  email: andrew@modulus.org