Skip to content

Commit

Permalink
Automated PR: Cookstyle Changes (#16)
Browse files Browse the repository at this point in the history
* Cookstyle 7.25.6 Fixes

Issues found and resolved with: recipes/svscan.rb

 - 26:6 refactor: Chef/Modernize/UseChefLanguageSystemdHelper - Chef Infra Client 15.5 and later include a systemd? helper for checking if a Linux system uses systemd. https://docs.chef.io/workstation/cookstyle/chef_modernize_usecheflanguagesystemdhelper

Issues found and resolved with: resources/service.rb

 - 160:1 refactor: Chef/Modernize/ClassEvalActionClass - In Chef Infra Client 12.9 and later it is no longer necessary to call the class_eval method on the action class block. https://docs.chef.io/workstation/cookstyle/chef_modernize_classevalactionclass

Signed-off-by: kitchen-porter <board@sous-chefs.org>

* Update CHANGELOG.md

Co-authored-by: Tomoya Kabe <limit.usus@gmail.com>
  • Loading branch information
kitchen-porter and limitusus committed Jan 6, 2022
1 parent 33b997d commit bc5e942
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ This file is used to list changes made in each version of the daemontools cookbo

## Unreleased

- resolved cookstyle error: recipes/svscan.rb:26:6 refactor: `Chef/Modernize/UseChefLanguageSystemdHelper`
- resolved cookstyle error: resources/service.rb:160:1 refactor: `Chef/Modernize/ClassEvalActionClass`

## 1.6.3 - *2021-08-29*

- Standardise files with files in sous-chefs/repo-management
Expand Down
2 changes: 1 addition & 1 deletion recipes/svscan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
end

if node['daemontools']['install_method'] == 'source'
if node['init_package'] == 'systemd'
if systemd?
template '/usr/lib/systemd/system/daemontools.service' do
source 'daemontools.service.erb'
variables(
Expand Down
2 changes: 1 addition & 1 deletion resources/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
end
end

action_class.class_eval do
action_class do
def shell_out_with_systems_locale(command, **opts)
options = { environment: { 'LC_ALL' => nil } }.merge(opts)
shell_out(command, **options)
Expand Down

0 comments on commit bc5e942

Please sign in to comment.