Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
5b296f81
Commit
5b296f81
authored
Sep 06, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move `lib/ci/mask_secret.rb` into `lib/gitlab/ci/mask_secret.rb`
parent
c45ace89
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
13 deletions
+15
-13
app/models/ci/build.rb
app/models/ci/build.rb
+2
-2
lib/ci/assets/.gitkeep
lib/ci/assets/.gitkeep
+0
-0
lib/ci/mask_secret.rb
lib/ci/mask_secret.rb
+0
-10
lib/gitlab/ci/mask_secret.rb
lib/gitlab/ci/mask_secret.rb
+12
-0
spec/lib/gitlab/ci/mask_secret_spec.rb
spec/lib/gitlab/ci/mask_secret_spec.rb
+1
-1
No files found.
app/models/ci/build.rb
View file @
5b296f81
...
@@ -446,8 +446,8 @@ module Ci
...
@@ -446,8 +446,8 @@ module Ci
return
unless
trace
return
unless
trace
trace
=
trace
.
dup
trace
=
trace
.
dup
Ci
::
MaskSecret
.
mask!
(
trace
,
project
.
runners_token
)
if
project
Gitlab
::
Ci
::
MaskSecret
.
mask!
(
trace
,
project
.
runners_token
)
if
project
Ci
::
MaskSecret
.
mask!
(
trace
,
token
)
Gitlab
::
Ci
::
MaskSecret
.
mask!
(
trace
,
token
)
trace
trace
end
end
...
...
lib/ci/assets/.gitkeep
deleted
100644 → 0
View file @
c45ace89
lib/ci/mask_secret.rb
deleted
100644 → 0
View file @
c45ace89
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
lib/gitlab/ci/mask_secret.rb
0 → 100644
View file @
5b296f81
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
spec/lib/ci/mask_secret_spec.rb
→
spec/lib/
gitlab/
ci/mask_secret_spec.rb
View file @
5b296f81
require
'spec_helper'
require
'spec_helper'
describe
Ci
::
MaskSecret
do
describe
Gitlab
::
Ci
::
MaskSecret
do
subject
{
described_class
}
subject
{
described_class
}
describe
'#mask'
do
describe
'#mask'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment