-
- Downloads
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).
Showing
- app/models/repository.rb 13 additions, 15 deletionsapp/models/repository.rb
- app/models/tree.rb 3 additions, 1 deletionapp/models/tree.rb
- lib/gitlab/file_detector.rb 63 additions, 0 deletionslib/gitlab/file_detector.rb
- spec/lib/gitlab/file_detector_spec.rb 59 additions, 0 deletionsspec/lib/gitlab/file_detector_spec.rb
- spec/models/repository_spec.rb 94 additions, 0 deletionsspec/models/repository_spec.rb
lib/gitlab/file_detector.rb
0 → 100644
spec/lib/gitlab/file_detector_spec.rb
0 → 100644
Please register or sign in to comment