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

gitignore_template.rb « template « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d8e0ec8241066e385fd761e462e86d7ce5f1bf34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module Gitlab
  module Template
    class GitignoreTemplate < BaseTemplate
      class << self
        def extension
          '.gitignore'
        end

        def categories
          {
            "Languages" => '',
            "Global" => 'Global'
          }
        end

        def base_dir
          Rails.root.join('vendor/gitignore')
        end

        def finder(project = nil)
          Gitlab::Template::Finders::GlobalTemplateFinder.new(self.base_dir, self.extension, self.categories)
        end
      end
    end
  end
end