diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-03-13 14:12:00 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-03-13 14:12:00 +0100 |
commit | e16fba6726adcf7e82862336fab22c6c6baf2010 (patch) | |
tree | e4fc892dfa5e06cf4f5e8852b22663f3b091ebbe /lib | |
parent | 937e7f9e9669d4939cd6c5055a90339ff79d216b (diff) | |
download | gitlab-ce-e16fba6726adcf7e82862336fab22c6c6baf2010.tar.gz |
Improve how we handle persistent runner variables
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/variables/collection/item.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb index 47e06566607..939912981e6 100644 --- a/lib/gitlab/ci/variables/collection/item.rb +++ b/lib/gitlab/ci/variables/collection/item.rb @@ -3,8 +3,6 @@ module Gitlab module Variables class Collection class Item - # TODO, public by default? - # def initialize(**options) @variable = { key: options.fetch(:key), @@ -34,17 +32,11 @@ module Gitlab end def self.fabricate(resource) - # TODO, to_runner_variable by default for class < ActiveRecord::Base - # case resource when Hash self.new(resource) - when ::Ci::Variable - self.new(resource.to_hash) - when ::Ci::PipelineVariable - self.new(resource.to_hash) - when ::Ci::GroupVariable - self.new(resource.to_hash) + when ::HasVariable + self.new(resource.to_runner_variable) when self resource.dup else |