Skip to content

Commit 8095cce

Browse files
committed
(GH-cat-9) Rubocop fixes
1 parent 1e25921 commit 8095cce

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/facter/mysql_server_id.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ def mysql_id_get
1515

1616
Facter.add('mysql_server_id') do
1717
setcode do
18-
begin
19-
mysql_id_get
20-
rescue
21-
nil
22-
end
18+
mysql_id_get
19+
rescue
20+
nil
2321
end
2422
end

lib/puppet/provider/mysql_grant/mysql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def self.instances
6969
sorted_privileges = ['ALL']
7070

7171
# Currently there is an issue with the behaviour of the module which was highlighted by the 'complex test' test case in 'mysql_grant_spec'. The module, upon retrieving all privileges from an
72-
# user, does not take into account that the latest version of mysql now includes dynamic privileges which are returned alongside the original static privileges and are set by 'ALL PRIVILEGES'
72+
# user, does not take into account that the latest version of mysql now includes dynamic privileges which are returned alongside the original static privileges and are set by 'ALL PRIVILEGES'
7373
# (shortened to 'ALL'). This is a workaround to remove the unnecesary privileges from the sorted_privileges list which is used to check for idempotency in test cases.
7474
elsif sorted_privileges == ['ALL', 'APPLICATION_PASSWORD_ADMIN', 'AUDIT_ABORT_EXEMPT', 'AUDIT_ADMIN', 'AUTHENTICATION_POLICY_ADMIN', 'BACKUP_ADMIN', 'BINLOG_ADMIN', 'BINLOG_ENCRYPTION_ADMIN',
7575
'CLONE_ADMIN', 'CONNECTION_ADMIN', 'ENCRYPTION_KEY_ADMIN', 'FLUSH_OPTIMIZER_COSTS', 'FLUSH_STATUS', 'FLUSH_TABLES', 'FLUSH_USER_RESOURCES',

0 commit comments

Comments
 (0)