fixed bug in each_with_object

This commit is contained in:
Andrew Waage 2016-05-31 17:45:45 -07:00 committed by Olle Jonsson
parent ef9867c122
commit 2405b4fb3c

View File

@ -268,6 +268,7 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
rescue Octokit::Forbidden => e rescue Octokit::Forbidden => e
Helper.log.warn e.message.red Helper.log.warn e.message.red
Helper.log.warn GH_RATE_LIMIT_EXCEEDED_MSG.yellow Helper.log.warn GH_RATE_LIMIT_EXCEEDED_MSG.yellow
Helper.log.warn @client.rate_limit
end end
value value
end end
@ -306,7 +307,7 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
# @param [String] uri eg. https://api.github.com/repositories/43914960/tags?page=37&foo=1 # @param [String] uri eg. https://api.github.com/repositories/43914960/tags?page=37&foo=1
# @return [Hash] of all GET variables. eg. { 'page' => 37, 'foo' => 1 } # @return [Hash] of all GET variables. eg. { 'page' => 37, 'foo' => 1 }
def parse_url_for_vars(uri) def parse_url_for_vars(uri)
URI(uri).query.split("&").each_with_object({}) do |params, get_var| URI(uri).query.split("&").each_with_object({}) do |get_var, params|
k, v = get_var.split("=") k, v = get_var.split("=")
params[k] = v params[k] = v
params params