Class: Gitlab::SampleDataTemplate

Inherits:
ProjectTemplate show all
Defined in:
lib/gitlab/sample_data_template.rb

Instance Attribute Summary

Attributes inherited from ProjectTemplate

#description, #logo, #name, #preview, #title

Class Method Summary collapse

Methods inherited from ProjectTemplate

#==, #archive_filename, #archive_path, #clone_url, #file, find, #initialize, #project_host, #project_path, #uri_encoded_project_path

Constructor Details

This class inherits a constructor from Gitlab::ProjectTemplate

Class Method Details

.allObject



12
13
14
# File 'lib/gitlab/sample_data_template.rb', line 12

def all
  localized_templates_table
end

.archive_directoryObject



16
17
18
# File 'lib/gitlab/sample_data_template.rb', line 16

def archive_directory
  Rails.root.join("vendor/sample_data_templates")
end

.localized_templates_tableObject



6
7
8
9
10
# File 'lib/gitlab/sample_data_template.rb', line 6

def localized_templates_table
  [
    SampleDataTemplate.new('sample', 'Sample GitLab Project', _('An example project that shows off the best practices for setting up GitLab for your own organization, including sample issues, merge requests, and milestones'), 'https://gitlab.com/gitlab-org/sample-data-templates/sample-gitlab-project')
  ].freeze
end