Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
476cba6f
Commit
476cba6f
authored
Jan 03, 2019
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor improvements to CI_API_V4_URL variable exposure
parent
5e99a077
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
changelogs/unreleased/feature-gb-expose-ci-api-url-variable.yml
...logs/unreleased/feature-gb-expose-ci-api-url-variable.yml
+1
-1
lib/api/helpers/version.rb
lib/api/helpers/version.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
No files found.
changelogs/unreleased/feature-gb-expose-ci-api-url-variable.yml
View file @
476cba6f
---
---
title
:
Expose CI/CD predefined variable
title
:
Expose CI/CD predefined variable
`CI_API_V4_URL`
merge_request
:
23936
merge_request
:
23936
author
:
author
:
type
:
added
type
:
added
lib/api/helpers/version.rb
View file @
476cba6f
...
@@ -18,7 +18,7 @@ module API
...
@@ -18,7 +18,7 @@ module API
end
end
def
root_url
def
root_url
expose_url
(
root_path
)
@root_url
||=
expose_url
(
root_path
)
end
end
def
to_s
def
to_s
...
...
spec/models/project_spec.rb
View file @
476cba6f
...
@@ -3504,7 +3504,7 @@ describe Project do
...
@@ -3504,7 +3504,7 @@ describe Project do
expect
(
project
.
api_variables
.
first
[
:value
]).
to
include
'/api/v4'
expect
(
project
.
api_variables
.
first
[
:value
]).
to
include
'/api/v4'
end
end
it
'contains a
n
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
|
supported_versions
=
API
::
API
.
versions
.
select
do
|
version
|
API
::
API
.
routes
.
select
{
|
route
|
route
.
version
==
version
}.
many?
API
::
API
.
routes
.
select
{
|
route
|
route
.
version
==
version
}.
many?
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment