thor_template 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 562b2072b4d2c602833dba56cf5aacfff6009df8
4
- data.tar.gz: 8e285ffc3ed710ace50d2cc9e8f3f2df38f2489e
3
+ metadata.gz: 04e620475f32e2031e8eb273a606c98aaf00bd39
4
+ data.tar.gz: a307e81daefc50554e6b41e6bf13e6ee64e9100f
5
5
  SHA512:
6
- metadata.gz: 624c5fd85b401b7e3c85f59d38ed0187114dab6e0e30b6de28046f472957e2c7b49385137720af95fddac60967520611e5ffa76eb0070979ff5a535deeafd223
7
- data.tar.gz: bc3a927c62ac4ed818027833a26cb0278f01844a81f84b4e5c3353fdc42f5d9f2ef1c66fc41df9a4d789f4d1cc4e20dd4bdfe8ab580dadd6d99004a1841a3ee8
6
+ metadata.gz: 9c5a519b987ce7b5fe749b2035e5c966516ca4e216e722219f6464a8613cd414814d59e3f17d39a9e87028d92275c450ab9457acd8a4b82f538b24ca9d2f6bae
7
+ data.tar.gz: aa56d4a592e0df1539c51e7b731a004cfa3245dc3399a9806b53b66df4f32000d7734dbc0a63ac7d582bce31e18a74ba8b3488cb494cd89294c16b4ef358bb43
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
+ Gemfile.lock
6
7
  InstalledFiles
7
8
  _yardoc
8
9
  coverage
data/Guardfile CHANGED
@@ -1,4 +1,4 @@
1
- guard 'rspec', :version => 2 do
1
+ guard 'rspec' do
2
2
  watch(%r{^spec/.+_spec\.rb$})
3
3
  watch(%r{^lib/(.+)\.rb$}) { "spec/thor_template_spec.rb" }
4
4
  watch(%r{^lib/thor_template/(.+)\.rb$}) { "spec/thor_template_spec.rb" }
@@ -1,4 +1,4 @@
1
- guard 'rspec', :version => 2 do
1
+ guard 'rspec' do
2
2
  watch(%r{^spec/.+_spec\.rb$})
3
3
  watch(%r{^lib/(.+)\.rb$}) { "spec/thor_template_spec.rb" }
4
4
  watch(%r{^lib/thor_template/(.+)\.rb$}) { "spec/thor_template_spec.rb" }
@@ -2,9 +2,9 @@ module ThorTemplate
2
2
  class CLI < Thor
3
3
  class Help
4
4
  class << self
5
- def hello(action)
5
+ def hello
6
6
  <<-EOL
7
- Adds a remote named <name> for the repository at <url>. The command git fetch <name> can then be used to create and update
7
+ Hello world example
8
8
  EOL
9
9
  end
10
10
  end
@@ -5,20 +5,15 @@ module ThorTemplate
5
5
 
6
6
  class CLI < Thor
7
7
  class_option :verbose, :type => :boolean
8
+ class_option :noop, :type => :boolean
8
9
 
9
10
  desc "hello NAME", "say hello to NAME"
11
+ long_desc Help.hello
10
12
  option :from, :desc => 'from person'
11
13
  def hello(name)
12
14
  puts "from: #{options[:from]}" if options[:from]
13
15
  puts "Hello #{name}"
14
16
  end
15
17
 
16
- desc "fetch <repository> [<refspec>...]", "Download objects and refs from another repository"
17
- options :all => :boolean, :multiple => :boolean
18
- option :append, :type => :boolean, :aliases => :a, :desc => 'desc'
19
- def fetch(respository, *refspec)
20
- # implement git fetch here
21
- end
22
-
23
18
  end
24
19
  end
@@ -7,13 +7,13 @@ require 'spec_helper'
7
7
  # $ rake clean:vcr ; time rake
8
8
  describe ThorTemplate::CLI do
9
9
  before(:all) do
10
- @args = "--noop"
10
+ @args = "--from Tung"
11
11
  end
12
12
 
13
13
  describe "thor_template" do
14
- it "should create base" do
15
- out = execute("bin/thor_template base #{@args}")
16
- out.should include("Creating base thor_template!")
14
+ it "should hello world" do
15
+ out = execute("bin/thor_template hello world #{@args}")
16
+ expect(out).to include("from: Tung\nHello world")
17
17
  end
18
18
  end
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module ThorTemplate
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/spec/lib/cli_spec.rb CHANGED
@@ -13,7 +13,7 @@ describe ThorTemplate::CLI do
13
13
  describe "new" do
14
14
  it "should generate" do
15
15
  out = execute("cd tmp && ../bin/thor_template new hello #{@args}")
