Permalink
Browse files

Cleanup api_url/url handling

  • Loading branch information...
1 parent 26a9db0 commit 7dc67546e8292d914f6e4cedd3296e11208d1c12 @r4um r4um committed Nov 22, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/github-hooker.rb
View
7 lib/github-hooker.rb
@@ -24,11 +24,8 @@ def self.delete_hook(repo, hook)
end
def self.github_api(method, path, options={})
- url = "https://api.github.com" + path
-
- if Github::Hooker::Config.config["api_url"]
- url = "#{Github::Hooker::Config.config["api_url"]}" + path
- end
+ github_url = Github::Hooker::Config.config.fetch("api_url", "https://api.github.com")
+ url = github_url + path
options.reverse_merge!(
:method => method,

0 comments on commit 7dc6754

Please sign in to comment.