thor_template 1.0.0 → 1.0.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +27 -15
- data/lib/starter_project/bin/thor_template +7 -0
- data/lib/thor_template/generator.rb +3 -1
- data/lib/thor_template/version.rb +1 -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: 44d85a7deb099da700004cc428aef7ed734df492
|
4
|
+
data.tar.gz: ddd667d6c802e10439166ef320aba8745cceecb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 515e6f2b5530463b3a58e09fbd74a0267d16e325b33894cc9c2163b952171e0c12be86970c7e1194732d466a4c81011b55b877fa158ef52f2da1197847b6f18a
|
7
|
+
data.tar.gz: fda470e98ee5156d51dccb747d4853037a1d1f1f0f7683c021e47b7e786e51c39c5e7f83cb49506ced328a29a50e9205cf5b4e8d10dcd532198b0057234290b1
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [1.0.1]
|
7
|
+
|
8
|
+
- require "fileutils" fix
|
9
|
+
|
6
10
|
## [1.0.0]
|
7
11
|
|
8
12
|
- allow --help or -h at the end of the command
|
data/README.md
CHANGED
@@ -3,23 +3,35 @@
|
|
3
3
|
[](https://travis-ci.org/tongueroo/thor_template)
|
4
4
|
[](https://codeclimate.com/github/tongueroo/thor_template)
|
5
5
|
|
6
|
-
|
6
|
+
This is a generator tool that builds a starter cli project based on thor.
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
```sh
|
11
|
+
gem install thor_template
|
12
|
+
```
|
13
13
|
|
14
14
|
## Usage
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
```sh
|
17
|
+
thor_template new foo
|
18
|
+
cd foo
|
19
|
+
bin/foo hello world
|
20
|
+
```
|
21
|
+
|
22
|
+
The above generated a starter cli project called foo with a working hello command. The generated project also has starter specs for you 😁
|
21
23
|
|
22
|
-
|
24
|
+
```sh
|
25
|
+
$ rake
|
26
|
+
rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
|
27
|
+
Foo::CLI
|
28
|
+
foo
|
29
|
+
should hello world
|
30
|
+
|
31
|
+
Finished in 0.09672 seconds (files took 0.20945 seconds to load)
|
32
|
+
1 example, 0 failures
|
33
|
+
$
|
34
|
+
```
|
23
35
|
|
24
36
|
## Dashes Problem
|
25
37
|
|
@@ -29,17 +41,17 @@ Names with dashes don't work quite right with this tool. For example:
|
|
29
41
|
thor_template new my-project
|
30
42
|
```
|
31
43
|
|
32
|
-
This results in
|
33
|
-
|
34
|
-
I usually work around this by creating a project with the underscore name first:
|
44
|
+
This results in some the files and text not being renamed correctly. I usually work around this by creating a project with the underscored name first:
|
35
45
|
|
36
46
|
```
|
37
47
|
thor_template new my_project
|
38
48
|
```
|
39
49
|
|
40
|
-
Then
|
50
|
+
Then I rename things 3 spots:
|
41
51
|
|
42
52
|
* my_project.gemspec - Change the name from my_project to my-project. So the gem name has a dash.
|
43
|
-
* bin/my_project - Change the name from bin/my_project to bin/my-project. So the binary has a dash. The require in the file also.
|
53
|
+
* bin/my_project - Change the name from bin/my_project to bin/my-project. So the binary has a dash. The require in the file also needs to be fixed.
|
44
54
|
* lib/my_project.rb - Change the name from lib/my_project.rb to lib/my-project.rb. So if the project is required it is `require my-project`.
|
45
55
|
* spec/spec_helper.rb - Change the require lib/my_project.rb to lib/my-project.rb. And spec/lib/cli_spec. So the test passes.
|
56
|
+
|
57
|
+
Hope to fix this one day! Also, pull request are appreciated!
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|