Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[gem_template] Updating README

  • Loading branch information...
commit 085cb142d66f5640f7b576e6acf24ddc496397f1 1 parent 4ab38af
Winton Welsh authored
Showing with 29 additions and 13 deletions.
  1. +26 −8 README.markdown
  2. +3 −5 Rakefile
34 README.markdown
View
@@ -3,16 +3,34 @@ GemTemplate
A gem template for new projects.
-Setup
------
+Requirements
+------------
<pre>
-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
</pre>
-A project wide find-replace occurs on file names and contents.
+Setup the template
+------------------
-Edit <code>gemspec.rb</code> and <code>MIT-LICENSE</code>, and your project is ready for its first commit.
+You only have to do this once.
+
+<pre>
+git clone git@github.com:winton/gem_template.git
+cd gem_template
+stencil
+</pre>
+
+Setup a new project
+-------------------
+
+Do this for every new project.
+
+<pre>
+mkdir my_project
+git init
+stencil gem_template
+rake rename
+</pre>
+
+The last command does a find-replace (gem\_template -> my\_project) on files and filenames.
8 Rakefile
View
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.