diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-09-06 14:26:15 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-09-12 22:32:02 +0300 |
commit | 5b296f81e2f49fc7dc2d3b091340a9a8b86eae97 (patch) | |
tree | f2a1681807ed6cb937ce41d038f435a949f363f4 /lib/gitlab | |
parent | c45ace8972f18af1f232f9074d6e4104fc4f0c14 (diff) | |
download | gitlab-ce-5b296f81e2f49fc7dc2d3b091340a9a8b86eae97.tar.gz |
move `lib/ci/mask_secret.rb` into `lib/gitlab/ci/mask_secret.rb`
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/ci/mask_secret.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/gitlab/ci/mask_secret.rb b/lib/gitlab/ci/mask_secret.rb new file mode 100644 index 00000000000..0daddaa638c --- /dev/null +++ b/lib/gitlab/ci/mask_secret.rb @@ -0,0 +1,12 @@ +module Gitlab + module Ci::MaskSecret + class << self + def mask!(value, token) + return value unless value.present? && token.present? + + value.gsub!(token, 'x' * token.length) + value + end + end + end +end |