diff --git a/README.markdown b/README.markdown index 8a7d719..264a180 100644 --- a/README.markdown +++ b/README.markdown @@ -3,16 +3,34 @@ GemTemplate A gem template for new projects. -Setup ------ +Requirements +------------
-git clone git://github.com/winton/gem_template.git my_project
-cd my_project
-rake setup
-git remote add origin git@github.com:winton/my_project.git
+sudo gem install stencil --source http://gemcutter.org
 
-A project wide find-replace occurs on file names and contents. +Setup the template +------------------ -Edit gemspec.rb and MIT-LICENSE, and your project is ready for its first commit. \ No newline at end of file +You only have to do this once. + +
+git clone git@github.com:winton/gem_template.git
+cd gem_template
+stencil
+
+ +Setup a new project +------------------- + +Do this for every new project. + +
+mkdir my_project
+git init
+stencil gem_template
+rake rename
+
+ +The last command does a find-replace (gem\_template -> my\_project) on files and filenames. \ No newline at end of file diff --git a/Rakefile b/Rakefile index 48b3814..2380ae3 100644 --- a/Rakefile +++ b/Rakefile @@ -24,10 +24,9 @@ Rake::GemPackageTask.new(GEM_SPEC) do |pkg| pkg.gem_spec = GEM_SPEC end -desc "Setup project" -task :setup do - name = File.basename(Dir.pwd) - `rm -Rf .git` +desc "Rename project" +task :rename do + name = ENV['NAME'] || File.basename(Dir.pwd) begin dir = Dir['**/gem_template*'] from = dir.pop @@ -43,7 +42,6 @@ task :setup do `sed -i "" 's/gem_template/#{name}/g' #{path}` end end - `git init` end desc "Run specs"