Permalink
Browse files

Fixing file rename in rake rename

  • Loading branch information...
1 parent 9c694c8 commit e0e8a485ebc5be4ac368fbff8cd7e4879c6ee230 @winton committed Jun 29, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 Rakefile
View
6 Rakefile
@@ -51,9 +51,9 @@ task :rename do
dir = Dir['**/gem_template*']
from = dir.pop
if from
- rb = from.include?('.rb')
- to = File.dirname(from) + "/#{name}#{'.rb' if rb}"
- FileUtils.mv(from, to)
+ to = from.split('/')
+ to[-1].gsub!('gem_template', name)
+ FileUtils.mv(from, to.join)
end
end while dir.length > 0
Dir["**/*"].each do |path|

0 comments on commit e0e8a48

Please sign in to comment.