panthro 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/panthro +29 -1
  3. data/config.ru +0 -2
  4. data/lib/panthro.rb +3 -0
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b6ca0882f5c2a4939371fcdb73beaf66cb7bc4a
4
- data.tar.gz: 2e1ad21ba987460fcb48bf30be546dccdc206e95
3
+ metadata.gz: a2b51d935324f8c6bc7d5fd5af10b01a9485e4d9
4
+ data.tar.gz: fd5e4c59518fc472b01af20231996b83bb7d5bc8
5
5
  SHA512:
6
- metadata.gz: 8777df6c5e38d3d23945fa985da580fc0a006b80a2432b6fe6a3885afb3cd3b7dad693cda647c7854f4e962beae4c44b401f1a1d98eb3cb5370deb147f639518
7
- data.tar.gz: eccc33f0700039fe343fab9f79f56e568686ad0e0c89168819f187d86c55c71c4339bdb1d63b3ee2075d62936eca276e1b5d78e04ebfb4c26b26e52f8ba687de
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
- `cd #{path} && rackup -D`
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
@@ -2,6 +2,4 @@
2
2
 
3
3
  require File.expand_path( "lib/panthro", File.dirname(__FILE__) )
4
4
 
5
- Panthro.path = "#{ ENV['HOME'] }/.panthro/"
6
- Panthro.mirror = 'http://rubygems.org'
7
5
  run Panthro.new
data/lib/panthro.rb CHANGED
@@ -63,3 +63,6 @@ class Panthro
63
63
  [ 200, {}, [ content ] ]
64
64
  end
65
65
  end
66
+
67
+ Panthro.path = "#{ ENV['HOME'] }/.panthro"
68
+ Panthro.mirror = 'http://rubygems.org'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panthro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaston Ramos