diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-17 11:27:30 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-17 14:10:00 -0500 |
commit | 24b105e2e1339fd65cc43727e550edb004277383 (patch) | |
tree | 476854995651f0a367a08d8c1accd1a283852e43 /lib | |
parent | d4d9b731c41cdb4a8b933edff34bd9c9ddf1403a (diff) | |
download | gitlab-ce-24b105e2e1339fd65cc43727e550edb004277383.tar.gz |
Add auxiliary blob viewers to dependency files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/file_detector.rb | 22 |
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. |