Permalink
Browse files

Support HTTPS_PROXY as well

closes #42
  • Loading branch information...
1 parent 439f184 commit f8e7f43cdeff608cfc5fdf555021b474efbc603f @indirect indirect committed May 3, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/gist.rb
View
@@ -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

0 comments on commit f8e7f43

Please sign in to comment.