Module: Gitlab::Client::Templates
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/templates.rb
Overview
Defines methods related to templates.
Instance Method Summary collapse
-
#dockerfile_template(key) ⇒ Gitlab::ObjectifiedHash
Get a single Dockerfile template.
-
#dockerfile_templates ⇒ Array<Gitlab::ObjectifiedHash>
Get all Dockerfile templates.
-
#gitignore_template(key) ⇒ Gitlab::ObjectifiedHash
Get a single gitignore template.
-
#gitignore_templates ⇒ Array<Gitlab::ObjectifiedHash>
Get all gitignore templates.
-
#gitlab_ci_yml_template(key) ⇒ Gitlab::ObjectifiedHash
Get a single ‘gitlab_ci.yml` template.
-
#gitlab_ci_yml_templates ⇒ Array<Gitlab::ObjectifiedHash>
Get all ‘gitlab_ci.yml` templates.
-
#license_template(key, options = {}) ⇒ Gitlab::ObjectifiedHash
Get a single license template.
-
#license_templates(options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Get all license templates.
Instance Method Details
#dockerfile_template(key) ⇒ Gitlab::ObjectifiedHash
Get a single Dockerfile template.
27 28 29 |
# File 'lib/gitlab/client/templates.rb', line 27 def dockerfile_template(key) get("/templates/dockerfiles/#{key}") end |
#dockerfile_templates ⇒ Array<Gitlab::ObjectifiedHash>
Get all Dockerfile templates.
16 17 18 |
# File 'lib/gitlab/client/templates.rb', line 16 def dockerfile_templates get('/templates/dockerfiles') end |
#gitignore_template(key) ⇒ Gitlab::ObjectifiedHash
Get a single gitignore template.
48 49 50 |
# File 'lib/gitlab/client/templates.rb', line 48 def gitignore_template(key) get("/templates/gitignores/#{key}") end |
#gitignore_templates ⇒ Array<Gitlab::ObjectifiedHash>
Get all gitignore templates.
37 38 39 |
# File 'lib/gitlab/client/templates.rb', line 37 def gitignore_templates get('/templates/gitignores') end |
#gitlab_ci_yml_template(key) ⇒ Gitlab::ObjectifiedHash
Get a single ‘gitlab_ci.yml` template.
69 70 71 |
# File 'lib/gitlab/client/templates.rb', line 69 def gitlab_ci_yml_template(key) get("/templates/gitlab_ci_ymls/#{key}") end |
#gitlab_ci_yml_templates ⇒ Array<Gitlab::ObjectifiedHash>
Get all ‘gitlab_ci.yml` templates.
58 59 60 |
# File 'lib/gitlab/client/templates.rb', line 58 def gitlab_ci_yml_templates get('/templates/gitlab_ci_ymls') end |
#license_template(key, options = {}) ⇒ Gitlab::ObjectifiedHash
Get a single license template. You can pass parameters to replace the license placeholder.
96 97 98 |
# File 'lib/gitlab/client/templates.rb', line 96 def license_template(key, = {}) get("/templates/licenses/#{key}", query: ) end |
#license_templates(options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Get all license templates.
82 83 84 |
# File 'lib/gitlab/client/templates.rb', line 82 def license_templates( = {}) get('/templates/licenses', query: ) end |