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