Skip to content

Commit 0d04093

Browse files
Cookstyle 7.32.8 Fixes (#779)
Issues found and resolved with: libraries/sql/_connection.rb - 77:11 refactor: Chef/Style/UnnecessaryPlatformCaseStatement - Use the platform? and platform_family? helpers instead of a case statement that only includes a single when statement. https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement Signed-off-by: kitchen-porter <[email protected]>
1 parent 4fb4058 commit 0d04093

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This file is used to list changes made in the last 3 major versions of the postg
44

55
## Unreleased
66

7+
- resolved cookstyle error: `libraries/sql/_connection.rb:77:11` refactor: `Chef/Style/UnnecessaryPlatformCaseStatement`
8+
79
## 12.0.0 - *2024-11-05*
810

911
- Remove support for Fedora

libraries/sql/_connection.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ def install_pg_gem
7474
'libpq5'
7575
end
7676

77-
case node['platform_family']
78-
when 'rhel'
77+
if platform_family?('rhel')
7978
case node['platform_version'].to_i
8079
when 7
8180
declare_resource(:package, 'epel-release') { compile_time(true) }

0 commit comments

Comments
 (0)