Commit graph

14 commits

Author SHA1 Message Date
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
Stan Hu
0fdfd2dd6e Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark
Here was the problem:

1. When determining whether a given blob is viewable text, gitlab_git reads the first 1024 bytes and checks with Linguist whether it is a text or binary file.
2. If the blob is text, GitLab will attempt to display it.
3. However, if the text has binary characters after the first 1024 bytes, then GitLab will attempt to load the entire contents, but the encoding will be ASCII-8BIT since there are binary characters.
4. The Error 500 results when GitLab attempts to display a mix UTF-8 and ASCII-8BIT.

To fix this, we load as much data as we are willing to display so that the detection will work properly. Requires
an update to gitlab_git: gitlab-org/gitlab_git!86

Closes #13826
2016-06-12 07:36:25 -07:00
Stan Hu
359ed48638 Fix Style/AlignHash cop violations 2015-06-22 22:24:39 -07:00
Vinnie Okada
76aad9b76e Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:

* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Jeroen van Baarsen
026e988544 Even more hound fixes
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 21:00:55 +01:00
Jeroen van Baarsen
940a402b6e Fixed hound warnings
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:32:58 +01:00
Jeroen van Baarsen
0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Dmitriy Zaporozhets
a0755d2f05
Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-07 20:46:17 +03:00
Marin Jankovski
e87f238077 Add tests for redirects. 2014-07-08 20:25:25 +02:00
Dmitriy Zaporozhets
c227aa44f9
Make changes to tests
* project_with_code -> project
* project -> ermpty_project

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-22 21:03:52 +02:00
Hiroyuki Sato
df9cbbc924 Drop support of root namespace in routing 2013-09-13 07:00:24 +09:00
Dmitriy Zaporozhets
40bca5246b Fix routing/controller specs for refactored controllers 2013-06-23 20:25:06 +03:00
Dmitriy Zaporozhets
dfeef6c228 Fixed API file raw functionality, Fixed tree controller tests. Added BlobController specs 2013-04-03 15:55:08 +03:00