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:
authorRussell Dickenson <rdickenson@gitlab.com>2022-05-31 23:24:24 +0300
committerRussell Dickenson <rdickenson@gitlab.com>2022-05-31 23:24:24 +0300
commit948859b99689a9136e9ad45fb8265e929337c8a7 (patch)
tree884f95a79877ffc20a9f6997562612350e768841
parent2a2d1169d22e221b6da9e0ad17915a39fb02c81a (diff)
parentb398a5ed00379cc79d805bb4b3ddcd67c082457d (diff)
Merge branch 'eread/fix-white-space-rubocop-offenses' into 'main'
Fix various RuboCop offenses related to white space See merge request gitlab-org/gitlab-docs!2741
-rw-r--r--Rakefile5
-rw-r--r--commands/frontend.rb1
-rw-r--r--lib/gitlab/navigation.rb1
-rw-r--r--lib/helpers/gitlab_kramdown.rb36
4 files changed, 24 insertions, 19 deletions
diff --git a/Rakefile b/Rakefile
index 13bdcab2..2aa91897 100644
--- a/Rakefile
+++ b/Rakefile
@@ -228,6 +228,7 @@ task :symlink_readmes do
target = "#{dirname}/index.html"
next if File.symlink?(target)
+
puts "\n#{COLOR_CODE_GREEN}INFO: Symlinking to #{target}..#{COLOR_CODE_RESET}"
`ln -sf README.html #{target}`
end
@@ -352,6 +353,7 @@ namespace :docs do
# To not be confused with the remove_date of the Markdown page.
#
next unless remove_date < today
+
puts "In #{filename}, remove date: #{remove_date} is less than today (#{today})."
counter += 1
@@ -397,8 +399,10 @@ namespace :docs do
puts "\n#{COLOR_CODE_GREEN}INFO: (#{slug}): Committing and pushing to create a merge request..#{COLOR_CODE_RESET}"
system("git add .")
system("git commit --quiet -m 'Update docs redirects #{today}'")
+
`git push --set-upstream origin #{redirects_branch} -o merge_request.create -o merge_request.remove_source_branch -o merge_request.title="#{mr_title}" -o merge_request.description="#{mr_description}" -o merge_request.label="Technical Writing" -o merge_request.label="documentation" -o merge_request.label="docs::improvement"` \
if ENV['SKIP_MR'].nil?
+
Dir.chdir(source_dir)
puts
end
@@ -415,6 +419,7 @@ namespace :docs do
puts "\n#{COLOR_CODE_GREEN}INFO: (gitlab-docs): Committing and pushing to create a merge request..#{COLOR_CODE_RESET}"
system("git add #{redirects_yaml}")
system("git commit --quiet -m 'Update docs redirects #{today}'")
+
`git push --set-upstream origin #{redirects_branch} -o merge_request.create -o merge_request.remove_source_branch -o merge_request.title="#{mr_title}" -o merge_request.description="#{mr_description}" -o merge_request.label="Technical Writing" -o merge_request.label="redirects" -o merge_request.label="Category:Docs Site"` \
if ENV['SKIP_MR'].nil?
end
diff --git a/commands/frontend.rb b/commands/frontend.rb
index 0e9e7e90..0b669ef3 100644
--- a/commands/frontend.rb
+++ b/commands/frontend.rb
@@ -48,5 +48,4 @@ run do |opts, args, cmd|
puts "Copied #{gl_ui_src}/#{filename}"
end
end
-
end
diff --git a/lib/gitlab/navigation.rb b/lib/gitlab/navigation.rb
index feb79a80..014f567f 100644
--- a/lib/gitlab/navigation.rb
+++ b/lib/gitlab/navigation.rb
@@ -73,6 +73,5 @@ module Gitlab
def dir
@dir ||= item.identifier.to_s[%r{(?<=/)[^/]+}]
end
-
end
end
diff --git a/lib/helpers/gitlab_kramdown.rb b/lib/helpers/gitlab_kramdown.rb
index c409a579..e9761f90 100644
--- a/lib/helpers/gitlab_kramdown.rb
+++ b/lib/helpers/gitlab_kramdown.rb
@@ -4,23 +4,25 @@ module Nanoc::Helpers
module GitLabKramdown
require 'kramdown'
def markdown(item, params = {})
- Nanoc::Filters::GitLabKramdown.new.run(item, {
- input: 'GitlabKramdown',
- syntax_highlighter: 'rouge',
- syntax_highlighter_opts: {
- # In kramdown 2.0, the plaintext parser was removed and replaced by the
- # :guess_lang option:
- #
- # - https://github.com/gettalong/kramdown/blob/master/doc/news/release_2_0_0.page
- # - https://github.com/gettalong/kramdown/pull/573
- guess_lang: true
- },
- default_lang: 'Plain Text',
- hard_wrap: false,
- auto_ids: true,
- toc_levels: 2..5,
- with_toc: true
- })
+ Nanoc::Filters::GitLabKramdown.new.run(
+ item,
+ {
+ input: 'GitlabKramdown',
+ syntax_highlighter: 'rouge',
+ syntax_highlighter_opts: {
+ # In kramdown 2.0, the plaintext parser was removed and replaced by the
+ # :guess_lang option:
+ #
+ # - https://github.com/gettalong/kramdown/blob/master/doc/news/release_2_0_0.page
+ # - https://github.com/gettalong/kramdown/pull/573
+ guess_lang: true
+ },
+ default_lang: 'Plain Text',
+ hard_wrap: false,
+ auto_ids: true,
+ toc_levels: 2..5,
+ with_toc: true
+ })
end
end
end