thor_template 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b58a6b18ecb5138445e48c9c1fb97ee40a6aac20
4
- data.tar.gz: 57bc6452e5e9767f4f4082970c5dbee98169b757
3
+ metadata.gz: 45ee5a0e7d83cf5412fc09ae96eb1c6fe291ff2e
4
+ data.tar.gz: 4f573144e9c1e7820fd0895579b6c5e28e518a6f
5
5
  SHA512:
6
- metadata.gz: a043e0d058c991103e07541daae232ecedba3b201744f36f30e8743532ad28f044378d5e8ebd122a9d99cbb0206112dd83345ba811ae34137875cd9962961fff
7
- data.tar.gz: e570e026e13973de98c196b87b449262ac8b026da222d0045cec59e10ac4b51dc84249c0ef81a9da99e68ae47477a9a4fc29aa4aa156ad892ad03134e67187bc
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__)
@@ -1,3 +1,3 @@
1
1
  module ThorTemplate
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-29 00:00:00.000000000 Z
11
+ date: 2014-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor