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/package/rpm.rb | |
parent | f051b6e7912086edc03747f4b1c0285bfb6597f5 (diff) | |
download | chef-14b9553818265ecc35c037adfe479320e3a70e34.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/package/rpm.rb')
-rw-r--r-- | lib/chef/provider/package/rpm.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/package/rpm.rb b/lib/chef/provider/package/rpm.rb index 75b41a26e4..1f62aa84c4 100644 --- a/lib/chef/provider/package/rpm.rb +++ b/lib/chef/provider/package/rpm.rb @@ -32,12 +32,12 @@ class Chef super requirements.assert(:all_actions) do |a| - a.assertion { @package_source_exists } + a.assertion do @package_source_exists end a.failure_message Chef::Exceptions::Package, "Package #{new_resource.package_name} not found: #{new_resource.source}" a.whyrun "Assuming package #{new_resource.package_name} would have been made available." end requirements.assert(:all_actions) do |a| - a.assertion { !@rpm_status.nil? && (@rpm_status.exitstatus == 0 || @rpm_status.exitstatus == 1) } + a.assertion do !@rpm_status.nil? && (@rpm_status.exitstatus == 0 || @rpm_status.exitstatus == 1) end a.failure_message Chef::Exceptions::Package, "Unable to determine current version due to RPM failure. Detail: #{@rpm_status.inspect}" a.whyrun "Assuming current version would have been determined for package #{new_resource.package_name}." end |