Takuya Noguchi
2b6307f6ad
Enable RuboCop Style/RegexpLiteral
2018-02-01 02:06:07 +09:00
Lin Jen-Shin
02994fbe77
Backport changes from EE
2017-12-15 19:37:57 +08:00
Lin Jen-Shin
59ac184fcf
Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
...
* upstream/master: (671 commits)
Make rubocop happy
Use guard clause
Improve language
Prettify
Use temp branch
Pass info about who started the job and which job triggered it
Docs: add indexes for monitoring and performance monitoring
clearer-documentation-on-inline-diffs
Add docs for commit diff discussion in merge requests
sorting for tags api
Clear BatchLoader after each spec to prevent holding onto records longer than necessary
Include project in BatchLoader key to prevent returning blobs for the wrong project
moved lfs_blob_ids method into ExtractsPath module
Converted JS modules into exported modules
spec fixes
Bump gitlab-shell version to 5.10.3
Clear caches before updating MR diffs
Use new Ruby version 2.4 in GitLab QA images
moved lfs blob fetch from extractspath file
Update GitLab QA dependencies
...
2017-12-15 17:14:26 +08:00
Phil Hughes
cbd3ce8f41
moved lfs_blob_ids method into ExtractsPath module
2017-12-14 11:59:01 +00:00
Phil Hughes
7d2affeff1
moved lfs blob fetch from extractspath file
2017-12-14 10:10:20 +00:00
Phil Hughes
dec420feb3
fixed project homepage not having correct variable
2017-12-11 16:22:22 +00:00
Lin Jen-Shin
07d3d44775
Move ModuleWithInstanceVariables to Gitlab namespace
...
And use .rubocop.yml to exclude paths we don't care,
rather than using the cop itself to exclude.
2017-11-22 17:06:57 +08:00
Lin Jen-Shin
9ac0c76b78
Use StrongMemoize and enable/disable cops properly
2017-11-18 01:01:53 +08:00
Lin Jen-Shin
6a4ee9aa71
Allow simple ivar ||= form. Update accordingly
2017-09-19 01:29:32 +08:00
Lin Jen-Shin
9ae92b8caa
Add cop to make sure we don't use ivar in a module
2017-09-18 21:23:45 +08:00
Douwe Maan
fe13f11041
Create and use project path helpers that only need a project, no namespace
2017-07-05 11:11:59 -05:00
Sean McGivern
811e598f60
Enable and autocorrect the CustomErrorClass cop
2017-03-01 15:28:10 +00:00
Douwe Maan
f88ff0cc0c
Stylistic tweaks
2017-02-23 09:33:20 -06:00
Douwe Maan
ccbebbdfeb
Enable Performance/RedundantMatch
2017-02-23 09:31:57 -06:00
Hiroyuki Sato
d8cc8d7adc
Remove 'extended_sha1' option from ExtractsPath module
2016-11-06 12:33:39 +09:00
Hiroyuki Sato
56264f35d4
Network page appear with an error message when entering nonexistent git revision
2016-11-06 12:05:13 +09:00
Dmitriy Zaporozhets
d60d5fe4e4
Improve ExtractsPath logic related to atom format
...
* Don't set request format to atom if '.atom' suffix was not provided
* Don't try '.atom' detection logic on request that uses extended_sha1
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-15 01:36:05 +03: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
ddbdf4e609
Restore get_id in ExtractsPath
2016-08-24 12:54:16 +02:00
winniehell
bb48a0faea
Do not escape URI when extracting path ( !5878 )
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
Valery Sizov
8346dde052
Only render 404 page from /public
2015-10-13 20:12:34 +03: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
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
Dmitriy Zaporozhets
c916124178
Explicitly set before_filter for ref-related controllers
2015-01-26 15:01:51 -08:00
Dmitriy Zaporozhets
97a4d8aea4
Improve code according to new gitlab_git
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-04 14:46:15 +02:00
Dmitriy Zaporozhets
1d3f03fb69
Fix blob and repo stuff after gitlab_git v3
2013-10-01 18:26:55 +03:00
Dmitriy Zaporozhets
ae9dd62762
Update code to work with gitlab_git 3
2013-10-01 17:00:28 +03:00
Hiroyuki Sato
1101ceb3f4
A little improvement
...
1. Replace params key 'q' with 'extended_sha1'. A extended SHA1 syntax is explained in 'man gitrevisions'.
2. Change the placeholder of looking for commit.
3. Change the label of ref filter.
2013-08-21 19:20:29 +09:00
Hiroyuki Sato
5f24bdb7d0
Render not found when failing to look for a commit
2013-08-21 17:53:51 +09:00
Dmitriy Zaporozhets
b92655663c
Update main calls to gitlab_git
2013-08-05 16:51:04 +03:00
Sato Hiroyuki
c0e3b39792
Set @options in assing_ref_vars
...
@options enable to keep params when switching ref.
2013-05-13 18:44:33 +09:00
Sato Hiroyuki
97a9c2293a
Refactor: remove dup code
2013-05-13 18:41:04 +09:00
Sato Hiroyuki
05c2c15cd1
Fix Gitlab::Git::Repository#commit returns wrong commit, if commit_id is "tag name".
2013-04-25 20:54:00 +00:00
Dmitriy Zaporozhets
03f41e2820
Gitlab::Git::Tree & Blob added
2013-04-02 22:37:20 +03:00
Dmitriy Zaporozhets
5f4445c3d3
store commits for MR as array of hashes
2013-04-02 21:30:36 +03:00
Dmitriy Zaporozhets
541d899410
Project.repository should never be nil so you can call repository.exists? or repository.empty?
...
Also specify separate project factory for project with filled repo
2013-04-01 16:56:25 +03:00
Dmitriy Zaporozhets
bbfbff3add
Extend models functionality with old decorator methods. Use Repository model
2013-03-31 23:48:12 +03:00
Dmitriy Zaporozhets
9dc644635f
Fix tests and remove app/models/repository.rb
2013-03-31 18:50:17 +03: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
Sato Hiroyuki
e7a67a5583
Don't set format manually, bacause set in routing.
2013-03-06 16:36:10 +09:00
Dmitriy Zaporozhets
a73e58f70b
draper raise now RuntimeError instead of NoMethodError
2013-03-01 15:59:43 +02:00
Sato Hiroyuki
df85c9c06a
Fix bug when it has been switched to tag.
2013-02-05 19:08:25 +09:00
Sato Hiroyuki
525a8cd3e9
Switchable the main branch on network graph
2013-01-30 09:12:03 +09: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
0d5c6a48be
Merge pull request #2484 from netdata/fix_url_encode
...
Fixing request.fullpath URL encoding
2013-01-09 00:35:32 -08:00
Dmitriy Zaporozhets
aa97ff7fde
Fixed tree logs for branches with slash. Fixed remember of path when switch branch
2013-01-09 09:34:26 +02:00
Wouter D'Haeseleer
fd4bcd9f09
Fixing request.fullpath URL encoding
...
Let's assume your path is = "project/tree/master/This%20Is%20valid"
In this case gitlab renders a 404.
To fix this we should decode the path so that it looks like
"project/tree/master/This Is valid"
2013-01-04 15:05:00 +01:00
Dmitriy Zaporozhets
39ba934c0a
REpostiry, Team models
2013-01-03 21:09:18 +02:00