diff options
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 |