Nick Thomas
0669127a32
Use cached readme blobs where appropriate
...
GitLab keeps a cache of the rendered HTML for a repository's README as
stored in the HEAD branch. However, it was not used in all
circumstances. In particular, the new blob viewer framework bypassed
this cache entirely.
This MR ensures a ::ReadmeBlob is returned instead of a ::Blob when
asking a repository for an individual blob, if the commit and path
match the readme for HEAD. This makes the cached HTML available to
consumers, including the blob viewer.
The ReadmeBlob is a simple delegator to the Blob, so should be
compatible in all cases. Adding the rendered_markdown method is the
only additional behaviour it contains.
2018-10-17 16:24:36 +01:00
gfyoung
50abbd3e53
Enable frozen string in app/models/*.rb
...
Partially addresses #47424 .
2018-07-26 16:55:41 -07:00
Ahmad Sherif
c370f53cb6
Migrate recursive tree entries fetching to Gitaly
2018-02-26 16:59:29 +01:00
Douwe Maan
00fc9f2607
Load tree readme asynchronously
2017-05-10 08:21:58 -05:00
Yorick Peterse
df5548e19e
Unify detecting of special repository files
...
This moves the logic of detecting special repository files (e.g. a
README or a Koding configuration file) to a single class:
Gitlab::FileDetector. Moving this logic into a single place allows this
to be re-used more easily.
This commit also changes Repository#gitlab_ci_yaml so that its cached
similar to other data (e.g. the Koding configuration file).
2016-11-21 12:51:40 +01:00
Rebeca Méndez
5c966f70fb
Issue #4270 : Recursive option for files through API
2016-11-12 10:00:39 +01:00
Jacob Vosmaer
51574d779c
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into lazy-blobs
2016-02-01 13:51:05 +01:00
Jacob Vosmaer
64c8ee47c9
WIP lazy blobs
2016-02-01 10:41:52 +01:00
Douglas Barbosa Alexandre
1aa82dc459
Prioritize previewable over plain README files
2016-01-25 11:27:07 -02:00
Douglas Barbosa Alexandre
6ce01ca3ec
Validate README format before displaying
...
Take the first previewable README file as project’s README, otherwise
if none file is available, or we can’t preview any of them, we assume
that project doesn’t have a README file.
2016-01-05 11:06:18 -02:00
Jakub Jirutka
daa0925016
Rename MarkdownHelper to MarkupHelper
2015-05-18 22:51:56 +02:00
Douwe Maan
d328b4166e
Fix tree readme.
2015-03-18 14:08:26 +01:00
Douwe Maan
31e484085a
Find tree readme lazily.
2015-03-18 14:08:26 +01:00
Douwe Maan
88f9ed3d19
Move finding of contributing file from tree to repository.
2015-03-18 14:08:26 +01:00
Ciro Santilli
07e9cb6b77
Factor markup? || gitlab_markdown? into new method
2014-10-04 17:56:12 +02:00
Robert Schilling
d7701a263f
Move calls to Gitlab::MarkdownHelper to application_helper
2014-08-11 11:59:36 +02:00
Robert Schilling
99eb283101
Use readme we support to render if there are multiple readmes
2014-08-11 08:50:56 +02:00
Dmitriy Zaporozhets
cac868ee94
Use new gitlab_git gem. It makes CONTRIBUTING.md work
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-27 15:52:14 +02:00
Jeroen van Baarsen
bb35c2d36f
Added the contribution guide notice
...
This is shown at the creation of new issues and new merge requests, when
the repository has a contribution guide file.
2014-02-22 16:37:10 +01: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
41f63acc84
Fix README detection for subdir
2013-10-13 16:03:16 +03:00
Dmitriy Zaporozhets
ae9dd62762
Update code to work with gitlab_git 3
2013-10-01 17:00:28 +03: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
bbfbff3add
Extend models functionality with old decorator methods. Use Repository model
2013-03-31 23:48:12 +03:00
Dmitriy Zaporozhets
39ba934c0a
REpostiry, Team models
2013-01-03 21:09:18 +02:00
Saito
f1ac2a616b
remove encode lib, clean all encoded area.
2012-11-09 01:41:07 +08:00
Nihad Abbasov
841e4fbd08
cosmetical cleanup of models
2012-09-27 02:05:53 -07:00
Robert Speicher
e33cbb9b42
Add TreeController and spec
2012-09-26 16:32:21 -04:00
Saito
96d4f22e53
tree view need use ascii-8bit, file name need be utf8.
2012-09-11 19:18:14 +08:00
Robert Speicher
7754189187
Fully embrace Ruby 1.9 hash syntax
...
Didn't bother with files in db/, config/, or features/
2012-08-10 18:25:15 -04:00
Dmitriy Zaporozhets
9c76bd9540
Project linguist integration
2012-04-21 01:26:22 +03:00
Dmitriy Zaporozhets
9a2a861276
Design tab for profile. Colorscheme as db value
2011-12-20 22:47:09 +02:00
gitlabhq
6a2c7d80cb
fixed image preview
2011-12-01 09:16:53 -05:00
gitlabhq
3f0d807955
file name overflow fixed
2011-11-22 07:50:47 -05:00
gitlabhq
3f35cccfbd
ref controller refactored
2011-11-21 01:16:10 -05:00
Dmitriy Zaporozhets
4bf4efe712
decorators & tree model
2011-11-20 22:32:12 +02:00