aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions
diff options
context:
space:
mode:
authorJack Nagel2014-09-07 16:09:42 -0500
committerJack Nagel2014-09-07 16:09:42 -0500
commit832f88fbc175d0a22bddfacaa8ccfa3734d962c8 (patch)
treee7037b14fc012a7ba64d4fd631b126e49572db3e /Library/Contributions
parent944ac75b2460859151c103efc2b49b31e133e9ec (diff)
downloadbrew-832f88fbc175d0a22bddfacaa8ccfa3734d962c8.tar.bz2
gist-logs: simplify setting the post path
Diffstat (limited to 'Library/Contributions')
-rwxr-xr-xLibrary/Contributions/cmd/brew-gist-logs.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Contributions/cmd/brew-gist-logs.rb b/Library/Contributions/cmd/brew-gist-logs.rb
index bc42302cd..67f7eaea4 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