Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing file rename in rake rename

  • Loading branch information...
commit e0e8a485ebc5be4ac368fbff8cd7e4879c6ee230 1 parent 9c694c8
@winton authored
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|
Please sign in to comment.
Something went wrong with that request. Please try again.