{"action":"created","issue":{"url":"https://api.github.com/repos/berkshelf/berkshelf/issues/1532","repository_url":"https://api.github.com/repos/berkshelf/berkshelf","labels_url":"https://api.github.com/repos/berkshelf/berkshelf/issues/1532/labels{/name}","comments_url":"https://api.github.com/repos/berkshelf/berkshelf/issues/1532/comments","events_url":"https://api.github.com/repos/berkshelf/berkshelf/issues/1532/events","html_url":"https://github.com/berkshelf/berkshelf/pull/1532","id":140013498,"number":1532,"title":"Correct usage of Net::HTTP.new","user":{"login":"xeron","id":110569,"avatar_url":"https://avatars.githubusercontent.com/u/110569?v=3","gravatar_id":"","url":"https://api.github.com/users/xeron","html_url":"https://github.com/xeron","followers_url":"https://api.github.com/users/xeron/followers","following_url":"https://api.github.com/users/xeron/following{/other_user}","gists_url":"https://api.github.com/users/xeron/gists{/gist_id}","starred_url":"https://api.github.com/users/xeron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeron/subscriptions","organizations_url":"https://api.github.com/users/xeron/orgs","repos_url":"https://api.github.com/users/xeron/repos","events_url":"https://api.github.com/users/xeron/events{/privacy}","received_events_url":"https://api.github.com/users/xeron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-10T21:25:37Z","updated_at":"2016-03-10T21:32:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/berkshelf/berkshelf/pulls/1532","html_url":"https://github.com/berkshelf/berkshelf/pull/1532","diff_url":"https://github.com/berkshelf/berkshelf/pull/1532.diff","patch_url":"https://github.com/berkshelf/berkshelf/pull/1532.patch"},"body":"Related to this change: https://github.com/berkshelf/berkshelf/pull/1467\r\n\r\n`Net::HTTP.new` doesn't accept `use_ssl` and `verify_mode` attributes.\r\n\r\nso it results in an error:\r\n\r\n```\r\nE, [2016-03-10T11:42:05.846034 #11863] ERROR -- : Actor crashed!\r\nNoMethodError: undefined method `to_i' for {:use_ssl=>true, :verify_mode=>1}:Hash\r\n```\r\n\r\nbecause this hash `{:use_ssl=>true, :verify_mode=>1}` goes to Net::HTTP internal `port` variables.\r\n\r\nThis PR fixes this issue by setting `http.use_ssl` and `http.verify_mode` using correct methods."},"comment":{"url":"https://api.github.com/repos/berkshelf/berkshelf/issues/comments/195058612","html_url":"https://github.com/berkshelf/berkshelf/pull/1532#issuecomment-195058612","issue_url":"https://api.github.com/repos/berkshelf/berkshelf/issues/1532","id":195058612,"user":{"login":"xeron","id":110569,"avatar_url":"https://avatars.githubusercontent.com/u/110569?v=3","gravatar_id":"","url":"https://api.github.com/users/xeron","html_url":"https://github.com/xeron","followers_url":"https://api.github.com/users/xeron/followers","following_url":"https://api.github.com/users/xeron/following{/other_user}","gists_url":"https://api.github.com/users/xeron/gists{/gist_id}","starred_url":"https://api.github.com/users/xeron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeron/subscriptions","organizations_url":"https://api.github.com/users/xeron/orgs","repos_url":"https://api.github.com/users/xeron/repos","events_url":"https://api.github.com/users/xeron/events{/privacy}","received_events_url":"https://api.github.com/users/xeron/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T21:32:40Z","updated_at":"2016-03-10T21:32:40Z","body":"And may be we should add `p_addr = :ENV` attribute to force `HTTP_PROXY` environment variables support? What do you think?\r\n\r\nSo it will be something like:\r\n```\r\nhttp = Net::HTTP.new(url.host, url.port, p_addr = :ENV)\r\n```"}}