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.
- data/lib/hostess/app.rb +11 -1
- data/private_event.gemspec +1 -1
- metadata +3 -3
data/lib/hostess/app.rb
CHANGED
@@ -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
|
-
|
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
|
data/private_event.gemspec
CHANGED
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tom Bombadil
|