diff options
| author | Ben Muschol | 2017-08-13 15:01:37 -0400 |
|---|---|---|
| committer | Ben Muschol | 2017-08-13 15:03:52 -0400 |
| commit | acf46fce5f08712084dc9454fee66637796055c6 (patch) | |
| tree | f1ce5750f35e3e5d32b002e69cdb9a273d61df8c /Library | |
| parent | e93ec12b32f3449f4669cf53469a4d5308b10cc3 (diff) | |
| download | brew-acf46fce5f08712084dc9454fee66637796055c6.tar.bz2 | |
Rename path_to -> url_to since it returns a url
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/utils/github.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 6f56e505c..c10a8ed0d 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -232,7 +232,7 @@ module GitHub end def repository(user, repo) - open(path_to("repos", user, repo)) + open(url_to("repos", user, repo)) end def search_code(**params) @@ -273,7 +273,7 @@ module GitHub end def private_repo?(full_name) - uri = path_to "repos", full_name + uri = url_to "repos", full_name open(uri) { |json| json["private"] } end @@ -295,12 +295,12 @@ module GitHub "#{key}:#{value}" end - def path_to(*subroutes) + def url_to(*subroutes) URI.parse(File.join(API_URL, *subroutes)) end def search(entity, *queries, **qualifiers) - uri = path_to "search", entity + uri = url_to "search", entity uri.query = query_string(*queries, **qualifiers) open(uri) { |json| json["items"] } end |
