Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
omnibus-heptapod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
heptapod
omnibus-heptapod
Commits
e8e1bca3ac2f
Commit
e8e1bca3ac2f
authored
3 years ago
by
Gabriel Mazetto
Browse files
Options
Downloads
Patches
Plain Diff
Fix rubocop violations
parent
8832ca4ff484
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!55
Intermediate build after shift of stable series
,
!54
GitLab 14.4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.rubocop_todo.yml
+0
-10
0 additions, 10 deletions
.rubocop_todo.yml
files/gitlab-cookbooks/package/libraries/settings_dsl.rb
+5
-6
5 additions, 6 deletions
files/gitlab-cookbooks/package/libraries/settings_dsl.rb
with
5 additions
and
16 deletions
.rubocop_todo.yml
+
0
−
10
View file @
e8e1bca3
...
...
@@ -97,14 +97,6 @@
-
'
spec/chef_helper.rb'
-
'
spec/spec_helper.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowedMethods.
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
Lint/RedundantSafeNavigation
:
Exclude
:
-
'
files/gitlab-cookbooks/package/libraries/helpers/settings_helper.rb'
# Offense count: 2
# Configuration parameters: IgnoredMethods.
Metrics/CyclomaticComplexity
:
...
...
@@ -187,7 +179,6 @@
Exclude
:
-
'
files/gitlab-cookbooks/gitlab/libraries/helpers/base_pg_helper.rb'
-
'
files/gitlab-cookbooks/gitlab/libraries/helpers/pg_status_helper.rb'
-
'
files/gitlab-cookbooks/package/libraries/helpers/settings_helper.rb'
# Offense count: 3
# Cop supports --auto-correct.
...
...
@@ -345,7 +336,6 @@
Exclude
:
-
'
config/software/rubygems.rb'
-
'
files/gitlab-cookbooks/gitlab/libraries/redis_helper.rb'
-
'
files/gitlab-cookbooks/package/libraries/helpers/settings_helper.rb'
# Offense count: 1
# Cop supports --auto-correct.
...
...
This diff is collapsed.
Click to expand it.
files/gitlab-cookbooks/package/libraries/settings_dsl.rb
+
5
−
6
View file @
e8e1bca3
...
...
@@ -28,8 +28,7 @@
def
self
.
extended
(
base
)
# Setup getter/setters for roles and settings
class
<<
base
attr_accessor
:available_roles
attr_accessor
:settings
attr_accessor
:available_roles
,
:settings
end
base
.
available_roles
=
{}
...
...
@@ -161,7 +160,7 @@
DefaultRole
.
load_role
@available_roles
.
each
do
|
key
,
value
|
handler
=
value
.
handler
handler
.
load_role
if
handler
&&
handler
.
respond_to?
(
:load_role
)
handler
.
load_role
if
handler
.
respond_to?
(
:load_role
)
end
end
...
...
@@ -172,7 +171,7 @@
# Parse secrets using the handlers
sorted_settings
.
each
do
|
_key
,
value
|
handler
=
value
.
handler
handler
.
parse_secrets
if
handler
&&
handler
.
respond_to?
(
:parse_secrets
)
handler
.
parse_secrets
if
handler
.
respond_to?
(
:parse_secrets
)
end
SecretsHelper
.
write_to_gitlab_secrets
...
...
@@ -184,7 +183,7 @@
# Parse all our variables using the handlers
sorted_settings
.
each
do
|
_key
,
value
|
handler
=
value
.
handler
handler
.
parse_variables
if
handler
&&
handler
.
respond_to?
(
:parse_variables
)
handler
.
parse_variables
if
handler
.
respond_to?
(
:parse_variables
)
end
# The last step is to convert underscores to hyphens in top-level keys
strip_nils
(
hyphenate_config_keys
)
...
...
@@ -222,7 +221,7 @@
end
def
handler
@handler
=
@handler
.
call
if
@handler
&
.
respond_to?
(
:call
)
@handler
=
@handler
.
call
if
@handler
.
respond_to?
(
:call
)
@handler
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment