Skip to content

Instantly share code, notes, and snippets.

@sr3d
Created April 14, 2011 22:43
Show Gist options
  • Select an option

  • Save sr3d/920753 to your computer and use it in GitHub Desktop.

Select an option

Save sr3d/920753 to your computer and use it in GitHub Desktop.
desc "Removes trailing whitespace and replaces tabs with two spaces"
task :whitespace do
sh %[find . \\( -name '*.rb' -or -name '*.yml' \\) -type f -exec ruby -pi -e 'gsub(/ +$/, "");gsub(/\t/, " ")' {} \\;]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment