Skip to content

Commit

Permalink
Use a more recent Rubocop and fix offenses
Browse files Browse the repository at this point in the history
Change-Id: I7474b4c43eeb4d161b66b859c6cb705f5eacb2ce
  • Loading branch information
josqu4red committed Oct 24, 2022
1 parent 0498317 commit 9e96ae0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
12 changes: 3 additions & 9 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
# - submit the change in the code_generator

AllCops:
TargetRubyVersion: 2.4

TargetRubyVersion: 2.7

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

### Disable line length constraint
Metrics/LineLength:
Layout/LineLength:
Max: 180
# Because we're not in the 80s anymore.
# Based on data from http://sideeffect.kr/popularconvention#ruby
Expand Down Expand Up @@ -45,7 +44,7 @@ Style/TrailingCommaInHashLiteral:
# }
#
### Align hashes as a table
Layout/AlignHash:
Layout/HashAlignment:
EnforcedColonStyle: table
EnforcedHashRocketStyle: key
# When dealing with long key names, it is easier to read hashes in colon
Expand Down Expand Up @@ -98,11 +97,6 @@ Style/FormatString:
Style/MultilineBlockChain:
Enabled: false

# We ain't serving subseconds requests. Forcing to use tr instead of gsub will
# be annoying without much value
Performance/StringReplacement:
Enabled: false

# We don't write documentation there at the moment
Style/Documentation:
Enabled: false
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ group :ec2 do
end

# Other gems should go after this comment
gem 'rubocop', '=0.61.1'
gem 'rubocop', '=1.29.1'
3 changes: 1 addition & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

default['mariadb']['database']['name'] = 'librenms'
default['mariadb']['user_librenms']['username'] = 'librenms'
default['mariadb']['user_librenms']['password'] = 'default'
Expand Down Expand Up @@ -31,7 +30,7 @@
default['librenms']['env']['DB_DATABASE'] = node['mariadb']['database']['name']
default['librenms']['env']['DB_USERNAME'] = node['mariadb']['user_librenms']['username']
default['librenms']['env']['DB_PASSWORD'] = node['mariadb']['user_librenms']['password']
default['librenms']['env']['APP_URL'] = 'http://' + node['librenms']['web']['name'] + '/'
default['librenms']['env']['APP_URL'] = "http://#{node['librenms']['web']['name']}/"

# snmpd
default['librenms']['snmp']['community'] = 'public'
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Installs/Configures librenms'
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.'
long_description 'Installs and configures LibreNMS along with the required components (Apache and MySQL). LibreNMS is an autodiscovering PHP/MySQL-based network monitoring system.'
issues_url 'https://github.com/criteo-cookbooks/librenms/issues'
source_url 'https://github.com/criteo-cookbooks/librenms'
version '0.2.29'
Expand Down
4 changes: 2 additions & 2 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@
# enforce right permissions

facl dir do
group :'' => 'rwx'
default :group => { :'' => 'rwx' }
group '': 'rwx'
default group: { '': 'rwx' }
recurse true
end
end
Expand Down

0 comments on commit 9e96ae0

Please sign in to comment.