Skip to content

Commit c9b7a89

Browse files
Cookstyle 7.32.8 Fixes
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 c9b7a89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ 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`
78
## 12.0.0 - *2024-11-05*
89

910
- 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)