Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-17 19:27:30 +0300
committerDouwe Maan <douwe@selenight.nl>2017-05-17 22:10:00 +0300
commit24b105e2e1339fd65cc43727e550edb004277383 (patch)
tree476854995651f0a367a08d8c1accd1a283852e43 /lib/gitlab/file_detector.rb
parentd4d9b731c41cdb4a8b933edff34bd9c9ddf1403a (diff)
Add auxiliary blob viewers to dependency files
Diffstat (limited to 'lib/gitlab/file_detector.rb')
-rw-r--r--lib/gitlab/file_detector.rb22
1 files changed, 19 insertions, 3 deletions
diff --git a/lib/gitlab/file_detector.rb b/lib/gitlab/file_detector.rb
index c6a89597b23..a8cb7fc3fe7 100644
--- a/lib/gitlab/file_detector.rb
+++ b/lib/gitlab/file_detector.rb
@@ -5,17 +5,33 @@ module Gitlab
# a README or a CONTRIBUTING file.
module FileDetector
PATTERNS = {
+ # Project files
readme: /\Areadme/i,
changelog: /\A(changelog|history|changes|news)/i,
license: /\A(licen[sc]e|copying)(\..+|\z)/i,
contributing: /\Acontributing/i,
version: 'version',
+ avatar: /\Alogo\.(png|jpg|gif)\z/,
+
+ # Configuration files
gitignore: '.gitignore',
koding: '.koding.yml',
- gemfile: /\A(Gemfile|gems\.rb)\z/,
gitlab_ci: '.gitlab-ci.yml',
- avatar: /\Alogo\.(png|jpg|gif)\z/,
- route_map: 'route-map.yml'
+ route_map: 'route-map.yml',
+
+ # Dependency files
+ cartfile: /\ACartfile/,
+ composer_json: 'composer.json',
+ gemfile: /\A(Gemfile|gems\.rb)\z/,
+ gemfile_lock: 'Gemfile.lock',
+ gemspec: /\.gemspec\z/,
+ godeps_json: 'Godeps.json',
+ package_json: 'package.json',
+ podfile: 'Podfile',
+ podspec_json: /\.podspec\.json\z/,
+ podspec: /\.podspec\z/,
+ requirements_txt: /requirements\.txt\z/,
+ yarn_lock: 'yarn.lock'
}.freeze
# Returns an Array of file types based on the given paths.