Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 23 lines (22 sloc) 0.574 kb
99edd7af »
2010-01-28 More dependency updates
1 require "#{File.dirname(__FILE__)}/require"
2 Require.rakefile!
4ab38af8 »
2009-11-06 [gem_template] First commit
3
4e864911 »
2010-01-26 Updating gem_template to use Dep
4 # You can delete this after you use it
085cb142 »
2009-11-09 [gem_template] Updating README
5 desc "Rename project"
6 task :rename do
7 name = ENV['NAME'] || File.basename(Dir.pwd)
4ab38af8 »
2009-11-06 [gem_template] First commit
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.