private_event 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,20 @@
1
+ require 'open-uri'
2
+
1
3
  module Hostess
2
4
  class App < Sinatra::Base
3
5
  enable :raise_errors
4
6
  disable :show_exceptions
5
7
 
6
8
  def serve
7
- send_file(File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'server', 'repo', request.path_info)))
9
+ fname = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'server', 'repo', request.path_info))
10
+ if File.exists? fname
11
+ puts "serving #{fname} from disk"
12
+ send_file fname
13
+ else
14
+ puts "couldnt find #{fname}"
15
+ puts "fetching #{request.path_info} from http://rubygems.org"
16
+ URI.parse("http://rubygems.org#{request.path_info}").read
17
+ end
8
18
  end
9
19
 
10
20
  %w[/specs.4.8.gz
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'private_event'
3
- s.version = '0.0.4'
3
+ s.version = '0.0.5'
4
4
  s.date = '2011-12-26'
5
5
 
6
6
  s.summary = "Gem hosting and indexing, extracted from the rubygems.org repo"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: private_event
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Bombadil