From e16fba6726adcf7e82862336fab22c6c6baf2010 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 13 Mar 2018 14:12:00 +0100 Subject: Improve how we handle persistent runner variables --- app/models/ci/variable.rb | 4 ---- app/models/concerns/has_variable.rb | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'app/models') diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb index 51389fb82bf..7c71291de84 100644 --- a/app/models/ci/variable.rb +++ b/app/models/ci/variable.rb @@ -12,9 +12,5 @@ module Ci } scope :unprotected, -> { where(protected: false) } - - def to_hash - { key: key, value: value, public: false } - end end end diff --git a/app/models/concerns/has_variable.rb b/app/models/concerns/has_variable.rb index 3c29e12ad71..8a241e4374a 100644 --- a/app/models/concerns/has_variable.rb +++ b/app/models/concerns/has_variable.rb @@ -20,12 +20,8 @@ module HasVariable super(new_key.to_s.strip) end - def to_hash - { key: key, value: value, public: false } - end - def to_runner_variable - to_hash + { key: key, value: value, public: false } end end end -- cgit v1.2.1