16
- out.should include("Created hello project!")
16
+ expect(out).to include("Created hello project!")
17
17
  end
18
18
  end
19
19
  end
@@ -15,7 +15,7 @@ describe ThorTemplate::Generator do
15
15
 
16
16
  it "should generate" do
17
17
  @generator.run
18
- File.exist?("tmp/hello").should be_true
19
- File.exist?("tmp/hello/hello.gemspec").should be_true
18
+ expect(File.exist?("tmp/hello")).to be_truthy
19
+ expect(File.exist?("tmp/hello/hello.gemspec")).to be_truthy
20
20
  end
21
21
  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
4
+ version: 0.0.5
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-07-08 00:00:00.000000000 Z
11
+ date: 2015-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -160,7 +160,6 @@ extra_rdoc_files: []
160
160
  files:
161
161
  - .gitignore
162
162
  - Gemfile
163
- - Gemfile.lock
164
163
  - Guardfile
165
164
  - LICENSE.txt
166
165
  - README.md
@@ -210,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
209
  version: '0'
211
210
  requirements: []
212
211
  rubyforge_project:
213
- rubygems_version: 2.3.0
212
+ rubygems_version: 2.0.14
214
213
  signing_key:
215
214
  specification_version: 4
216
215
  summary: Generates starter cli tool project.
data/Gemfile.lock DELETED
@@ -1,97 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- thor_template (0.0.3)
5
- aws-sdk
6
- colorize
7
- hashie
8
- thor
9
-
10
- GEM
11
- remote: https://rubygems.org/
12
- specs:
13
- aws-sdk (1.39.0)
14
- json (~> 1.4)
15
- nokogiri (>= 1.4.4)
16
- celluloid (0.15.2)
17
- timers (~> 1.1.0)
18
- celluloid-io (0.15.0)
19
- celluloid (>= 0.15.0)
20
- nio4r (>= 0.5.0)
21
- codeclimate-test-reporter (0.3.0)
22
- simplecov (>= 0.7.1, < 1.0.0)
23
- coderay (1.1.0)
24
- colorize (0.7.2)
25
- diff-lcs (1.2.5)
26
- docile (1.1.3)
27
- fakeweb (1.3.0)
28
- ffi (1.9.3)
29
- formatador (0.2.4)
30
- guard (2.6.0)
31
- formatador (>= 0.2.4)
32
- listen (~> 2.7)
33
- lumberjack (~> 1.0)
34
- pry (>= 0.9.12)
35
- thor (>= 0.18.1)
36
- guard-bundler (2.0.0)
37
- bundler (~> 1.0)
38
- guard (~> 2.2)
39
- guard-rspec (4.2.8)
40
- guard (~> 2.1)
41
- rspec (>= 2.14, < 4.0)
42
- hashie (2.1.1)
43
- json (1.8.1)
44
- listen (2.7.3)
45
- celluloid (>= 0.15.2)
46
- celluloid-io (>= 0.15.0)
47
- rb-fsevent (>= 0.9.3)
48
- rb-inotify (>= 0.9)
49
- lumberjack (1.0.5)
50
- method_source (0.8.2)
51
- mini_portile (0.5.3)
52
- multi_json (1.9.3)
53
- nio4r (1.0.0)
54
- nokogiri (1.6.1)
55
- mini_portile (~> 0.5.0)
56
- pry (0.9.12.6)
57
- coderay (~> 1.0)
58
- method_source (~> 0.8)
59
- slop (~> 3.4)
60
- rake (10.3.1)
61
- rb-fsevent (0.9.4)
62
- rb-inotify (0.9.4)
63
- ffi (>= 0.5.0)
64
- rspec (2.14.1)
65
- rspec-core (~> 2.14.0)
66
- rspec-expectations (~> 2.14.0)
67
- rspec-mocks (~> 2.14.0)
68
- rspec-core (2.14.8)
69
- rspec-expectations (2.14.5)
70
- diff-lcs (>= 1.1.3, < 2.0)
71
- rspec-mocks (2.14.6)
72
- simplecov (0.8.2)
73
- docile (~> 1.1.0)
74
- multi_json
75
- simplecov-html (~> 0.8.0)
76
- simplecov-html (0.8.0)
77
- slop (3.5.0)
78
- thor (0.19.1)
79
- thor-vcr (0.0.3)
80
- fakeweb
81
- multi_json
82
- vcr
83
- timers (1.1.0)
84
- vcr (2.9.0)
85
-
86
- PLATFORMS
87
- ruby
88
-
89
- DEPENDENCIES
90
- bundler (~> 1.3)
91
- codeclimate-test-reporter
92
- guard
93
- guard-bundler
94
- guard-rspec
95
- rake
96
- thor-vcr
97
- thor_template!