Add http proxy support #24

merged 1 commit into from Feb 20, 2013


None yet

2 participants


Hello, thanks for supporting this useful gem!

This pull request adds http proxy support with this configs:

ga ={ 
    :http_proxy => { :host => '', :port => 8080, :user => 'username', :password => 'password' }

I've tried to add some tests around this feature, i.e. something like:

def test_setting_http_proxy
  ga =!(:http_proxy => { host: "", port: "8080", user: "user", password: "password" }))
  http = ga.instance_variable_get('@http')
  assert http.proxy_host == "", "proxy_host should be ''"
  assert http.proxy_port == "8080", "proxy_port should be '8080'"
  assert http.proxy_user == "user", "proxy_user should be 'user'"
  assert http.proxy_pass == "password", "proxy_user should be 'password'"

but since starts real http connection this approach didn't really work out.. so I left out the tests for now, but the code is very simple and i've tested it manually in couple environments.

Mikhail Topolskiy Add http proxy support 42d3c9c
@chrisle chrisle merged commit bb99363 into chrisle:master Feb 20, 2013
chrisle commented Feb 20, 2013

Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment