Permalink
Browse files

Removing end space on rake rename

  • Loading branch information...
1 parent fbb392c commit eb5c8d1123ad886894e7399617a8fea8d29b2831 @winton committed Jun 29, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 Rakefile
View
@@ -61,6 +61,8 @@ task :rename do
if File.file?(path)
`sed -i 's/gem_template/#{name}/g' #{path}`
`sed -i 's/GemTemplate/#{camelize.call(name)}/g' #{path}`
+ no_space = File.read(path).gsub(/\s+\z/, '')
+ File.open(path, 'w') { |f| f.write(no_space) }
end
end
end

0 comments on commit eb5c8d1

Please sign in to comment.