lib/berkshelf/validator.rb in berkshelf-5.5.0 vs lib/berkshelf/validator.rb in berkshelf-5.6.0
- old
+ new
@@ -22,12 +22,12 @@
# the Cookbook(s) to validate
def validate_files(cookbooks)
Array(cookbooks).each do |cookbook|
path = cookbook.path.to_s
- files = Dir.glob(File.join(path, '**', '*.rb')).select do |f|
+ files = Dir.glob(File.join(path, "**", "*.rb")).select do |f|
parent = Pathname.new(path).dirname.to_s
- f.gsub(parent, '') =~ /[[:space:]]/
+ f.gsub(parent, "") =~ /[[:space:]]/
end
raise InvalidCookbookFiles.new(cookbook, files) unless files.empty?
end
end