BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
86df5c67
Unverified
Commit
86df5c67
authored
Mar 05, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace deprecated path_with_namespace with full_path
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
8a0052c0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
23 deletions
+27
-23
import_helper.rb
app/helpers/import_helper.rb
+7
-7
object_importer.rb
app/workers/concerns/gitlab/github_import/object_importer.rb
+1
-1
finish_import_worker.rb
...orkers/gitlab/github_import/stage/finish_import_worker.rb
+1
-1
issues_spec.rb
spec/features/dashboard/issues_spec.rb
+1
-1
project_wiki_spec.rb
spec/models/project_wiki_spec.rb
+3
-3
pages_domains_spec.rb
spec/requests/api/pages_domains_spec.rb
+1
-1
container_registry_authentication_service_spec.rb
...es/auth/container_registry_authentication_service_spec.rb
+9
-9
system_hooks_service_spec.rb
spec/services/system_hooks_service_spec.rb
+4
-0
No files found.
app/helpers/import_helper.rb
View file @
86df5c67
...
...
@@ -4,16 +4,16 @@ module ImportHelper
"
#{
namespace
}
/
#{
name
}
"
end
def
provider_project_link
(
provider
,
path_with_namespace
)
url
=
__send__
(
"
#{
provider
}
_project_url"
,
path_with_namespace
)
# rubocop:disable GitlabSecurity/PublicSend
def
provider_project_link
(
provider
,
full_path
)
url
=
__send__
(
"
#{
provider
}
_project_url"
,
full_path
)
# rubocop:disable GitlabSecurity/PublicSend
link_to
path_with_namespace
,
url
,
target:
'_blank'
,
rel:
'noopener noreferrer'
link_to
full_path
,
url
,
target:
'_blank'
,
rel:
'noopener noreferrer'
end
private
def
github_project_url
(
path_with_namespace
)
"
#{
github_root_url
}
/
#{
path_with_namespace
}
"
def
github_project_url
(
full_path
)
"
#{
github_root_url
}
/
#{
full_path
}
"
end
def
github_root_url
...
...
@@ -23,7 +23,7 @@ module ImportHelper
@github_url
=
provider
.
fetch
(
'url'
,
'https://github.com'
)
if
provider
end
def
gitea_project_url
(
path_with_namespace
)
"
#{
@gitea_host_url
.
sub
(
%r{/+
\z
}
,
''
)
}
/
#{
path_with_namespace
}
"
def
gitea_project_url
(
full_path
)
"
#{
@gitea_host_url
.
sub
(
%r{/+
\z
}
,
''
)
}
/
#{
full_path
}
"
end
end
app/workers/concerns/gitlab/github_import/object_importer.rb
View file @
86df5c67
...
...
@@ -22,7 +22,7 @@ module Gitlab
importer_class
.
new
(
object
,
project
,
client
).
execute
counter
.
increment
(
project:
project
.
path_with_namespace
)
counter
.
increment
(
project:
project
.
full_path
)
end
def
counter
...
...
app/workers/gitlab/github_import/stage/finish_import_worker.rb
View file @
86df5c67
...
...
@@ -16,7 +16,7 @@ module Gitlab
def
report_import_time
(
project
)
duration
=
Time
.
zone
.
now
-
project
.
created_at
path
=
project
.
path_with_namespace
path
=
project
.
full_path
histogram
.
observe
({
project:
path
},
duration
)
counter
.
increment
...
...
spec/features/dashboard/issues_spec.rb
View file @
86df5c67
...
...
@@ -84,7 +84,7 @@ RSpec.describe 'Dashboard Issues' do
wait_for_requests
project_path
=
"/
#{
project
.
path_with_namespace
}
"
project_path
=
"/
#{
project
.
full_path
}
"
project_json
=
{
name:
project
.
name_with_namespace
,
url:
project_path
}.
to_json
# simulate selection, and prevent overlap by dropdown menu
...
...
spec/models/project_wiki_spec.rb
View file @
86df5c67
...
...
@@ -14,13 +14,13 @@ describe ProjectWiki do
it
{
is_expected
.
to
delegate_method
(
:repository_storage_path
).
to
:project
}
it
{
is_expected
.
to
delegate_method
(
:hashed_storage?
).
to
:project
}
describe
"#
path_with_namespace
"
do
describe
"#
full_path
"
do
it
"returns the project path with namespace with the .wiki extension"
do
expect
(
subject
.
path_with_namespace
).
to
eq
(
project
.
full_path
+
'.wiki'
)
expect
(
subject
.
full_path
).
to
eq
(
project
.
full_path
+
'.wiki'
)
end
it
'returns the same value as #full_path'
do
expect
(
subject
.
path_with_namespace
).
to
eq
(
subject
.
full_path
)
expect
(
subject
.
full_path
).
to
eq
(
subject
.
full_path
)
end
end
...
...
spec/requests/api/pages_domains_spec.rb
View file @
86df5c67
...
...
@@ -16,7 +16,7 @@ describe API::PagesDomains do
let
(
:route
)
{
"/projects/
#{
project
.
id
}
/pages/domains"
}
let
(
:route_domain
)
{
"/projects/
#{
project
.
id
}
/pages/domains/
#{
pages_domain
.
domain
}
"
}
let
(
:route_domain_path
)
{
"/projects/
#{
project
.
path_with_namespace
.
gsub
(
'/'
,
'%2F'
)
}
/pages/domains/
#{
pages_domain
.
domain
}
"
}
let
(
:route_domain_path
)
{
"/projects/
#{
project
.
full_path
.
gsub
(
'/'
,
'%2F'
)
}
/pages/domains/
#{
pages_domain
.
domain
}
"
}
let
(
:route_secure_domain
)
{
"/projects/
#{
project
.
id
}
/pages/domains/
#{
pages_domain_secure
.
domain
}
"
}
let
(
:route_expired_domain
)
{
"/projects/
#{
project
.
id
}
/pages/domains/
#{
pages_domain_expired
.
domain
}
"
}
let
(
:route_vacant_domain
)
{
"/projects/
#{
project
.
id
}
/pages/domains/www.vacant-domain.test"
}
...
...
spec/services/auth/container_registry_authentication_service_spec.rb
View file @
86df5c67
...
...
@@ -172,7 +172,7 @@ describe Auth::ContainerRegistryAuthenticationService do
end
let
(
:current_params
)
do
{
scope:
"repository:
#{
project
.
path_with_namespace
}
:*"
}
{
scope:
"repository:
#{
project
.
full_path
}
:*"
}
end
it_behaves_like
'an inaccessible'
...
...
@@ -200,7 +200,7 @@ describe Auth::ContainerRegistryAuthenticationService do
end
let
(
:current_params
)
do
{
scope:
"repository:
#{
project
.
path_with_namespace
}
:*"
}
{
scope:
"repository:
#{
project
.
full_path
}
:*"
}
end
it_behaves_like
'an inaccessible'
...
...
@@ -239,7 +239,7 @@ describe Auth::ContainerRegistryAuthenticationService do
end
let
(
:current_params
)
do
{
scope:
"repository:
#{
project
.
path_with_namespace
}
:*"
}
{
scope:
"repository:
#{
project
.
full_path
}
:*"
}
end
it_behaves_like
'an inaccessible'
...
...
@@ -270,7 +270,7 @@ describe Auth::ContainerRegistryAuthenticationService do
context
'disallow anyone to delete images'
do
let
(
:current_params
)
do
{
scope:
"repository:
#{
project
.
path_with_namespace
}
:*"
}
{
scope:
"repository:
#{
project
.
full_path
}
:*"
}
end
it_behaves_like
'an inaccessible'
...
...
@@ -311,7 +311,7 @@ describe Auth::ContainerRegistryAuthenticationService do
context
'disallow anyone to delete images'
do
let
(
:current_params
)
do
{
scope:
"repository:
#{
project
.
path_with_namespace
}
:*"
}
{
scope:
"repository:
#{
project
.
full_path
}
:*"
}
end
it_behaves_like
'an inaccessible'
...
...
@@ -323,7 +323,7 @@ describe Auth::ContainerRegistryAuthenticationService do
context
'disallow anyone to pull or push images'
do
let
(
:current_user
)
{
create
(
:user
,
external:
true
)
}
let
(
:current_params
)
do
{
scope:
"repository:
#{
project
.
path_with_namespace
}
:pull,push"
}
{
scope:
"repository:
#{
project
.
full_path
}
:pull,push"
}
end
it_behaves_like
'an inaccessible'
...
...
@@ -333,7 +333,7 @@ describe Auth::ContainerRegistryAuthenticationService do
context
'disallow anyone to delete images'
do
let
(
:current_user
)
{
create
(
:user
,
external:
true
)
}
let
(
:current_params
)
do
{
scope:
"repository:
#{
project
.
path_with_namespace
}
:*"
}
{
scope:
"repository:
#{
project
.
full_path
}
:*"
}
end
it_behaves_like
'an inaccessible'
...
...
@@ -359,7 +359,7 @@ describe Auth::ContainerRegistryAuthenticationService do
context
'allow to delete images'
do
let
(
:current_params
)
do
{
scope:
"repository:
#{
current_project
.
path_with_namespace
}
:*"
}
{
scope:
"repository:
#{
current_project
.
full_path
}
:*"
}
end
it_behaves_like
'a deletable'
do
...
...
@@ -398,7 +398,7 @@ describe Auth::ContainerRegistryAuthenticationService do
context
'disallow to delete images'
do
let
(
:current_params
)
do
{
scope:
"repository:
#{
current_project
.
path_with_namespace
}
:*"
}
{
scope:
"repository:
#{
current_project
.
full_path
}
:*"
}
end
it_behaves_like
'an inaccessible'
do
...
...
spec/services/system_hooks_service_spec.rb
View file @
86df5c67
...
...
@@ -30,6 +30,7 @@ describe SystemHooksService do
:old_path_with_namespace
)
end
it
do
project
.
old_path_with_namespace
=
'transfered_from_path'
expect
(
event_data
(
project
,
:transfer
)).
to
include
(
...
...
@@ -45,18 +46,21 @@ describe SystemHooksService do
:owner_name
,
:owner_email
)
end
it
do
expect
(
event_data
(
group
,
:destroy
)).
to
include
(
:event_name
,
:name
,
:created_at
,
:updated_at
,
:path
,
:group_id
,
:owner_name
,
:owner_email
)
end
it
do
expect
(
event_data
(
group_member
,
:create
)).
to
include
(
:event_name
,
:created_at
,
:updated_at
,
:group_name
,
:group_path
,
:group_id
,
:user_id
,
:user_username
,
:user_name
,
:user_email
,
:group_access
)
end
it
do
expect
(
event_data
(
group_member
,
:destroy
)).
to
include
(
:event_name
,
:created_at
,
:updated_at
,
:group_name
,
:group_path
,
...
...
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