2016-05-27 05:00:56 -04:00
|
|
|
module Gitlab
|
|
|
|
module Template
|
2016-06-24 15:43:46 -04:00
|
|
|
class GitignoreTemplate < BaseTemplate
|
2016-05-27 05:00:56 -04:00
|
|
|
class << self
|
|
|
|
def extension
|
|
|
|
'.gitignore'
|
|
|
|
end
|
|
|
|
|
|
|
|
def categories
|
|
|
|
{
|
2016-06-02 12:20:08 -04:00
|
|
|
"Languages" => '',
|
|
|
|
"Global" => 'Global'
|
2016-05-27 05:00:56 -04:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def base_dir
|
|
|
|
Rails.root.join('vendor/gitignore')
|
|
|
|
end
|
2016-06-24 15:43:46 -04:00
|
|
|
|
|
|
|
def finder(project = nil)
|
|
|
|
Gitlab::Template::Finders::GlobalTemplateFinder.new(self.base_dir, self.extension, self.categories)
|
|
|
|
end
|
2016-05-27 05:00:56 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|