From f3f81dabdc57e1df3f7b7da2857c77e027de618e Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Tue, 7 Apr 2009 20:29:59 -0400 Subject: [PATCH] Add "rake whitespace" task --- Rakefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 5106aa7..aa233cb 100644 --- a/Rakefile +++ b/Rakefile @@ -148,4 +148,9 @@ end task :default => :spec -task :precommit => ["spec", "spec:jruby", "spec:integration"] \ No newline at end of file +task :precommit => ["spec", "spec:jruby", "spec:integration"] + +desc 'Removes trailing whitespace' +task :whitespace do + sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;} +end \ No newline at end of file