Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-17 12:09:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-17 12:09:27 +0300
commit5f4d643165631ea503b8aa1e9abbecc8341c39c6 (patch)
tree41c32e3a97a8992d44fd143a26e236a72df7fee9 /app/finders
parent7730c140895bcf341d070c57a61326a182f084c6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/ci/variables_finder.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/finders/ci/variables_finder.rb b/app/finders/ci/variables_finder.rb
index d933643ffb2..3e61127ff5b 100644
--- a/app/finders/ci/variables_finder.rb
+++ b/app/finders/ci/variables_finder.rb
@@ -2,16 +2,14 @@
module Ci
class VariablesFinder
- attr_reader :project, :params
-
- def initialize(project, params)
- @project, @params = project, params
+ def initialize(resource, params)
+ @resource, @params = resource, params
raise ArgumentError, 'Please provide params[:key]' if params[:key].blank?
end
def execute
- variables = project.variables
+ variables = resource.variables
variables = by_key(variables)
variables = by_environment_scope(variables)
variables
@@ -19,6 +17,8 @@ module Ci
private
+ attr_reader :resource, :params
+
def by_key(variables)
variables.by_key(params[:key])
end