diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 15:09:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 15:09:13 +0300 |
commit | 1363ca12f1f07c634647cf55c4c16b7401098673 (patch) | |
tree | d932caf09c8148322edb51ae954ed159ff7d00f8 /app/models/concerns/maskable.rb | |
parent | 6763d2787670bc03a36a8eb601703e88fc70dece (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/maskable.rb')
-rw-r--r-- | app/models/concerns/maskable.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/app/models/concerns/maskable.rb b/app/models/concerns/maskable.rb deleted file mode 100644 index d70e47bc4ff..00000000000 --- a/app/models/concerns/maskable.rb +++ /dev/null @@ -1,23 +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 - # * Characters must be from the Base64 alphabet (RFC4648) with the addition of @ and : - # * Absolutely no fun is allowed - REGEX = /\A[a-zA-Z0-9_+=\/@:-]{8,}\z/.freeze - - 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 |