diff options
author | Terence Lee <hone02@gmail.com> | 2012-09-18 22:25:35 +0300 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2012-09-18 23:07:38 +0300 |
commit | c9c31a3f41a3ca3edbb2d70d5265ece74405ad4a (patch) | |
tree | 9250a37bbe54690c4908d3d7984d9b83c8d8d845 | |
parent | 6e9939d1c0041e5abb35e83eadaf56135e011141 (diff) | |
download | bundler-c9c31a3f41a3ca3edbb2d70d5265ece74405ad4a.tar.gz |
use the API_TIMEOUT constant
-rw-r--r-- | lib/bundler/fetcher.rb | 2 | ||||
-rw-r--r-- | 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 120624b9df..e5cba0db62 100644 --- a/lib/bundler/fetcher.rb +++ b/lib/bundler/fetcher.rb @@ -46,7 +46,7 @@ module Bundler @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 75b5f29b65..334ff4e4c9 100644 --- a/spec/install/gems/dependency_api_spec.rb +++ b/spec/install/gems/dependency_api_spec.rb @@ -183,7 +183,7 @@ describe "gemcutter's dependency API" do # 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 |