Class: Gitlab::Template::DockerfileTemplate

Inherits:
BaseTemplate show all
Defined in:
lib/gitlab/template/dockerfile_template.rb

Instance Attribute Summary

Attributes inherited from BaseTemplate

#category

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseTemplate

#<=>, all, by_category, category_directory, #content, find, #full_name, #initialize, #name, #project_id, repository_template_names, #resolve!, template_names_by_category, template_subsets, #to_json

Constructor Details

This class inherits a constructor from Gitlab::Template::BaseTemplate

Class Method Details

.base_dirObject



21
22
23
# File 'lib/gitlab/template/dockerfile_template.rb', line 21

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

.categoriesObject



15
16
17
18
19
# File 'lib/gitlab/template/dockerfile_template.rb', line 15

def categories
  {
    "General" => ''
  }
end

.extensionObject



11
12
13
# File 'lib/gitlab/template/dockerfile_template.rb', line 11

def extension
  '.Dockerfile'
end

.finder(project = nil) ⇒ Object



25
26
27
# File 'lib/gitlab/template/dockerfile_template.rb', line 25

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

Instance Method Details

#descriptionObject



6
7
8
# File 'lib/gitlab/template/dockerfile_template.rb', line 6

def description
  "# This file is a template, and might need editing before it works on your project."
end