Skip to content

Commit

Permalink
Support HTTPS_PROXY as well
Browse files Browse the repository at this point in the history
closes defunkt#42
  • Loading branch information
indirect committed May 3, 2011
1 parent 439f184 commit f8e7f43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/gist.rb
Expand Up @@ -26,7 +26,11 @@ module Gist
GIST_URL = 'https://gist.github.com/%s.txt'
CREATE_URL = 'https://gist.github.com/gists'

PROXY = ENV['HTTP_PROXY'] ? URI(ENV['HTTP_PROXY']) : nil
if ENV['HTTPS_PROXY']
PROXY = URI(ENV['HTTPS_PROXY'])
elsif ENV['HTTP_PROXY']
PROXY = URI(ENV['HTTP_PROXY'])
end
PROXY_HOST = PROXY ? PROXY.host : nil
PROXY_PORT = PROXY ? PROXY.port : nil

Expand Down

0 comments on commit f8e7f43

Please sign in to comment.