Skip to content

Commit

Permalink
don't actually need USE_PERSISTENT
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Mar 7, 2013
1 parent 098360f commit ec49087
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lib/bundler/fetcher.rb
Expand Up @@ -59,8 +59,8 @@ def initialize(remote_uri)
@remote_uri = remote_uri
@public_uri = remote_uri.dup
@public_uri.user, @public_uri.password = nil, nil # don't print these
if USE_PERSISTENT
@connection ||= Net::HTTP::Persistent.new 'bundler', :ENV
if defined?(OpenSSL::SSL)
@connection = Net::HTTP::Persistent.new 'bundler', :ENV
else
if @remote_uri.scheme == "https"
raise Bundler::HTTPError, "Could not load OpenSSL.\n" \
Expand Down Expand Up @@ -191,7 +191,7 @@ def fetch(uri, counter = 0)

begin
Bundler.ui.debug "Fetching from: #{uri}"
if USE_PERSISTENT
if @connection.is_a?(Net::HTTP::Persistent)
response = @connection.request(uri)
else
req = Net::HTTP::Get.new uri.request_uri
Expand Down
5 changes: 0 additions & 5 deletions lib/bundler/vendored_persistent.rb
Expand Up @@ -5,11 +5,6 @@
vendor = File.expand_path('../vendor', __FILE__)
$:.unshift(vendor) unless $:.include?(vendor)
require 'net/http/persistent'

USE_PERSISTENT = true

rescue LoadError, NameError => e
require 'net/http'
USE_PERSISTENT = false

end

0 comments on commit ec49087

Please sign in to comment.