thor_template 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thor_template/generator.rb +7 -0
- data/lib/thor_template/version.rb +1 -1
- data/spec/lib/cli_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45ee5a0e7d83cf5412fc09ae96eb1c6fe291ff2e
|
4
|
+
data.tar.gz: 4f573144e9c1e7820fd0895579b6c5e28e518a6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9fac07bf490e3349f41f5daf6a0e02e4045c7f39f8f02b955c525bf30d650782f3976600607af87b7dbef80c616ac838a3a82619a4243865ce23b573b8bdf8d
|
7
|
+
data.tar.gz: e9ce5115c486b414569e57e44dddb2f3aeb245a5336d68330fdd1037241941d346decbcc81fb30c78ac28c32239f5aa1474e6b38f5bf2ffb90b5c34e663c5688
|
@@ -10,6 +10,7 @@ module ThorTemplate
|
|
10
10
|
copy
|
11
11
|
rename
|
12
12
|
rewrite
|
13
|
+
git
|
13
14
|
puts "Created #{@name} project!"
|
14
15
|
end
|
15
16
|
|
@@ -41,6 +42,12 @@ module ThorTemplate
|
|
41
42
|
template("Rakefile", "Rakefile")
|
42
43
|
end
|
43
44
|
|
45
|
+
def git
|
46
|
+
system("cd #{@name} && git init")
|
47
|
+
system("cd #{@name} && git add .")
|
48
|
+
system("cd #{@name} && git commit -m 'first commit'")
|
49
|
+
end
|
50
|
+
|
44
51
|
private
|
45
52
|
def template(src,dest)
|
46
53
|
templates = File.expand_path("../../templates", __FILE__)
|
data/spec/lib/cli_spec.rb
CHANGED
@@ -7,12 +7,13 @@ require 'spec_helper'
|
|
7
7
|
# $ rake clean:vcr ; time rake
|
8
8
|
describe ThorTemplate::CLI do
|
9
9
|
before(:all) do
|
10
|
+
FileUtils.rm_rf("tmp/hello")
|
10
11
|
@args = "--noop"
|
11
12
|
end
|
12
13
|
|
13
14
|
describe "new" do
|
14
15
|
it "should generate" do
|
15
|
-
out = execute("bin/thor_template new hello #{@args}")
|
16
|
+
out = execute("cd tmp && ../bin/thor_template new hello #{@args}")
|
16
17
|
out.should include("Created hello project!")
|
17
18
|
end
|
18
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thor_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|