lib/geminabox/proxy/hostess.rb in geminabox-0.12.0 vs lib/geminabox/proxy/hostess.rb in geminabox-0.12.1
- old
+ new
@@ -1,6 +1,7 @@
require 'sinatra/base'
+require 'net/http'
module Geminabox
module Proxy
class Hostess < Sinatra::Base
attr_accessor :file_handler
@@ -56,10 +57,10 @@
def get_from_rubygems_if_not_local
file = File.expand_path(File.join(Server.data, *request.path_info))
unless File.exists?(file)
- Net::HTTP.start("production.cf.rubygems.org") do |http|
+ ::Net::HTTP.start("production.cf.rubygems.org") do |http|
path = File.join(*request.path_info)
response = http.get(path)
GemStore.create(IncomingGem.new(StringIO.new(response.body)))
end
end