Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 23 lines (22 sloc) 0.574 kB
99edd7a @winton More dependency updates
authored
1 require "#{File.dirname(__FILE__)}/require"
2 Require.rakefile!
4ab38af @winton [gem_template] First commit
authored
3
4e86491 @winton Updating gem_template to use Dep
authored
4 # You can delete this after you use it
085cb14 @winton [gem_template] Updating README
authored
5 desc "Rename project"
6 task :rename do
7 name = ENV['NAME'] || File.basename(Dir.pwd)
4ab38af @winton [gem_template] First commit
authored
8 begin
9 dir = Dir['**/gem_template*']
10 from = dir.pop
11 if from
12 rb = from.include?('.rb')
13 to = File.dirname(from) + "/#{name}#{'.rb' if rb}"
14 FileUtils.mv(from, to)
15 end
16 end while dir.length > 0
17 Dir["**/*"].each do |path|
18 next if path.include?('Rakefile')
19 if File.file?(path)
20 `sed -i "" 's/gem_template/#{name}/g' #{path}`
21 end
22 end
23 end
Something went wrong with that request. Please try again.