summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-12 15:09:19 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-12 15:09:19 +0100
commita4a29e2ee1970d939a8b9ea9853261120c2eff3d (patch)
tree2bc2413f1a8d4ae3cf38e103957a054ff758ad03
parentb94db067b7d748418cdf27a49e49c1bf175b7dc8 (diff)
downloadgitlab-ce-a4a29e2ee1970d939a8b9ea9853261120c2eff3d.tar.gz
Add TODOs to refactoried variables collections code
-rw-r--r--lib/gitlab/ci/variables/collection.rb1
-rw-r--r--lib/gitlab/ci/variables/collection/item.rb4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/ci/variables/collection.rb b/lib/gitlab/ci/variables/collection.rb
index ae7415fcdb1..97ca6dc3d3d 100644
--- a/lib/gitlab/ci/variables/collection.rb
+++ b/lib/gitlab/ci/variables/collection.rb
@@ -14,6 +14,7 @@ module Gitlab
@variables.append(Collection::Item.fabricate(resource))
end
+ # TODO, specs
def concat(resources)
resources.each { |variable| self.append(variable) }
end
diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb
index c238ac8f18e..d6540e86fc5 100644
--- a/lib/gitlab/ci/variables/collection/item.rb
+++ b/lib/gitlab/ci/variables/collection/item.rb
@@ -3,6 +3,8 @@ module Gitlab
module Variables
class Collection
class Item
+ # TODO, public by default?
+ #
def initialize(**options)
@variable = {
key: options.fetch(:key),
@@ -28,6 +30,8 @@ module Gitlab
end
def self.fabricate(resource)
+ # TODO, to_runner_variable by default for class < ActiveRecord::Base
+ #
case resource
when Hash
self.new(resource)