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
226b0c20
Commit
226b0c20
authored
Jan 18, 2021
by
Mathieu Parent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove "-/" section from the debian routes
See
https://gitlab.com/gitlab-org/gitlab-workhorse/-/issues/343
parent
c4536b63
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
33 deletions
+33
-33
lib/api/debian_group_packages.rb
lib/api/debian_group_packages.rb
+1
-1
lib/api/debian_package_endpoints.rb
lib/api/debian_package_endpoints.rb
+5
-5
lib/api/debian_project_packages.rb
lib/api/debian_project_packages.rb
+3
-3
spec/requests/api/debian_group_packages_spec.rb
spec/requests/api/debian_group_packages_spec.rb
+10
-10
spec/requests/api/debian_project_packages_spec.rb
spec/requests/api/debian_project_packages_spec.rb
+14
-14
No files found.
lib/api/debian_group_packages.rb
View file @
226b0c20
...
@@ -13,7 +13,7 @@ module API
...
@@ -13,7 +13,7 @@ module API
authorize_read_package!
(
user_group
)
authorize_read_package!
(
user_group
)
end
end
namespace
':id/
-/
packages/debian'
do
namespace
':id/packages/debian'
do
include
DebianPackageEndpoints
include
DebianPackageEndpoints
end
end
end
end
...
...
lib/api/debian_package_endpoints.rb
View file @
226b0c20
...
@@ -51,7 +51,7 @@ module API
...
@@ -51,7 +51,7 @@ module API
end
end
namespace
'dists/*distribution'
,
requirements:
DISTRIBUTION_REQUIREMENTS
do
namespace
'dists/*distribution'
,
requirements:
DISTRIBUTION_REQUIREMENTS
do
# GET {projects|groups}/:id/
-/
packages/debian/dists/*distribution/Release.gpg
# GET {projects|groups}/:id/packages/debian/dists/*distribution/Release.gpg
desc
'The Release file signature'
do
desc
'The Release file signature'
do
detail
'This feature was introduced in GitLab 13.5'
detail
'This feature was introduced in GitLab 13.5'
end
end
...
@@ -61,7 +61,7 @@ module API
...
@@ -61,7 +61,7 @@ module API
not_found!
not_found!
end
end
# GET {projects|groups}/:id/
-/
packages/debian/dists/*distribution/Release
# GET {projects|groups}/:id/packages/debian/dists/*distribution/Release
desc
'The unsigned Release file'
do
desc
'The unsigned Release file'
do
detail
'This feature was introduced in GitLab 13.5'
detail
'This feature was introduced in GitLab 13.5'
end
end
...
@@ -72,7 +72,7 @@ module API
...
@@ -72,7 +72,7 @@ module API
'TODO Release'
'TODO Release'
end
end
# GET {projects|groups}/:id/
-/
packages/debian/dists/*distribution/InRelease
# GET {projects|groups}/:id/packages/debian/dists/*distribution/InRelease
desc
'The signed Release file'
do
desc
'The signed Release file'
do
detail
'This feature was introduced in GitLab 13.5'
detail
'This feature was introduced in GitLab 13.5'
end
end
...
@@ -88,7 +88,7 @@ module API
...
@@ -88,7 +88,7 @@ module API
end
end
namespace
':component/binary-:architecture'
,
requirements:
COMPONENT_ARCHITECTURE_REQUIREMENTS
do
namespace
':component/binary-:architecture'
,
requirements:
COMPONENT_ARCHITECTURE_REQUIREMENTS
do
# GET {projects|groups}/:id/
-/
packages/debian/dists/*distribution/:component/binary-:architecture/Packages
# GET {projects|groups}/:id/packages/debian/dists/*distribution/:component/binary-:architecture/Packages
desc
'The binary files index'
do
desc
'The binary files index'
do
detail
'This feature was introduced in GitLab 13.5'
detail
'This feature was introduced in GitLab 13.5'
end
end
...
@@ -108,7 +108,7 @@ module API
...
@@ -108,7 +108,7 @@ module API
end
end
namespace
'pool/:component/:letter/:source_package'
,
requirements:
COMPONENT_LETTER_SOURCE_PACKAGE_REQUIREMENTS
do
namespace
'pool/:component/:letter/:source_package'
,
requirements:
COMPONENT_LETTER_SOURCE_PACKAGE_REQUIREMENTS
do
# GET {projects|groups}/:id/
-/
packages/debian/pool/:component/:letter/:source_package/:file_name
# GET {projects|groups}/:id/packages/debian/pool/:component/:letter/:source_package/:file_name
params
do
params
do
requires
:file_name
,
type:
String
,
desc:
'The Debian File Name'
requires
:file_name
,
type:
String
,
desc:
'The Debian File Name'
end
end
...
...
lib/api/debian_project_packages.rb
View file @
226b0c20
...
@@ -13,7 +13,7 @@ module API
...
@@ -13,7 +13,7 @@ module API
authorize_read_package!
authorize_read_package!
end
end
namespace
':id/
-/
packages/debian'
do
namespace
':id/packages/debian'
do
include
DebianPackageEndpoints
include
DebianPackageEndpoints
params
do
params
do
...
@@ -23,7 +23,7 @@ module API
...
@@ -23,7 +23,7 @@ module API
namespace
'incoming/:file_name'
,
requirements:
FILE_NAME_REQUIREMENTS
do
namespace
'incoming/:file_name'
,
requirements:
FILE_NAME_REQUIREMENTS
do
content_type
:json
,
Gitlab
::
Workhorse
::
INTERNAL_API_CONTENT_TYPE
content_type
:json
,
Gitlab
::
Workhorse
::
INTERNAL_API_CONTENT_TYPE
# PUT {projects|groups}/:id/
-/
packages/debian/incoming/:file_name
# PUT {projects|groups}/:id/packages/debian/incoming/:file_name
params
do
params
do
requires
:file
,
type:
::
API
::
Validations
::
Types
::
WorkhorseFile
,
desc:
'The package file to be published (generated by Multipart middleware)'
requires
:file
,
type:
::
API
::
Validations
::
Types
::
WorkhorseFile
,
desc:
'The package file to be published (generated by Multipart middleware)'
end
end
...
@@ -42,7 +42,7 @@ module API
...
@@ -42,7 +42,7 @@ module API
forbidden!
forbidden!
end
end
# PUT {projects|groups}/:id/
-/
packages/debian/incoming/:file_name/authorize
# PUT {projects|groups}/:id/packages/debian/incoming/:file_name/authorize
route_setting
:authentication
,
deploy_token_allowed:
true
,
basic_auth_personal_access_token:
true
,
job_token_allowed: :basic_auth
route_setting
:authentication
,
deploy_token_allowed:
true
,
basic_auth_personal_access_token:
true
,
job_token_allowed: :basic_auth
put
'authorize'
do
put
'authorize'
do
authorize_workhorse!
(
authorize_workhorse!
(
...
...
spec/requests/api/debian_group_packages_spec.rb
View file @
226b0c20
...
@@ -6,32 +6,32 @@ RSpec.describe API::DebianGroupPackages do
...
@@ -6,32 +6,32 @@ RSpec.describe API::DebianGroupPackages do
include
WorkhorseHelpers
include
WorkhorseHelpers
include_context
'Debian repository shared context'
,
:group
do
include_context
'Debian repository shared context'
,
:group
do
describe
'GET groups/:id/
-/
packages/debian/dists/*distribution/Release.gpg'
do
describe
'GET groups/:id/packages/debian/dists/*distribution/Release.gpg'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:not_found
,
nil
it_behaves_like
'Debian group repository GET endpoint'
,
:not_found
,
nil
end
end
describe
'GET groups/:id/
-/
packages/debian/dists/*distribution/Release'
do
describe
'GET groups/:id/packages/debian/dists/*distribution/Release'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/Release"
}
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO Release'
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO Release'
end
end
describe
'GET groups/:id/
-/
packages/debian/dists/*distribution/InRelease'
do
describe
'GET groups/:id/packages/debian/dists/*distribution/InRelease'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/InRelease"
}
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/packages/debian/dists/
#{
distribution
}
/InRelease"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:not_found
,
nil
it_behaves_like
'Debian group repository GET endpoint'
,
:not_found
,
nil
end
end
describe
'GET groups/:id/
-/
packages/debian/dists/*distribution/:component/binary-:architecture/Packages'
do
describe
'GET groups/:id/packages/debian/dists/*distribution/:component/binary-:architecture/Packages'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/
#{
component
}
/binary-
#{
architecture
}
/Packages"
}
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/packages/debian/dists/
#{
distribution
}
/
#{
component
}
/binary-
#{
architecture
}
/Packages"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO Packages'
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO Packages'
end
end
describe
'GET groups/:id/
-/
packages/debian/pool/:component/:letter/:source_package/:file_name'
do
describe
'GET groups/:id/packages/debian/pool/:component/:letter/:source_package/:file_name'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/
-/
packages/debian/pool/
#{
component
}
/
#{
letter
}
/
#{
source_package
}
/
#{
package_name
}
_
#{
package_version
}
_
#{
architecture
}
.deb"
}
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/packages/debian/pool/
#{
component
}
/
#{
letter
}
/
#{
source_package
}
/
#{
package_name
}
_
#{
package_version
}
_
#{
architecture
}
.deb"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO File'
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO File'
end
end
...
...
spec/requests/api/debian_project_packages_spec.rb
View file @
226b0c20
...
@@ -6,46 +6,46 @@ RSpec.describe API::DebianProjectPackages do
...
@@ -6,46 +6,46 @@ RSpec.describe API::DebianProjectPackages do
include
WorkhorseHelpers
include
WorkhorseHelpers
include_context
'Debian repository shared context'
,
:project
do
include_context
'Debian repository shared context'
,
:project
do
describe
'GET projects/:id/
-/
packages/debian/dists/*distribution/Release.gpg'
do
describe
'GET projects/:id/packages/debian/dists/*distribution/Release.gpg'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:not_found
,
nil
it_behaves_like
'Debian project repository GET endpoint'
,
:not_found
,
nil
end
end
describe
'GET projects/:id/
-/
packages/debian/dists/*distribution/Release'
do
describe
'GET projects/:id/packages/debian/dists/*distribution/Release'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/Release"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO Release'
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO Release'
end
end
describe
'GET projects/:id/
-/
packages/debian/dists/*distribution/InRelease'
do
describe
'GET projects/:id/packages/debian/dists/*distribution/InRelease'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/InRelease"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/InRelease"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:not_found
,
nil
it_behaves_like
'Debian project repository GET endpoint'
,
:not_found
,
nil
end
end
describe
'GET projects/:id/
-/
packages/debian/dists/*distribution/:component/binary-:architecture/Packages'
do
describe
'GET projects/:id/packages/debian/dists/*distribution/:component/binary-:architecture/Packages'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/
#{
component
}
/binary-
#{
architecture
}
/Packages"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/
#{
component
}
/binary-
#{
architecture
}
/Packages"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO Packages'
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO Packages'
end
end
describe
'GET projects/:id/
-/
packages/debian/pool/:component/:letter/:source_package/:file_name'
do
describe
'GET projects/:id/packages/debian/pool/:component/:letter/:source_package/:file_name'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/pool/
#{
component
}
/
#{
letter
}
/
#{
source_package
}
/
#{
package_name
}
_
#{
package_version
}
_
#{
architecture
}
.deb"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/pool/
#{
component
}
/
#{
letter
}
/
#{
source_package
}
/
#{
package_name
}
_
#{
package_version
}
_
#{
architecture
}
.deb"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO File'
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO File'
end
end
describe
'PUT projects/:id/
-/
packages/debian/incoming/:file_name'
do
describe
'PUT projects/:id/packages/debian/incoming/:file_name'
do
let
(
:method
)
{
:put
}
let
(
:method
)
{
:put
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/incoming/
#{
file_name
}
"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/incoming/
#{
file_name
}
"
}
it_behaves_like
'Debian project repository PUT endpoint'
,
:created
,
nil
it_behaves_like
'Debian project repository PUT endpoint'
,
:created
,
nil
end
end
describe
'PUT projects/:id/
-/
packages/debian/incoming/:file_name/authorize'
do
describe
'PUT projects/:id/packages/debian/incoming/:file_name/authorize'
do
let
(
:method
)
{
:put
}
let
(
:method
)
{
:put
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/incoming/
#{
file_name
}
/authorize"
}
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/incoming/
#{
file_name
}
/authorize"
}
it_behaves_like
'Debian project repository PUT endpoint'
,
:created
,
nil
,
is_authorize:
true
it_behaves_like
'Debian project repository PUT endpoint'
,
:created
,
nil
,
is_authorize:
true
end
end
...
...
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