diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-31 09:57:05 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-31 09:57:05 -0700 |
commit | 14b9553818265ecc35c037adfe479320e3a70e34 (patch) | |
tree | ec8f36c6f929f0c0b56f062484a280d6e645d61e /lib/chef/provider/group/dscl.rb | |
parent | f051b6e7912086edc03747f4b1c0285bfb6597f5 (diff) | |
download | chef-lcg/weirich-semantic-block.tar.gz |
For Discussion: Weirich Semantic Block stylelcg/weirich-semantic-block
Style/BlockDelimiters:
Enabled: true
EnforcedStyle: semantic
See, eg:
https://github.com/rubocop-hq/ruby-style-guide/issues/162
http://www.virtuouscode.com/2011/07/26/the-procedurefunction-block-convention-in-ruby/
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/group/dscl.rb')
-rw-r--r-- | lib/chef/provider/group/dscl.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider/group/dscl.rb b/lib/chef/provider/group/dscl.rb index decad69e40..d8370ff57e 100644 --- a/lib/chef/provider/group/dscl.rb +++ b/lib/chef/provider/group/dscl.rb @@ -30,8 +30,8 @@ class Chef status = shell_out(shellcmd) stdout_result = "" stderr_result = "" - status.stdout.each_line { |line| stdout_result << line } - status.stderr.each_line { |line| stderr_result << line } + status.stdout.each_line do |line| stdout_result << line end + status.stderr.each_line do |line| stderr_result << line end [shellcmd.flatten.compact.join(" "), status, stdout_result, stderr_result] end @@ -142,7 +142,7 @@ class Chef def define_resource_requirements super requirements.assert(:all_actions) do |a| - a.assertion { ::File.exist?("/usr/bin/dscl") } + a.assertion do ::File.exist?("/usr/bin/dscl") end a.failure_message Chef::Exceptions::Group, "Could not find binary /usr/bin/dscl for #{new_resource.name}" # No whyrun alternative: this component should be available in the base install of any given system that uses it end |