Commit graph

20 commits

Author SHA1 Message Date
Ahmad Sherif
3c2b4a1ced Enable serving static objects from an external storage
It consists of two parts:

1. Redirecting users to the configured external storage
1. Allowing the external storage to request the static object(s)
   on behalf of the user by means of specific tokens

Part of https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/6829
2019-09-10 13:43:11 +02:00
Ahmad Sherif
7b76c8d644 Return an ETag headers for the archive endpoint
We use the relative path of the archive to check for archive staleness.
2019-07-23 20:37:49 +02:00
gfyoung
93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
blackst0ne
b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Nick Thomas
276d4eb80c
Fix specifying a non-default ref when requesting an archive using the legacy URL 2018-04-19 12:47:23 +01:00
Stan Hu
5c735af3b5 Handle legacy repository archive requests with no ref given
The legacy endpoint requires no reference and defaults to the root
ref.

Closes #45154
2018-04-08 05:56:07 -07:00
James Ramsay
07f517d441 Add new repository archive route
Repository archives are always named `<project>-<ref>-<sha>` even if
the ref is a commit. A consequence of always including the sha even
for tags is that packaging a release is more difficult because both
the ref and sha must be known by the packager.

- add `<project>/-/archive/<ref>/<filename>.<format>` route using the
`-` separator to prevent namespace collisions. If the filename is
`<project>-<ref>` or the ref is a sha, the sha will be omitted,
otherwise the default filename will be used.
- deprecate previous archive route `repository/<ref>/archive`
2018-04-06 08:45:17 -04:00
blackst0ne
27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Jacopo
2f40dac352 Refactor have_http_status into have_gitlab_http_status in the specs 2017-10-20 10:13:18 +02:00
haseeb
4974f1ef86 fix #3686 make tarball download url to end with extension 2017-08-03 16:44:48 +00:00
Douwe Maan
ad640bc5f9 Use Namespace#full_path instead of #path where appropriate 2017-02-23 17:55:01 -06:00
Robert Speicher
4642ca6686 Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
Connor Shea
e13dc69be2 Fix test failure by accessing Content-Type header directly. 2016-09-27 20:52:41 -06:00
Grzegorz Bizon
9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Z.J. van de Weg
abca19da8b Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
Douwe Maan
8c3ba8d6c9 Add workhorse controller and API helpers 2016-06-06 13:16:30 +02:00
Robert Speicher
5844a21a0a Use a custom Devise failure app to handle unauthenticated .zip requests
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/12944
2016-03-08 23:49:30 -05:00
Jacob Vosmaer
771f14b96e First version of "git archive" headers 2016-02-02 14:09:55 +01:00
Jacob Vosmaer
381ca79bfa Remove archive file sending spec
This is done by gitlab-git-http-server now.
2015-10-14 15:21:14 +02:00
Douwe Maan
91761b0685 Add tests. 2015-03-31 13:37:21 +02:00