summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-04 15:32:40 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-04 15:32:40 +0100
commit8707827d3925441a838ba425e65dfdb8d3845a31 (patch)
treeb7ba6494bd1b421530d83713666f81636f001eab /app/models/project.rb
parent476cba6ff355197ca7137af1fcab74a7d6c776ad (diff)
downloadgitlab-ce-8707827d3925441a838ba425e65dfdb8d3845a31.tar.gz
Improve readablity of CI_API_V4_URL related code
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index d829d976afc..1109cb4383f 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1705,9 +1705,7 @@ class Project < ActiveRecord::Base
def api_variables
Gitlab::Ci::Variables::Collection.new.tap do |variables|
- API::Helpers::Version.new('v4').tap do |version|
- variables.append(key: 'CI_API_V4_URL', value: version.root_url)
- end
+ variables.append(key: 'CI_API_V4_URL', value: API::Helpers::Version.new('v4').root_url)
end
end