Permalink
Browse files

First commit

  • Loading branch information...
1 parent 5e2dd99 commit ae5da8aceb4261909b940ec25606bbf7fb2b630a @winton committed Oct 10, 2011
View
@@ -15,4 +15,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,4 +1,4 @@
-GemTemplate
+Execache
===========
A gem template for new projects.
@@ -16,8 +16,8 @@ Setup the template
You only have to do this once.
<pre>
-git clone git@github.com:winton/gem_template.git
-cd gem_template
+git clone git@github.com:winton/execache.git
+cd execache
stencil
</pre>
@@ -29,7 +29,7 @@ Do this for every new project.
<pre>
mkdir my_project
git init
-stencil gem_template
+stencil execache
rake rename
</pre>
View
@@ -1,27 +1 @@
-require 'bundler/gem_tasks'
-
-# DELETE AFTER USING
-desc "Rename project"
-task :rename do
- name = ENV['NAME'] || File.basename(Dir.pwd)
- camelize = lambda do |str|
- str.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
- end
- dir = Dir['**/gem_template*']
- begin
- from = dir.pop
- if from
- to = from.split('/')
- to[-1].gsub!('gem_template', name)
- FileUtils.mv(from, to.join('/'))
- end
- end while dir.length > 0
- Dir["**/*"].each do |path|
- if File.file?(path)
- `sed -i '' 's/gem_template/#{name}/g' #{path}`
- `sed -i '' 's/GemTemplate/#{camelize.call(name)}/g' #{path}`
- no_space = File.read(path).gsub(/\s+\z/, '')
- File.open(path, 'w') { |f| f.write(no_space) }
- end
- end
-end
+require 'bundler/gem_tasks'
View
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+
+require File.expand_path("../../lib/execache", __FILE__)
View
@@ -1,3 +0,0 @@
-#!/usr/bin/env ruby
-
-require File.expand_path("../../lib/gem_template", __FILE__)
@@ -5,7 +5,7 @@ lib = "#{root}/lib"
$:.unshift lib unless $:.include?(lib)
Gem::Specification.new do |s|
- s.name = "gem_template"
+ s.name = "execache"
s.version = '0.1.0'
s.platform = Gem::Platform::RUBY
s.authors = []
@@ -1,4 +1,4 @@
$:.unshift File.dirname(__FILE__)
-module GemTemplate
+module Execache
end
@@ -0,0 +1,4 @@
+require 'spec_helper'
+
+describe Execache do
+end
@@ -1,4 +0,0 @@
-require 'spec_helper'
-
-describe GemTemplate do
-end
View
@@ -5,4 +5,4 @@
$root = File.expand_path('../../', __FILE__)
-require "#{$root}/lib/gem_template"
+require "#{$root}/lib/execache"

0 comments on commit ae5da8a

Please sign in to comment.