thor_template 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/starter_project/CHANGELOG.md +7 -0
- data/lib/starter_project/lib/thor_template/cli.rb +4 -0
- data/lib/starter_project/lib/thor_template/command.rb +21 -0
- data/lib/starter_project/thor_template.gemspec +1 -4
- data/lib/thor_template/cli.rb +5 -0
- data/lib/thor_template/command.rb +8 -0
- data/lib/thor_template/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '078d747b35ff11c86cc37abbc847c79f0fe848712030d58f9c712f238d877e59'
|
4
|
+
data.tar.gz: f84adf8e82050605d8b53c7098bc783a8a5a3ec2c32b037fb098af7bc7e41eb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61947b603469446762d0b35662ac03a1efd0478c91c6748da634c1372175f97e265bde06fd3a6f0f5891d4652eeb37539ede289de1469288a3f82e7d2d289ec
|
7
|
+
data.tar.gz: f3b8604be4244efdd6762ab9e323951bc07358d9fca9e401917c06b884534974fc20f132b4af74f71299dda3fea71b4451f679e34f204ab0dba7a15baa0351fd
|
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
|
+
## [2.2.0]
|
7
|
+
- simple help formatting
|
8
|
+
- add version command
|
9
|
+
|
6
10
|
## [2.1.1]
|
7
11
|
|
8
12
|
- starter project use version 0.1.0
|
@@ -1,5 +1,18 @@
|
|
1
1
|
require "thor"
|
2
2
|
|
3
|
+
# Override thor's long_desc identation behavior
|
4
|
+
# https://github.com/erikhuda/thor/issues/398
|
5
|
+
class Thor
|
6
|
+
module Shell
|
7
|
+
class Basic
|
8
|
+
def print_wrapped(message, options = {})
|
9
|
+
message = "\n#{message}" unless message[0] == "\n"
|
10
|
+
stdout.puts message
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
3
16
|
module ThorTemplate
|
4
17
|
class Command < Thor
|
5
18
|
class << self
|
@@ -18,6 +31,14 @@ module ThorTemplate
|
|
18
31
|
args -= help_flags
|
19
32
|
args.insert(-2, "help")
|
20
33
|
end
|
34
|
+
|
35
|
+
# thor_template version
|
36
|
+
# thor_template --version
|
37
|
+
version_flags = ["--version"]
|
38
|
+
if args.length == 1 && !(args & version_flags).empty?
|
39
|
+
args = ["version"]
|
40
|
+
end
|
41
|
+
|
21
42
|
super
|
22
43
|
end
|
23
44
|
end
|
@@ -20,13 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_dependency "thor"
|
23
|
-
spec.add_dependency "hashie"
|
24
23
|
spec.add_dependency "colorize"
|
25
24
|
|
26
25
|
spec.add_development_dependency "bundler"
|
27
26
|
spec.add_development_dependency "byebug"
|
28
27
|
spec.add_development_dependency "rake"
|
29
|
-
spec.add_development_dependency "
|
30
|
-
spec.add_development_dependency "guard-bundler"
|
31
|
-
spec.add_development_dependency "guard-rspec"
|
28
|
+
spec.add_development_dependency "rspec"
|
32
29
|
end
|
data/lib/thor_template/cli.rb
CHANGED
@@ -18,6 +18,14 @@ module ThorTemplate
|
|
18
18
|
args -= help_flags
|
19
19
|
args.insert(-2, "help")
|
20
20
|
end
|
21
|
+
|
22
|
+
# thor_template version
|
23
|
+
# thor_template --version
|
24
|
+
version_flags = ["--version"]
|
25
|
+
if args.length == 1 && !(args & version_flags).empty?
|
26
|
+
args = ["version"]
|
27
|
+
end
|
28
|
+
|
21
29
|
super
|
22
30
|
end
|
23
31
|
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: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -182,6 +182,7 @@ files:
|
|
182
182
|
- exe/thor_template
|
183
183
|
- lib/starter_project/.gitignore
|
184
184
|
- lib/starter_project/.rspec
|
185
|
+
- lib/starter_project/CHANGELOG.md
|
185
186
|
- lib/starter_project/Gemfile
|
186
187
|
- lib/starter_project/Guardfile
|
187
188
|
- lib/starter_project/LICENSE.txt
|