2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-06-22 15:30:34 +05:30
|
|
|
module Gitlab
|
|
|
|
module Template
|
2016-09-13 17:45:13 +05:30
|
|
|
class GitignoreTemplate < BaseTemplate
|
2016-06-22 15:30:34 +05:30
|
|
|
class << self
|
|
|
|
def extension
|
|
|
|
'.gitignore'
|
|
|
|
end
|
|
|
|
|
|
|
|
def categories
|
|
|
|
{
|
|
|
|
"Languages" => '',
|
|
|
|
"Global" => 'Global'
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def base_dir
|
|
|
|
Rails.root.join('vendor/gitignore')
|
|
|
|
end
|
2016-09-13 17:45:13 +05:30
|
|
|
|
|
|
|
def finder(project = nil)
|
|
|
|
Gitlab::Template::Finders::GlobalTemplateFinder.new(self.base_dir, self.extension, self.categories)
|
|
|
|
end
|
2016-06-22 15:30:34 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|