Skip to content

Commit

Permalink
Cookstyle 7.32.8 Fixes
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kitchen-porter authored and ramereth committed Nov 10, 2024
1 parent 4fb4058 commit 60a94ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in the last 3 major versions of the postg

## Unreleased

- resolved cookstyle error: `libraries/sql/_connection.rb:77:11` refactor: `Chef/Style/UnnecessaryPlatformCaseStatement`

## 12.0.0 - *2024-11-05*

- Remove support for Fedora
Expand Down
3 changes: 1 addition & 2 deletions libraries/sql/_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ def install_pg_gem
'libpq5'
end

case node['platform_family']
when 'rhel'
if platform_family?('rhel')
case node['platform_version'].to_i
when 7
declare_resource(:package, 'epel-release') { compile_time(true) }
Expand Down

0 comments on commit 60a94ef

Please sign in to comment.