Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2021-06-08 03:53:04 +0300
committerEvan Read <eread@gitlab.com>2021-06-08 03:53:04 +0300
commitb764446a6e579ee010cb0f7f1699d8bd17d740fb (patch)
treea498b1f660ef354e1f10cf6b39359f6ebe51b706
parentb9a503bc1da248c2805d0af38c408e1963b12a01 (diff)
Refactor Edit on GitLab code
-rw-r--r--lib/helpers/edit_on_gitlab.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/helpers/edit_on_gitlab.rb b/lib/helpers/edit_on_gitlab.rb
index 2946c1f9..97b4d62a 100644
--- a/lib/helpers/edit_on_gitlab.rb
+++ b/lib/helpers/edit_on_gitlab.rb
@@ -10,20 +10,21 @@ module Nanoc::Helpers
# This should be the path from the doc/ directory for a given file.
docs_content_filename = content_filename_array.join("/")
- if product == "omnibus"
+ case product
+ when "omnibus"
# omnibus-gitlab repo
gitlab_url = "https://gitlab.com/gitlab-org/#{product}-gitlab/blob/master/doc/#{docs_content_filename}"
gitlab_ide_url = "https://gitlab.com/-/ide/project/gitlab-org/#{product}-gitlab/edit/master/-/doc/#{docs_content_filename}"
- elsif product == "runner"
+ when "runner"
# gitlab-runner repo
gitlab_url = "https://gitlab.com/gitlab-org/gitlab-#{product}/blob/master/docs/#{docs_content_filename}"
gitlab_ide_url = "https://gitlab.com/-/ide/project/gitlab-org/gitlab-#{product}/edit/master/-/docs/#{docs_content_filename}"
- elsif product == "charts"
+ when "charts"
# GitLab Helm chart repo
gitlab_url = "https://gitlab.com/gitlab-org/#{product}/gitlab/blob/master/doc/#{docs_content_filename}"
gitlab_ide_url = "https://gitlab.com/-/ide/project/gitlab-org/#{product}/gitlab/edit/master/-/doc/#{docs_content_filename}"
# gitlab-foss and gitlab repos
- elsif product = "ee"
+ when "ee"
gitlab_url = "https://gitlab.com/gitlab-org/gitlab/blob/master/doc/#{docs_content_filename}"
gitlab_ide_url = "https://gitlab.com/-/ide/project/gitlab-org/gitlab/edit/master/-/doc/#{docs_content_filename}"
else