summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
Commit message (Collapse)AuthorAgeFilesLines
* Validate refs used in controllers don't have spacessh-validate-ref-name-in-commitStan Hu2019-04-141-0/+3
| | | | | | | 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
* Remove `options` assignment from ExtractsPathRobert Speicher2018-11-271-5/+0
| | | | | | | | | | | | | | | | | This assignment is only used by the Projects::NetworkController, so we're needlessly assigning this very generically-named instance variable on every controller which includes `ExtractsPath`, which is quite a few. Further, the way we were passing this hash to `HashWithIndifferentAccess` caused the following deprecation warning after upgrading to Rails 5: DEPRECATION WARNING: #to_hash unexpectedly ignores parameter filtering, and will change to enforce it in Rails 5.1. Enable `raise_on_unfiltered_parameters` to respect parameter filtering, which is the default in new applications. For the existing deprecated behaviour, call #to_unsafe_h instead. (called from new at lib/extracts_path.rb:116)
* Fix typos in comments and specsGeorge Tsiolis2018-11-011-1/+1
|
* Enable more frozen string in lib/**/*.rbgfyoung2018-10-061-4/+8
| | | | | | | | | | | | | Enables frozen for the following: * lib/*.rb * lib/banzai/**/*.rb * lib/bitbucket/**/*.rb * lib/constraints/**/*.rb * lib/container_registry/**/*.rb * lib/declarative_policy/**/*.rb Partially addresses #47424.
* Fix rubocop Style/ZeroLengthPredicateSemyon Pupkov2018-09-181-1/+1
|
* Fix handling of annotated tags when Gitaly is not in useStan Hu2018-07-091-0/+5
| | | | | | | | | | | | 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
* Enable RuboCop Style/RegexpLiteralTakuya Noguchi2018-02-011-2/+2
|
* Backport changes from EELin Jen-Shin2017-12-151-1/+1
|
* Merge remote-tracking branch 'upstream/master' into no-ivar-in-modulesLin Jen-Shin2017-12-151-1/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 ...
| * moved lfs_blob_ids method into ExtractsPath modulelfs-badgePhil Hughes2017-12-141-0/+5
| |
| * moved lfs blob fetch from extractspath filePhil Hughes2017-12-141-4/+0
| |
| * fixed project homepage not having correct variablePhil Hughes2017-12-111-0/+3
| |
* | Move ModuleWithInstanceVariables to Gitlab namespaceLin Jen-Shin2017-11-221-6/+6
| | | | | | | | | | And use .rubocop.yml to exclude paths we don't care, rather than using the cop itself to exclude.
* | Use StrongMemoize and enable/disable cops properlyLin Jen-Shin2017-11-181-7/+5
| |
* | Allow simple ivar ||= form. Update accordinglyLin Jen-Shin2017-09-191-1/+4
| |
* | Add cop to make sure we don't use ivar in a moduleLin Jen-Shin2017-09-181-0/+1
|/
* Create and use project path helpers that only need a project, no namespaceDouwe Maan2017-07-051-2/+1
|
* Enable and autocorrect the CustomErrorClass copSean McGivern2017-03-011-1/+1
|
* Stylistic tweaksDouwe Maan2017-02-231-1/+1
|
* Enable Performance/RedundantMatchDouwe Maan2017-02-231-1/+1
|
* Remove 'extended_sha1' option from ExtractsPath moduleHiroyuki Sato2016-11-061-12/+8
|
* Network page appear with an error message when entering nonexistent git revisionHiroyuki Sato2016-11-061-2/+2
|
* Improve ExtractsPath logic related to atom formatdz-fix-extract-pathDmitriy Zaporozhets2016-10-151-8/+9
| | | | | | | * 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>
* Allow browsing branches that end with '.atom'Sean McGivern2016-10-111-2/+31
| | | | | | | | | | | | | 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!
* Restore get_id in ExtractsPathwinniehell2016-08-241-3/+10
|
* Do not escape URI when extracting path (!5878)winniehell2016-08-191-9/+3
|
* Fix front-end for branches that happen to contain urlencoding escape ↵10772-fix-urlencoded-branchnameElliot2016-08-111-1/+1
| | | | | | characters (e.g. %) Signed-off-by: Rémy Coutable <remy@rymai.me>
* Only render 404 page from /publicinified_404_errorValery Sizov2015-10-131-1/+1
|
* Fix "Network" and "Graphs" pages for branches with encoded slashesStan Hu2015-08-021-1/+1
| | | | Closes #1359
* Extract the longest-matching ref from a commit path when multiple matches occurStan Hu2015-07-011-2/+6
| | | | Closes #1839
* Upgrade to Rails 4.1.9Vinnie Okada2015-02-141-1/+2
| | | | | | 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.
* Explicitly set before_filter for ref-related controllersDmitriy Zaporozhets2015-01-261-8/+0
|
* Improve code according to new gitlab_gitDmitriy Zaporozhets2014-02-041-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix blob and repo stuff after gitlab_git v3Dmitriy Zaporozhets2013-10-011-0/+2
|
* Update code to work with gitlab_git 3Dmitriy Zaporozhets2013-10-011-3/+5
|
* A little improvementHiroyuki Sato2013-08-211-3/+3
| | | | | | 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.
* Render not found when failing to look for a commitHiroyuki Sato2013-08-211-6/+10
|
* Update main calls to gitlab_gitDmitriy Zaporozhets2013-08-051-4/+0
|
* Set @options in assing_ref_varsSato Hiroyuki2013-05-131-0/+5
| | | | @options enable to keep params when switching ref.
* Refactor: remove dup codeSato Hiroyuki2013-05-131-3/+15
|
* Fix Gitlab::Git::Repository#commit returns wrong commit, if commit_id is ↵Sato Hiroyuki2013-04-251-3/+1
| | | | "tag name".
* Gitlab::Git::Tree & Blob addedDmitriy Zaporozhets2013-04-021-1/+1
|
* store commits for MR as array of hashesDmitriy Zaporozhets2013-04-021-1/+1
|
* Project.repository should never be nil so you can call repository.exists? or ↵Dmitriy Zaporozhets2013-04-011-2/+2
| | | | | | repository.empty? Also specify separate project factory for project with filled repo
* Extend models functionality with old decorator methods. Use Repository modelDmitriy Zaporozhets2013-03-311-2/+0
|
* Fix tests and remove app/models/repository.rbDmitriy Zaporozhets2013-03-311-2/+2
|
* Fix 404 error while displaying json files.Sato Hiroyuki2013-03-211-19/+6
| | | | | It uses params[:id] instead of request.fullpath. It should fix #3132.
* Don't set format manually, bacause set in routing.Sato Hiroyuki2013-03-061-6/+0
|
* draper raise now RuntimeError instead of NoMethodErrorDmitriy Zaporozhets2013-03-011-1/+1
|
* Fix bug when it has been switched to tag.Sato Hiroyuki2013-02-051-1/+4
|