summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-03 14:09:53 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-03 14:18:05 +0100
commit476cba6ff355197ca7137af1fcab74a7d6c776ad (patch)
treeb3792dd6860fc83a719bd88c1d42242fa33ea39f
parent5e99a077ec05d970e6102dac7a0dc0cfa98a04e6 (diff)
downloadgitlab-ce-feature/gb/expose-ci-api-url-variable.tar.gz
Minor improvements to CI_API_V4_URL variable exposurefeature/gb/expose-ci-api-url-variable
-rw-r--r--changelogs/unreleased/feature-gb-expose-ci-api-url-variable.yml2
-rw-r--r--lib/api/helpers/version.rb2
-rw-r--r--spec/models/project_spec.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/changelogs/unreleased/feature-gb-expose-ci-api-url-variable.yml b/changelogs/unreleased/feature-gb-expose-ci-api-url-variable.yml
index 0b7fffa70d4..19dc615c5f8 100644
--- a/changelogs/unreleased/feature-gb-expose-ci-api-url-variable.yml
+++ b/changelogs/unreleased/feature-gb-expose-ci-api-url-variable.yml
@@ -1,5 +1,5 @@
---
-title: Expose CI/CD predefined variable
+title: Expose CI/CD predefined variable `CI_API_V4_URL`
merge_request: 23936
author:
type: added
diff --git a/lib/api/helpers/version.rb b/lib/api/helpers/version.rb
index 0068002003e..a322d99e9aa 100644
--- a/lib/api/helpers/version.rb
+++ b/lib/api/helpers/version.rb
@@ -18,7 +18,7 @@ module API
end
def root_url
- expose_url(root_path)
+ @root_url ||= expose_url(root_path)
end
def to_s
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 9c098af7c56..c1186a00d4e 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -3504,7 +3504,7 @@ describe Project do
expect(project.api_variables.first[:value]).to include '/api/v4'
end
- it 'contains an URL variable for every supported API version' do
+ it 'contains a URL variable for every supported API version' do
supported_versions = API::API.versions.select do |version|
API::API.routes.select { |route| route.version == version }.many?
end