diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:50:39 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:50:39 -0700 |
commit | f50ffe2b1b3b0afc7aa2b01a9356e439f78a5fcd (patch) | |
tree | 204cefb3c64929278dc7e6a7f3de220475154533 /lib/chef/resource/dnf_package.rb | |
parent | 36075b93536da78cd50ffe4eebe1ae4613a04ec9 (diff) | |
download | chef-f50ffe2b1b3b0afc7aa2b01a9356e439f78a5fcd.tar.gz |
tweak Lint/BlockAlignment
Lint/BlockAlignment:
Enabled: true
EnforcedStyleAlignWith: start_of_block
this works better with Layout/MultilineMethodCallIndentation to
force indentation of multiline method calls that wind up with multiline
blocks.
i'd probably pull back the end to match with the start of the expression
but this gets the indentation level inside the block correct.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource/dnf_package.rb')
-rw-r--r-- | lib/chef/resource/dnf_package.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/chef/resource/dnf_package.rb b/lib/chef/resource/dnf_package.rb index a89f6bfcff..52c739beb9 100644 --- a/lib/chef/resource/dnf_package.rb +++ b/lib/chef/resource/dnf_package.rb @@ -56,18 +56,18 @@ class Chef description: "Flush the in-memory cache before or after a DNF operation that installs, upgrades, or removes a package. DNF automatically synchronizes remote metadata to a local cache. The #{Chef::Dist::CLIENT} creates a copy of the local cache, and then stores it in-memory during the #{Chef::Dist::CLIENT} run. The in-memory cache allows packages to be installed during the #{Chef::Dist::CLIENT} run without the need to continue synchronizing the remote metadata to the local cache while the #{Chef::Dist::CLIENT} run is in-progress.", default: { before: false, after: false }, coerce: proc { |v| - if v.is_a?(Hash) - v - elsif v.is_a?(Array) - v.each_with_object({}) { |arg, obj| obj[arg] = true } - elsif v.is_a?(TrueClass) || v.is_a?(FalseClass) - { before: v, after: v } - elsif v == :before - { before: true, after: false } - elsif v == :after - { after: true, before: false } - end - } + if v.is_a?(Hash) + v + elsif v.is_a?(Array) + v.each_with_object({}) { |arg, obj| obj[arg] = true } + elsif v.is_a?(TrueClass) || v.is_a?(FalseClass) + { before: v, after: v } + elsif v == :before + { before: true, after: false } + elsif v == :after + { after: true, before: false } + end + } def allow_downgrade(arg = nil) if !arg.nil? |