Commit 5b296f81 authored by Maxim Rydkin's avatar Maxim Rydkin

move `lib/ci/mask_secret.rb` into `lib/gitlab/ci/mask_secret.rb`

parent c45ace89
......@@ -446,8 +446,8 @@ module Ci
return unless trace
trace = trace.dup
Ci::MaskSecret.mask!(trace, project.runners_token) if project
Ci::MaskSecret.mask!(trace, token)
Gitlab::Ci::MaskSecret.mask!(trace, project.runners_token) if project
Gitlab::Ci::MaskSecret.mask!(trace, token)
trace
end
......
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
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
require 'spec_helper'
describe Ci::MaskSecret do
describe Gitlab::Ci::MaskSecret do
subject { described_class }
describe '#mask' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment