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:
authorSarah German <sgerman@gitlab.com>2023-01-30 20:04:47 +0300
committerSarah German <sgerman@gitlab.com>2023-01-30 20:04:47 +0300
commit869cfc5d7ed95202e6290d92312cd86c40a55447 (patch)
tree423a51edf4065c1512d2510537996aad5b21c803
parent152b3adcc766d289f8a2e7b894d6ecad03a99922 (diff)
parent5356dd156556d67ac70af4ca64ac86ab2190a074 (diff)
Merge branch 'eread/resolve-more-rubocop-violations' into 'main'
Resolve more RuboCop violations See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/3478 Merged-by: Sarah German <sgerman@gitlab.com> Approved-by: Ash McKenzie <amckenzie@gitlab.com> Approved-by: Sarah German <sgerman@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com>
-rw-r--r--lib/helpers/generic.rb2
-rw-r--r--lib/helpers/icons_helper.rb4
-rw-r--r--spec/lib/gitlab/docs/page_spec.rb8
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/helpers/generic.rb b/lib/helpers/generic.rb
index 1f7a091c..6fa5fe5f 100644
--- a/lib/helpers/generic.rb
+++ b/lib/helpers/generic.rb
@@ -44,7 +44,7 @@ module Nanoc::Helpers
# don't want to render in one of the upstream products.
#
def gitlab_docs_or_local?
- ENV['CI_PROJECT_NAME'] == 'gitlab-docs' or ENV['CI_PROJECT_NAME'].nil?
+ ENV['CI_PROJECT_NAME'] == 'gitlab-docs' || ENV['CI_PROJECT_NAME'].nil?
end
#
diff --git a/lib/helpers/icons_helper.rb b/lib/helpers/icons_helper.rb
index b0831d48..3d1c8e95 100644
--- a/lib/helpers/icons_helper.rb
+++ b/lib/helpers/icons_helper.rb
@@ -6,9 +6,9 @@ module Nanoc::Helpers
module IconsHelper
extend self
- ICONS_SVG = '/assets/images/icons.svg' unless const_defined?('ICONS_SVG')
+ ICONS_SVG = '/assets/images/icons.svg' unless const_defined?(:ICONS_SVG)
- unless const_defined?('GITLAB_SVGS_MAPPING')
+ unless const_defined?(:GITLAB_SVGS_MAPPING)
GITLAB_SVGS_MAPPING = {
'bulb' => 'tip',
'information-o' => 'note',
diff --git a/spec/lib/gitlab/docs/page_spec.rb b/spec/lib/gitlab/docs/page_spec.rb
index 44454385..a3ca9c12 100644
--- a/spec/lib/gitlab/docs/page_spec.rb
+++ b/spec/lib/gitlab/docs/page_spec.rb
@@ -46,16 +46,16 @@ describe Gitlab::Docs::Page do
describe '#hrefs' do
it 'collects all hrefs' do
expect(subject.hrefs).to match_array %w[../link.html#my-anchor
- #internal-anchor
- #internal-anchor-2
- #utf-8-id-✔]
+ #internal-anchor
+ #internal-anchor-2
+ #utf-8-id-✔]
end
end
describe '#ids' do
it 'collects all ids' do
expect(subject.ids).to match_array %w[internal-anchor
- utf-8-id-✔]
+ utf-8-id-✔]
end
end