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
Hide 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
authorize_read_package!
(
user_group
)
end
namespace
':id/
-/
packages/debian'
do
namespace
':id/packages/debian'
do
include
DebianPackageEndpoints
end
end
...
...
lib/api/debian_package_endpoints.rb
View file @
226b0c20
...
...
@@ -51,7 +51,7 @@ module API
end
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
detail
'This feature was introduced in GitLab 13.5'
end
...
...
@@ -61,7 +61,7 @@ module API
not_found!
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
detail
'This feature was introduced in GitLab 13.5'
end
...
...
@@ -72,7 +72,7 @@ module API
'TODO Release'
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
detail
'This feature was introduced in GitLab 13.5'
end
...
...
@@ -88,7 +88,7 @@ module API
end
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
detail
'This feature was introduced in GitLab 13.5'
end
...
...
@@ -108,7 +108,7 @@ module API
end
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
requires
:file_name
,
type:
String
,
desc:
'The Debian File Name'
end
...
...
lib/api/debian_project_packages.rb
View file @
226b0c20
...
...
@@ -13,7 +13,7 @@ module API
authorize_read_package!
end
namespace
':id/
-/
packages/debian'
do
namespace
':id/packages/debian'
do
include
DebianPackageEndpoints
params
do
...
...
@@ -23,7 +23,7 @@ module API
namespace
'incoming/:file_name'
,
requirements:
FILE_NAME_REQUIREMENTS
do
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
requires
:file
,
type:
::
API
::
Validations
::
Types
::
WorkhorseFile
,
desc:
'The package file to be published (generated by Multipart middleware)'
end
...
...
@@ -42,7 +42,7 @@ module API
forbidden!
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
put
'authorize'
do
authorize_workhorse!
(
...
...
spec/requests/api/debian_group_packages_spec.rb
View file @
226b0c20
...
...
@@ -6,32 +6,32 @@ RSpec.describe API::DebianGroupPackages do
include
WorkhorseHelpers
include_context
'Debian repository shared context'
,
:group
do
describe
'GET groups/:id/
-/
packages/debian/dists/*distribution/Release.gpg'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
describe
'GET groups/:id/packages/debian/dists/*distribution/Release.gpg'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:not_found
,
nil
end
describe
'GET groups/:id/
-/
packages/debian/dists/*distribution/Release'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/Release"
}
describe
'GET groups/:id/packages/debian/dists/*distribution/Release'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO Release'
end
describe
'GET groups/:id/
-/
packages/debian/dists/*distribution/InRelease'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/InRelease"
}
describe
'GET groups/:id/packages/debian/dists/*distribution/InRelease'
do
let
(
:url
)
{
"/groups/
#{
group
.
id
}
/packages/debian/dists/
#{
distribution
}
/InRelease"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:not_found
,
nil
end
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"
}
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"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO Packages'
end
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"
}
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"
}
it_behaves_like
'Debian group repository GET endpoint'
,
:success
,
'TODO File'
end
...
...
spec/requests/api/debian_project_packages_spec.rb
View file @
226b0c20
...
...
@@ -6,46 +6,46 @@ RSpec.describe API::DebianProjectPackages do
include
WorkhorseHelpers
include_context
'Debian repository shared context'
,
:project
do
describe
'GET projects/:id/
-/
packages/debian/dists/*distribution/Release.gpg'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
describe
'GET projects/:id/packages/debian/dists/*distribution/Release.gpg'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release.gpg"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:not_found
,
nil
end
describe
'GET projects/:id/
-/
packages/debian/dists/*distribution/Release'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/Release"
}
describe
'GET projects/:id/packages/debian/dists/*distribution/Release'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/Release"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO Release'
end
describe
'GET projects/:id/
-/
packages/debian/dists/*distribution/InRelease'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/
-/
packages/debian/dists/
#{
distribution
}
/InRelease"
}
describe
'GET projects/:id/packages/debian/dists/*distribution/InRelease'
do
let
(
:url
)
{
"/projects/
#{
project
.
id
}
/packages/debian/dists/
#{
distribution
}
/InRelease"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:not_found
,
nil
end
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"
}
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"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO Packages'
end
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"
}
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"
}
it_behaves_like
'Debian project repository GET endpoint'
,
:success
,
'TODO File'
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
(
: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
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
(
: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
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