tomo.****@gmail*****
tomo.****@gmail*****
Sat Mar 26 16:12:18 JST 2016
tomo.****@gmail***** 2016-03-26 16:12:18 +0900 (Sat, 26 Mar 2016) New Revision: bb6540ce4cfc53bf66f66b2b8c51c633bdae7b31 https://github.com/ranguba/rroonga/commit/bb6540ce4cfc53bf66f66b2b8c51c633bdae7b31 Merged 0956fad: Merge pull request #129 from ngram/fix-installation Message: fix installation failure with http authentication Modified files: ext/groonga/extconf.rb Modified: ext/groonga/extconf.rb (+14 -1) =================================================================== --- ext/groonga/extconf.rb 2016-03-23 23:32:33 +0900 (3d09bdb) +++ ext/groonga/extconf.rb 2016-03-26 16:12:18 +0900 (4ba9d54) @@ -21,6 +21,7 @@ require "mkmf" require "fileutils" require "shellwords" require "open-uri" +require "uri" require "pkg-config" @@ -83,7 +84,19 @@ def download(url) if File.exist?(base_name) message(" skip (use downloaded file)\n") else - open(url, "rb") do |input| + + proxy_str = ENV['http_proxy'] + if proxy_str + proxy_info = URI.parse(proxy_str) + end + options = {} + if proxy_info + if proxy_info.user + options = {:proxy_http_basic_authentication => [proxy_info, proxy_info.user, proxy_info.password]} + end + end + + open(url, "rb", options) do |input| File.open(base_name, "wb") do |output| while (buffer = input.read(1024)) output.print(buffer) -------------- next part -------------- An HTML attachment was scrubbed... 下载