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
7c53fcf1
Commit
7c53fcf1
authored
Jun 27, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust for new static-analysis failures
parent
397d3fd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
...atabase/rename_reserved_paths_migration/v1/rename_base.rb
+2
-2
spec/lib/gitlab/database/rename_reserved_paths_migration/v1_spec.rb
...itlab/database/rename_reserved_paths_migration/v1_spec.rb
+6
-6
No files found.
lib/gitlab/database/rename_reserved_paths_migration/v1/rename_base.rb
View file @
7c53fcf1
...
...
@@ -37,8 +37,8 @@ module Gitlab
def
perform_rename
(
routable
,
old_full_path
,
new_full_path
)
# skips callbacks & validations
new_path
=
new_full_path
.
split
(
'/'
).
last
routable
.
class
.
where
(
id:
routable
)
.
update_all
(
path:
new_path
)
routable
.
class
.
where
(
id:
routable
)
.
update_all
(
path:
new_path
)
rename_routes
(
old_full_path
,
new_full_path
)
end
...
...
spec/lib/gitlab/database/rename_reserved_paths_migration/v1_spec.rb
View file @
7c53fcf1
...
...
@@ -55,9 +55,9 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1, :truncate do
describe
'#revert_renames'
do
it
'renames namespaces'
do
rename_namespaces
=
double
expect
(
described_class
::
RenameNamespaces
)
.
to
receive
(
:new
).
with
([],
subject
).
and_return
(
rename_namespaces
)
expect
(
described_class
::
RenameNamespaces
)
.
to
receive
(
:new
).
with
([],
subject
)
.
and_return
(
rename_namespaces
)
expect
(
rename_namespaces
).
to
receive
(
:revert_renames
)
subject
.
revert_renames
...
...
@@ -65,9 +65,9 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1, :truncate do
it
'renames projects'
do
rename_projects
=
double
expect
(
described_class
::
RenameProjects
)
.
to
receive
(
:new
).
with
([],
subject
).
and_return
(
rename_projects
)
expect
(
described_class
::
RenameProjects
)
.
to
receive
(
:new
).
with
([],
subject
)
.
and_return
(
rename_projects
)
expect
(
rename_projects
).
to
receive
(
:revert_renames
)
subject
.
revert_renames
...
...
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