Sha256: 72c943c28d52cf662b1c3af2fe931587e28fb545451779c2dd7b538449826440
Contents?: true
Size: 491 Bytes
Versions: 14
Compression:
Stored size: 491 Bytes
Contents
files = Dir["**/*"] ignored_files = [ /log\/.*/, ] files.delete_if do |file| if File.directory?(file) true else ignored_files.any? do |condition| if condition.is_a?(String) file == condition else condition.match(file) end end || false end end for file in files - ignored_files if File.file?(file) lines = File.readlines(file).map { |line| line.gsub(/^\s+$/, "\n") } File.open(file, "w+") { |f| f.write(lines.join) } end end
Version data entries
14 entries across 14 versions & 2 rubygems