From 832f88fbc175d0a22bddfacaa8ccfa3734d962c8 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 7 Sep 2014 16:09:42 -0500 Subject: [PATCH] gist-logs: simplify setting the post path --- Library/Contributions/cmd/brew-gist-logs.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Contributions/cmd/brew-gist-logs.rb b/Library/Contributions/cmd/brew-gist-logs.rb index bc42302cda..67f7eaea43 100755 --- a/Library/Contributions/cmd/brew-gist-logs.rb +++ b/Library/Contributions/cmd/brew-gist-logs.rb @@ -48,11 +48,11 @@ def append_doctor files end def create_gist files - post('gists', {'public' => true, 'files' => files})['html_url'] + post("/gists", "public" => true, "files" => files)["html_url"] end def new_issue repo, title, body - post("repos/#{repo}/issues", {'title' => title, 'body' => body})['html_url'] + post("/repos/#{repo}/issues", "title" => title, "body" => body)["html_url"] end def http @@ -70,7 +70,7 @@ def http end def post path, data - request = Net::HTTP::Post.new("/#{path}") + request = Net::HTTP::Post.new(path) request['User-Agent'] = HOMEBREW_USER_AGENT request['Content-Type'] = 'application/json' if HOMEBREW_GITHUB_API_TOKEN