From c9c31a3f41a3ca3edbb2d70d5265ece74405ad4a Mon Sep 17 00:00:00 2001 From: Terence Lee Date: Tue, 18 Sep 2012 22:25:35 +0300 Subject: [PATCH] use the API_TIMEOUT constant --- lib/bundler/fetcher.rb | 2 +- spec/install/gems/dependency_api_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb index 120624b9dfb..e5cba0db625 100644 --- a/lib/bundler/fetcher.rb +++ b/lib/bundler/fetcher.rb @@ -46,7 +46,7 @@ def initialize(remote_uri) @remote_uri = remote_uri @has_api = true # will be set to false if the rubygems index is ever fetched @@connection ||= Net::HTTP::Persistent.new nil, :ENV - @@connection.read_timeout = 1 + @@connection.read_timeout = API_TIMEOUT end # fetch a gem specification diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb index 75b5f29b651..334ff4e4c9c 100644 --- a/spec/install/gems/dependency_api_spec.rb +++ b/spec/install/gems/dependency_api_spec.rb @@ -183,7 +183,7 @@ # ensure server is started require 'timeout' - Timeout.timeout(10) { sleep(0.1) until @t.status == "sleep" } + Timeout.timeout(15) { sleep(0.1) until @t.status == "sleep" } end after do