diff options
author | Rémy Coutable <remy@rymai.me> | 2017-05-18 18:34:19 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-05-18 18:34:19 +0200 |
commit | 06b614f9fd7a311b9cbc6ad90eecb4cfc5281c78 (patch) | |
tree | dacce502b77bfbcacef7cc670ee2531668951f07 /lib | |
parent | 4de3d0b1bea5066e772ad6a7d02614d907594f17 (diff) | |
parent | 1ede99571b1d65c146757267e8104ecbc026f6ff (diff) | |
download | gitlab-ce-06b614f9fd7a311b9cbc6ad90eecb4cfc5281c78.tar.gz |
Merge branch 'dm-gemfile-viewer'
See merge request !11346.
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. |