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
a3eed5ee
Commit
a3eed5ee
authored
Mar 22, 2018
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup 'repository_path' implementation
parent
4c0e8125
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
13 deletions
+7
-13
ee/app/models/geo/project_registry.rb
ee/app/models/geo/project_registry.rb
+0
-11
ee/app/services/geo/repository_verify_secondary_service.rb
ee/app/services/geo/repository_verify_secondary_service.rb
+6
-1
ee/spec/services/geo/repository_verify_secondary_service_spec.rb
.../services/geo/repository_verify_secondary_service_spec.rb
+1
-1
No files found.
ee/app/models/geo/project_registry.rb
View file @
a3eed5ee
...
...
@@ -60,17 +60,6 @@ class Geo::ProjectRegistry < Geo::BaseRegistry
project
.
wiki_enabled?
&&
(
never_synced_wiki?
||
wiki_sync_needed?
(
scheduled_time
))
end
def
repository_path
(
type
)
repo_path
=
project
.
disk_path
case
type
when
:repository
repo_path
when
:wiki
"
#{
repo_path
}
.wiki"
end
end
private
def
never_synced_repository?
...
...
ee/app/services/geo/repository_verify_secondary_service.rb
View file @
a3eed5ee
...
...
@@ -73,7 +73,12 @@ module Geo
end
def
repository_path
registry
.
repository_path
(
type
)
case
type
when
:repository
registry
.
project
.
disk_path
when
:wiki
registry
.
project
.
wiki
.
disk_path
end
end
def
path_to_repo
...
...
ee/spec/services/geo/repository_verify_secondary_service_spec.rb
View file @
a3eed5ee
...
...
@@ -12,7 +12,7 @@ describe Geo::RepositoryVerifySecondaryService, :geo do
shared_examples
'verify checksums for repositories/wikis'
do
|
type
|
let
(
:checksum
)
{
instance_double
(
'Gitlab::Git::Checksum'
)
}
let
(
:storage
)
{
project
.
repository_storage
}
let
(
:relative_path
)
{
registry
.
repository_path
(
type
)
}
let
(
:relative_path
)
{
service
.
send
(
:repository_path
)
}
subject
(
:service
)
{
described_class
.
new
(
registry
,
type
)
}
...
...
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