summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/group_variable.rb1
-rw-r--r--app/models/ci/variable.rb1
-rw-r--r--app/models/concerns/has_variable.rb6
-rw-r--r--app/models/concerns/maskable.rb22
4 files changed, 3 insertions, 27 deletions
diff --git a/app/models/ci/group_variable.rb b/app/models/ci/group_variable.rb
index 323ff560564..492d1d0329e 100644
--- a/app/models/ci/group_variable.rb
+++ b/app/models/ci/group_variable.rb
@@ -5,7 +5,6 @@ module Ci
extend Gitlab::Ci::Model
include HasVariable
include Presentable
- include Maskable
belongs_to :group, class_name: "::Group"
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb
index 64836ea4fa4..524d79014f8 100644
--- a/app/models/ci/variable.rb
+++ b/app/models/ci/variable.rb
@@ -5,7 +5,6 @@ module Ci
extend Gitlab::Ci::Model
include HasVariable
include Presentable
- include Maskable
belongs_to :project
diff --git a/app/models/concerns/has_variable.rb b/app/models/concerns/has_variable.rb
index 2ec42a1029b..dfbe413a878 100644
--- a/app/models/concerns/has_variable.rb
+++ b/app/models/concerns/has_variable.rb
@@ -21,9 +21,9 @@ module HasVariable
def key=(new_key)
super(new_key.to_s.strip)
end
- end
- def to_runner_variable
- { key: key, value: value, public: false }
+ def to_runner_variable
+ { key: key, value: value, public: false }
+ end
end
end
diff --git a/app/models/concerns/maskable.rb b/app/models/concerns/maskable.rb
deleted file mode 100644
index 8793f0ec965..00000000000
--- a/app/models/concerns/maskable.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-module Maskable
- extend ActiveSupport::Concern
-
- # * Single line
- # * No escape characters
- # * No variables
- # * No spaces
- # * Minimal length of 8 characters
- # * Absolutely no fun is allowed
- REGEX = /\A\w{8,}\z/
-
- included do
- validates :masked, inclusion: { in: [true, false] }
- validates :value, format: { with: REGEX }, if: :masked?
- end
-
- def to_runner_variable
- super.merge(masked: masked?)
- end
-end