github-safegem 0.2.7 → 0.2.8
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.
- data/VERSION.yml +1 -1
- data/bin/safegem +10 -7
- metadata +1 -1
data/VERSION.yml
CHANGED
data/bin/safegem
CHANGED
|
@@ -34,15 +34,17 @@ post '/' do
|
|
|
34
34
|
spec = nil
|
|
35
35
|
|
|
36
36
|
Timeout::timeout(300) do
|
|
37
|
-
t = time
|
|
38
|
-
`git clone --depth 1 git://github.com/#{repo} #{tmpdir}`
|
|
39
|
-
Dir.chdir(tmpdir) do
|
|
40
|
-
`git submodule init`
|
|
41
|
-
`git submodule update`
|
|
42
|
-
end
|
|
43
|
-
end
|
|
37
|
+
t = time { `git clone --depth 1 git://github.com/#{repo} #{tmpdir}` }
|
|
44
38
|
puts "-- cloned #{repo} in #{t}s"
|
|
45
39
|
|
|
40
|
+
raise("Clone failed for #{repo}, try again in a few minutes.") unless File.exist?(tmpdir)
|
|
41
|
+
|
|
42
|
+
Dir.chdir(tmpdir) do
|
|
43
|
+
puts `git submodule init`.gsub(/^/, '-- ')
|
|
44
|
+
t = time { `git submodule update` }
|
|
45
|
+
puts "-- submodule update in #{t}s"
|
|
46
|
+
end
|
|
47
|
+
|
|
46
48
|
t1 = Time.now
|
|
47
49
|
pid = fork do
|
|
48
50
|
begin
|
|
@@ -83,6 +85,7 @@ post '/' do
|
|
|
83
85
|
spec.validate
|
|
84
86
|
end
|
|
85
87
|
|
|
88
|
+
puts "-- version #{spec.version}"
|
|
86
89
|
payload = Base64.encode64(Zlib::Deflate.deflate(YAML.dump(spec)))
|
|
87
90
|
w.write payload
|
|
88
91
|
w.close
|