BigW Consortium Gitlab

gitignore_template.rb 544 Bytes
Newer Older
1 2
module Gitlab
  module Template
3
    class GitignoreTemplate < BaseTemplate
4 5 6 7 8 9 10
      class << self
        def extension
          '.gitignore'
        end

        def categories
          {
11 12
            "Languages" => '',
            "Global"    => 'Global'
13 14 15 16 17 18
          }
        end

        def base_dir
          Rails.root.join('vendor/gitignore')
        end
19 20 21 22

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