Skip to content

Commit 085e207

Browse files
committedOct 24, 2022
Use a more recent Rubocop and fix offenses
Change-Id: I7474b4c43eeb4d161b66b859c6cb705f5eacb2ce
1 parent e0b130d commit 085e207

File tree

5 files changed

+8
-15
lines changed

5 files changed

+8
-15
lines changed
 

‎.rubocop.yml

+3-9
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# - submit the change in the code_generator
55

66
AllCops:
7-
TargetRubyVersion: 2.4
8-
7+
TargetRubyVersion: 2.7
98

109
# This requires to alphabetically sort Gem's requirements
1110
Bundler/OrderedGems:
@@ -17,7 +16,7 @@ Style/FrozenStringLiteralComment:
1716
Enabled: false
1817

1918
### Disable line length constraint
20-
Metrics/LineLength:
19+
Layout/LineLength:
2120
Max: 180
2221
# Because we're not in the 80s anymore.
2322
# Based on data from http://sideeffect.kr/popularconvention#ruby
@@ -45,7 +44,7 @@ Style/TrailingCommaInHashLiteral:
4544
# }
4645
#
4746
### Align hashes as a table
48-
Layout/AlignHash:
47+
Layout/HashAlignment:
4948
EnforcedColonStyle: table
5049
EnforcedHashRocketStyle: key
5150
# When dealing with long key names, it is easier to read hashes in colon
@@ -98,11 +97,6 @@ Style/FormatString:
9897
Style/MultilineBlockChain:
9998
Enabled: false
10099

101-
# We ain't serving subseconds requests. Forcing to use tr instead of gsub will
102-
# be annoying without much value
103-
Performance/StringReplacement:
104-
Enabled: false
105-
106100
# We don't write documentation there at the moment
107101
Style/Documentation:
108102
Enabled: false

‎Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ group :ec2 do
1717
end
1818

1919
# Other gems should go after this comment
20-
gem 'rubocop', '=0.61.1'
20+
gem 'rubocop', '=1.29.1'

‎attributes/default.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
default['mariadb']['database']['name'] = 'librenms'
32
default['mariadb']['user_librenms']['username'] = 'librenms'
43
default['mariadb']['user_librenms']['password'] = 'default'
@@ -31,7 +30,7 @@
3130
default['librenms']['env']['DB_DATABASE'] = node['mariadb']['database']['name']
3231
default['librenms']['env']['DB_USERNAME'] = node['mariadb']['user_librenms']['username']
3332
default['librenms']['env']['DB_PASSWORD'] = node['mariadb']['user_librenms']['password']
34-
default['librenms']['env']['APP_URL'] = 'http://' + node['librenms']['web']['name'] + '/'
33+
default['librenms']['env']['APP_URL'] = "http://#{node['librenms']['web']['name']}/"
3534

3635
# snmpd
3736
default['librenms']['snmp']['community'] = 'public'

‎metadata.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
maintainer_email 'use_github_issues@criteo.com'
44
license 'Apache-2.0'
55
description 'Installs/Configures librenms'
6-
long_description 'This cookbook installs and configure LibreNMS along with the required components (Apache and MySQL). LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system.'
6+
long_description 'Installs and configures LibreNMS along with the required components (Apache and MySQL). LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system.'
77
issues_url 'https://github.com/criteo-cookbooks/librenms/issues'
88
source_url 'https://github.com/criteo-cookbooks/librenms'
99
version '0.2.29'

‎recipes/default.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@
242242
# enforce right permissions
243243

244244
facl dir do
245-
group :'' => 'rwx'
246-
default :group => { :'' => 'rwx' }
245+
group '': 'rwx'
246+
default group: { '': 'rwx' }
247247
recurse true
248248
end
249249
end

0 commit comments

Comments
 (0)
Please sign in to comment.