linux_container 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Yzg0MmQwMTFkNTI5NTZjZWEyYmEwYzJmNWVjMGM5MGJkMzg5ZDc1OQ==
5
+ data.tar.gz: !binary |-
6
+ ZDhlNDVjOTdlNTNlMjg4ZmQ3MmNmZGU0NDJkNWM1ZGE0NDQxYTljNA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MmRjYmU2YzNhNzMyNTUyMTlkYTc2NTM4OTEyYTNkZTQ3MmMyMGQ2MTQ1OGQ3
10
+ YmM2MmM2NzdiNmRhNGU4Njc1ZTNlNTA4MzhlODJiMzUyMDg1ZmY1Y2VkMzAz
11
+ NzExMWRjNTk0NmU4MDkwNWVhMWZlYTE3NWI3MTQ2YTJkZTBkYTA=
12
+ data.tar.gz: !binary |-
13
+ Mzc1YTgwNGVhYjVhODM4YTRlOTdlMDI0NWQ2MDE2OTA4MTdiZjkwYjYwNzUx
14
+ OTUwYTRlZDQ3N2Q2N2RlYjJhM2UwMWJmNWYyZjk5ODJkNDU2M2YyMmVhNzli
15
+ OWE1MDhiYjYzMDg3MmE5ZTU2YTkxZmFkN2M1OWIyYTY2ZjJiY2I=
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ v0.5. Detach ephemeral containers from process group
1
2
  v0.4. sudo only if needed
2
3
  v0.3. Support shutdown
3
4
  v0.2. Support clone
data/README.md CHANGED
@@ -57,12 +57,16 @@ very little disk space, which then disappears when shut down.
57
57
  > LinuxContainer.all
58
58
  => [container, container, container, ... ]
59
59
 
60
+ ### Gracecful shutdown
61
+
62
+ > c.shutdown '-t', '120'
63
+
64
+
60
65
  ### Force shutdown
61
66
 
62
- c.destroy '-f'
67
+ > c.destroy '-f'
63
68
 
64
69
  ### other commands
65
70
 
66
71
  execute, kill, wait, cgroup, ps, info, freeze, unfreeze, netstat
67
72
 
68
-
@@ -101,7 +101,7 @@ class LinuxContainer
101
101
 
102
102
  def bg_execute(*cmd)
103
103
  logfile = Tempfile.new(self.class.to_s)
104
- cmdstring = "#{self.class.sudo_if_needed} #{cmd.shift} #{Shellwords.join(cmd)} >>#{logfile.path} 2>>#{logfile.path} &"
104
+ cmdstring = "( #{self.class.sudo_if_needed} #{cmd.shift} #{Shellwords.join(cmd)} >>#{logfile.path} 2>>#{logfile.path} & )"
105
105
  system(cmdstring)
106
106
  raise "command failed: #{cmdstring.inspect}\n" unless $? == 0
107
107
  logfile
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "linux_container"
5
- s.version = "0.4"
5
+ s.version = "0.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-03-07"
9
+ s.date = "2013-03-12"
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 = "1.8.25"
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
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
- version: '0.4'
5
- prerelease:
4
+ version: '0.5'
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-07 00:00:00.000000000 Z
11
+ date: 2013-03-12 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
@@ -40,22 +40,20 @@ rdoc_options:
40
40
  require_paths:
41
41
  - lib
42
42
  required_ruby_version: !ruby/object:Gem::Requirement
43
- none: false
44
43
  requirements:
45
44
  - - ! '>='
46
45
  - !ruby/object:Gem::Version
47
46
  version: '0'
48
47
  required_rubygems_version: !ruby/object:Gem::Requirement
49
- none: false
50
48
  requirements:
51
49
  - - ! '>='
52
50
  - !ruby/object:Gem::Version
53
51
  version: '1.2'
54
52
  requirements: []
55
53
  rubyforge_project: linux_container
56
- rubygems_version: 1.8.25
54
+ rubygems_version: 2.0.2
57
55
  signing_key:
58
- specification_version: 3
56
+ specification_version: 4
59
57
  summary: Ruby gem for ephemeral LXC linux containers
60
58
  test_files:
61
59
  - test/test_all.rb