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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e461650f
Commit
e461650f
authored
May 23, 2018
by
Jacob Schatz
Committed by
Micaël Bergeron
Jun 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests.
parent
1481e45b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
ee/lib/pseudonymity/table.rb
ee/lib/pseudonymity/table.rb
+3
-2
ee/spec/lib/gitlab/pseudonymity_spec.rb
ee/spec/lib/gitlab/pseudonymity_spec.rb
+2
-2
No files found.
ee/lib/pseudonymity/table.rb
View file @
e461650f
...
@@ -44,12 +44,13 @@ module Pseudonymity
...
@@ -44,12 +44,13 @@ module Pseudonymity
raise
"No such directory
#{
@csv_output
}
"
raise
"No such directory
#{
@csv_output
}
"
end
end
tables
.
each
do
|
k
,
v
|
new_tables
=
tables
.
map
do
|
k
,
v
|
@schema
[
k
]
=
{}
@schema
[
k
]
=
{}
table_to_csv
(
k
,
v
[
"whitelist"
],
v
[
"pseudo"
])
table_to_csv
(
k
,
v
[
"whitelist"
],
v
[
"pseudo"
])
end
end
schema_to_yml
schema_to_yml
file_list_to_json
file_list_to_json
new_tables
end
end
def
get_and_log_file_name
(
ext
,
prefix
=
nil
,
filename
=
nil
)
def
get_and_log_file_name
(
ext
,
prefix
=
nil
,
filename
=
nil
)
...
@@ -102,7 +103,7 @@ module Pseudonymity
...
@@ -102,7 +103,7 @@ module Pseudonymity
end
end
def
parse_config
def
parse_config
@config
=
YAML
.
load_file
(
Rails
.
root
.
join
(
'lib/assets/pseudonymity_dump.yml'
))
@config
=
YAML
.
load_file
(
Rails
.
root
.
join
(
'
./ee/
lib/assets/pseudonymity_dump.yml'
))
end
end
def
write_to_csv_file
(
title
,
contents
)
def
write_to_csv_file
(
title
,
contents
)
...
...
ee/spec/lib/gitlab/pseudonymity_spec.rb
View file @
e461650f
...
@@ -24,12 +24,12 @@ describe Gitlab::Pseudonymity do
...
@@ -24,12 +24,12 @@ describe Gitlab::Pseudonymity do
# grab the first table it outputs. There would only be 1.
# grab the first table it outputs. There would only be 1.
project_table_file
=
pseudo
.
tables_to_csv
[
0
]
project_table_file
=
pseudo
.
tables_to_csv
[
0
]
# Ignore the `.` and `..` in the directory.
# Ignore the `.` and `..` in the directory.
entry
=
Dir
.
entries
(
base_dir
)[
2
]
entry
=
Dir
.
entries
(
base_dir
)[
2
]
expect
(
project_table_file
.
include?
"projects_"
).
to
be
true
expect
(
project_table_file
.
include?
"projects_"
).
to
be
true
expect
(
project_table_file
.
include?
".csv"
).
to
be
true
expect
(
project_table_file
.
include?
".csv"
).
to
be
true
expect
(
project_table_file
.
include?
entry
).
to
be
true
columns
=
[]
columns
=
[]
project_data
=
[]
project_data
=
[]
File
.
foreach
(
project_table_file
).
with_index
do
|
line
,
line_num
|
File
.
foreach
(
project_table_file
).
with_index
do
|
line
,
line_num
|
...
...
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