From 7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Tue, 2 Jul 2019 15:09:07 -0700 Subject: fix Layout/EmptyLineAfterGuardClause i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist --- lib/chef/cookbook_manifest.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/chef/cookbook_manifest.rb') diff --git a/lib/chef/cookbook_manifest.rb b/lib/chef/cookbook_manifest.rb index e061d9ef32..13c0332cd8 100644 --- a/lib/chef/cookbook_manifest.rb +++ b/lib/chef/cookbook_manifest.rb @@ -172,6 +172,7 @@ class Chef def files_for(part) return root_files if part.to_s == "root_files" + manifest[:all_files].select do |file| seg = file[:name].split("/")[0] part.to_s == seg @@ -184,6 +185,7 @@ class Chef manifest[:all_files].each do |file| seg = file[:name].split("/")[0] next if excluded_parts.include?(seg) + yield file if block_given? end end -- cgit v1.2.1