summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAsh McKenzie <ash@the-rebellion.net>2018-07-19 13:36:44 +1000
committerAsh McKenzie <ash@the-rebellion.net>2018-07-20 22:28:58 +1000
commitdd4bd1d7342f6b32e651b84f0f181634f3ac00d4 (patch)
tree06bddee27e16376683abdf5c9e08815e8983a9e2 /lib
parent3042a7213fa9f15bd76ad3f0cd9837d6cdea7007 (diff)
downloadgitlab-shell-dd4bd1d7342f6b32e651b84f0f181634f3ac00d4.tar.gz
Add #base_api_endpoint for re-usability
Diffstat (limited to 'lib')
-rw-r--r--lib/http_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/http_helper.rb b/lib/http_helper.rb
index b1a100e..305df48 100644
--- a/lib/http_helper.rb
+++ b/lib/http_helper.rb
@@ -7,8 +7,12 @@ module HTTPHelper
@config ||= GitlabConfig.new
end
+ def base_api_endpoint
+ "#{config.gitlab_url}/api/v4"
+ end
+
def host
- "#{config.gitlab_url}/api/v4/internal"
+ "#{base_api_endpoint}/internal"
end
def http_client_for(uri, options = {})