thisisstable 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/thisisstable.rb CHANGED
@@ -5,8 +5,10 @@ module ThisIsStable
5
5
 
6
6
  def vouch(gem)
7
7
  puts "Vouching gem: #{gem}"
8
- 3.times do
9
- fork do
8
+
9
+ children = []
10
+ 5.times do
11
+ children << fork do
10
12
  path = "./#{$$}-#{gem}/"
11
13
  Dir.mkdir(path) unless Dir.exists?(path)
12
14
  trap (:INT) { FileUtils.rm_rf(path); exit 0 }
@@ -14,10 +16,12 @@ module ThisIsStable
14
16
  loop do
15
17
  %x[gem install --install-dir #{path} #{gem}]
16
18
  puts "[#{$$}] Installed #{gem}"
17
- %x[gem uninstall -x -q --install-dir #{path} #{gem}]
19
+ %x[rm -r #{path}]
18
20
  end
19
21
  end
20
22
  end
23
+
24
+ trap (:INT) { children.each {|pid| Process.kill("INT", pid)} ; exit 0 }
21
25
  Process.waitall
22
26
  end
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module ThisIsStable
2
- Version = VERSION = "1.0.1"
2
+ Version = VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thisisstable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-05 00:00:00.000000000 Z
12
+ date: 2012-08-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ''
15
15
  email: jhsu@josephhsu.com