Commit Graph

46 Commits

Author SHA1 Message Date
GitLab Bot 127e6d9610 Add latest changes from gitlab-org/gitlab@master 2020-11-16 12:09:05 +00:00
GitLab Bot d6348d22dd Add latest changes from gitlab-org/gitlab@master 2020-06-24 09:08:32 +00:00
GitLab Bot b3ce1ce452 Add latest changes from gitlab-org/gitlab@master 2020-06-04 09:08:01 +00:00
GitLab Bot 22e9af3c8b Add latest changes from gitlab-org/gitlab@master 2020-01-27 12:08:35 +00:00
GitLab Bot 0282449e6e Add latest changes from gitlab-org/gitlab@master 2019-11-20 06:06:16 +00:00
Thong Kuah f540ffcef6 Add frozen_string_literal to spec/lib (part 1)
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-26 13:25:07 +12:00
Stan Hu e675fe4621 Validate refs used in controllers don't have spaces
This avoids an unnecessary call to Gitaly and reduces gRPC errors.

* Closes https://gitlab.com/gitlab-org/gitaly/issues/1425
* Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58572
2019-04-14 15:26:25 -07:00
Zeger-Jan van de Weg 16346eb5b9 Revert "Merge branch 'revert-e2aa2177' into 'master'"
This reverts merge request !23229
2018-11-20 12:29:56 +00:00
Sean McGivern 2742b871fe Revert "Merge branch 'zj-improve-gitaly-pb' into 'master'"
This reverts merge request !23140
2018-11-20 10:36:52 +00:00
Zeger-Jan van de Weg 4ca5eadddb
Remove duplicate tests for Gitaly
The disabling of Gitaly was basically stubbing `Feature.enabled?` call,
which was never triggered.
2018-11-19 14:40:53 +01:00
Stan Hu 31f2608161 Fix handling of annotated tags when Gitaly is not in use
Attempting to view an annotated tag in the TreeController would result
in `NoMethodError: undefined method 'tree'` when Rugged was in use.
`Blob#find_by_rugged` assumes that the ref is a true. Using
the commit ID ensures that the right ref is being used.

Note that in 11.1, `Blob#find` no longer uses Rugged, so this is only
a bug in 11.0.

Closes gitlab-org/gitlab-ce#47797
2018-07-09 06:30:19 -07:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Rémy Coutable cddc5cacfb Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Douwe Maan c81928cfa7 Include new URL helpers retroactively into includers of Gitlab::Routing 2017-07-07 10:43:37 -05:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Douwe Maan 1fe7501b49 Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan 7d4b52b27d Enable Style/WordArray 2017-02-23 09:32:41 -06:00
Douwe Maan 206953a430 Prefer leading style for Style/DotPosition 2017-02-23 09:32:22 -06:00
Robert Speicher 80a6d2fda2 Use `:empty_project` where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
Sean McGivern 1022456bb1 Allow browsing branches that end with '.atom'
We need to do two things to support this:

1. Simplify the regex capture in the routing for the CommitsController
   to not exclude the '.atom' suffix. That's a perfectly valid git
   branch name, so we shouldn't blow up if we get it.
2. Because Rails now can't automatically detect the request format, add
   some code to do so in `ExtractPath` when there is no path. This means
   that, given branches 'foo' and 'foo.atom', the Atom feed for the
   former is unroutable. To fix this: don't do that! Give the branches
   different names!
2016-10-11 13:31:12 +01:00
winniehell 75d48ae35b Add failing test for #21334 2016-08-24 02:18:38 +02:00
winniehell bb48a0faea Do not escape URI when extracting path (!5878) 2016-08-19 18:08:08 +02:00
winniehell f3ee7fc80b Add failing test for gitlab-com/support-forum#952 2016-08-19 18:08:08 +02:00
Elliot 68cea38e94
Fix front-end for branches that happen to contain urlencoding escape characters (e.g. %)
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-11 13:21:59 +02:00
tiagonbotelho 1d268a89de adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
Yorick Peterse 84b0ab7766 Added & use Gitlab::Routing for URL helpers
Rails' "url_helpers" method creates an anonymous Module (which a bunch
of methods) on every call. By caching the output of this method in a
dedicated method we can shave off about 10 seconds of loading time for
an issue with around 200 comments.
2016-04-01 11:13:48 +02:00
Douwe Maan 13d6bab177 Tag lib specs 2015-12-09 11:55:42 +01:00
Douwe Maan 046b283127 Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
Stan Hu ecbe119af1 Fix "Network" and "Graphs" pages for branches with encoded slashes
Closes #1359
2015-08-02 00:07:23 -07:00
Stan Hu 9add3e6eb5 Extract the longest-matching ref from a commit path when multiple matches occur
Closes #1839
2015-07-01 07:01:59 -07:00
Dmitriy Zaporozhets f40b99d02e
Merge branch 'master' into rubocop-for-tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/features/issues_spec.rb
	spec/models/forked_project_link_spec.rb
	spec/models/hooks/service_hook_spec.rb
	spec/models/hooks/web_hook_spec.rb
	spec/models/project_services/hipchat_service_spec.rb
	spec/requests/api/project_members_spec.rb
	spec/requests/api/projects_spec.rb
	spec/requests/api/system_hooks_spec.rb
	spec/services/archive_repository_service_spec.rb
	spec/support/matchers.rb
	spec/tasks/gitlab/backup_rake_spec.rb
2015-06-23 10:44:03 +02:00
Robert Speicher 94eff65569 Fix Style/SpaceInsideHashLiteralBraces cop violations
These fixes were performed automatically by Rubocop's `-a` flag.
2015-06-22 14:41:00 -04:00
Robert Speicher 5a9ede4721 Update mock and stub syntax for specs 2015-06-22 12:13:46 +02:00
Stan Hu ef0055b52d Fix bug where commit data would not appear in some subdirectories
The upgrade from Rails v4.1.2 to v4.1.9 (76aad9b76e) caused slashes in a tree to be escaped automatically.
Using wildcard globs prevents this behavior.

Closes #1478, #1459
2015-04-26 23:52:40 -07: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
skv d89527839e fix most of warnings 2013-12-15 00:05:10 +04:00
Sato Hiroyuki a1fe375e44 Fix 404 error while displaying json files.
It uses params[:id] instead of request.fullpath.
It should fix #3132.
2013-03-21 15:10:14 +00:00
Jun Futagawa 79b9249ff4 Remove relative_url_root from path. Fixes #2602
Files and Commits render a 404 when running with relative_url_root.
2013-01-23 17:29:46 +09:00
Dmitriy Zaporozhets e16cebac3e Fixed styles, ProjectHook specs etc 2013-01-05 00:35:38 +02:00
Dmitriy Zaporozhets c8ba5c2d58 Fix routing issues when navigating over tree, commits etc 2012-12-25 06:14:05 +03:00
Robert Speicher 3606a14889 ExtractsPath: Use ref_names instead of branches+tags 2012-10-04 14:13:52 -04:00
Valeriy Sizov e25ddca0c4 Fix bug with branches whose name contains slash 2012-10-04 19:31:31 +03:00
Robert Speicher a1e68a9120 Rename RefExtractor to ExtractsPath
Update docs a bit
2012-09-26 16:32:22 -04:00