Skip to content

Commit

Permalink
Change the param order for get, to make it similar to Net::HTTP.get
Browse files Browse the repository at this point in the history
  • Loading branch information
pcasaretto committed Jun 12, 2012
1 parent 307fe2f commit 9e2a0e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tor/http.rb
Expand Up @@ -5,7 +5,7 @@ module Tor

class HTTP

def self.get(host, port = 80, path = "/")
def self.get(host, path = "/", port = 80)
res = ""
Net::HTTP.SOCKSProxy(Tor.configuration.ip, Tor.configuration.port).start(host, port) do |http|
res = http.get(path)
Expand Down
2 changes: 1 addition & 1 deletion spec/http_spec.rb
Expand Up @@ -10,7 +10,7 @@
end

it "makes a HTTP request to Google" do
res = Tor::HTTP.get("google.com", 80, "/")
res = Tor::HTTP.get("google.com", "/", 80)
res.code.should eq("301")
end

Expand Down

0 comments on commit 9e2a0e6

Please sign in to comment.