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

This commit is contained in:
Maxim Rydkin 2017-09-06 14:26:15 +03:00
parent c45ace8972
commit 5b296f81e2
No known key found for this signature in database
GPG key ID: B7BCD8B7C2B9E3B3
5 changed files with 15 additions and 13 deletions

View file

@ -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

View file

View file

@ -1,10 +0,0 @@
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

View file

@ -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

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Ci::MaskSecret do
describe Gitlab::Ci::MaskSecret do
subject { described_class }
describe '#mask' do