Skip to content

Instantly share code, notes, and snippets.

@vidmantas
Created May 27, 2010 13:35
Show Gist options
  • Save vidmantas/415800 to your computer and use it in GitHub Desktop.
Save vidmantas/415800 to your computer and use it in GitHub Desktop.
files = Dir.glob('dir/**/*')
output_to = File.open('result.txt', 'w')
for file in files
if file =~ /(rb|haml)$/ and !(file =~ /plugins/)
output_to.write "# FAILAS: #{file}"
output_to.write "\n"
output_to.write(File.read(file))
output_to.write "\n"
end
end
output_to.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment