panthro 0.0.4 → 0.0.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 +4 -4
- data/bin/panthro +29 -1
- data/config.ru +0 -2
- data/lib/panthro.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2b51d935324f8c6bc7d5fd5af10b01a9485e4d9
|
4
|
+
data.tar.gz: fd5e4c59518fc472b01af20231996b83bb7d5bc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db4b83f581a21a5a0e07244f42e7f61c111e9ae450a6f5b938a1b86c02258e0ba3470d1867fb3eb2eede4888f12bf14281666271687fa3f81d0a0986595e9260
|
7
|
+
data.tar.gz: 428c34a9d21eedecb27ecfa485438fe0381644d7ad04aabc577abad7af94f125925ed644da430e591e60be4879aeab74b42da115423375223de550103bf2df49
|
data/bin/panthro
CHANGED
@@ -1,3 +1,31 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
help = <<EOS
|
3
|
+
PANTHRO(1)
|
4
|
+
|
5
|
+
NAME
|
6
|
+
panthro -- The rubygems proxy cache
|
7
|
+
|
8
|
+
SYNOPSYS
|
9
|
+
panthro [--start | --stop]
|
10
|
+
|
11
|
+
DESCRIPTION
|
12
|
+
The idea is to speed up the gem command caching gem and spec files. Rubygems proxy cache Is a rack app that cache static files into a local machine, where is runing. Is does not cache /api calls.
|
13
|
+
EOS
|
14
|
+
|
2
15
|
path = File.expand_path '../../', __FILE__
|
3
|
-
|
16
|
+
require "#{path}/lib/panthro"
|
17
|
+
|
18
|
+
pid_file = "#{Panthro.path}/rack.pid"
|
19
|
+
|
20
|
+
case ARGV[0]
|
21
|
+
when '--start'
|
22
|
+
puts "Starting panthro server..."
|
23
|
+
`cd #{path} && rackup --daemonize --pid #{pid_file}`
|
24
|
+
when '--stop'
|
25
|
+
puts "Stopping panthro server..."
|
26
|
+
pid = File.read(pid_file).to_i
|
27
|
+
Process.kill 9, pid
|
28
|
+
File.delete pid_file
|
29
|
+
else
|
30
|
+
puts help
|
31
|
+
end
|
data/config.ru
CHANGED
data/lib/panthro.rb
CHANGED