git_fame 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git_fame/command.rb +14 -2
- data/lib/git_fame/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b64ca7a20b7d296c35bd46ea88f2a689967ea48ae98e3030ddadecee0bcb841
|
4
|
+
data.tar.gz: '09bd6f34963246f08d0ff581274e5845f70ecbd31ca71d2986a26226a9337880'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c37fd745264d72660e54966abb05e497db99f148e103e53548784687726d81f0ad36eae57fbf6ca39fc3c1ef2dd67584f161acfc1fcde5a2a6dda13fd12d3938
|
7
|
+
data.tar.gz: 7bd5bad83948492bc956a781b4b329dae0d6483b22a668ac08b06bcc1ca85c947de05665c427e844208c2e17a01b79fc05d3ef8e618a3b47d3be15ea4d5e11c1
|
data/lib/git_fame/command.rb
CHANGED
@@ -92,6 +92,12 @@ module GitFame
|
|
92
92
|
default "HEAD"
|
93
93
|
end
|
94
94
|
|
95
|
+
flag :version do
|
96
|
+
desc "Current version"
|
97
|
+
long "--version"
|
98
|
+
short "-v"
|
99
|
+
end
|
100
|
+
|
95
101
|
flag :help do
|
96
102
|
desc "Print usage"
|
97
103
|
long "--help"
|
@@ -102,13 +108,19 @@ module GitFame
|
|
102
108
|
cmd = new
|
103
109
|
cmd.parse(argv, raise_on_parse_error: true)
|
104
110
|
cmd.run
|
105
|
-
rescue TTY::Option::
|
111
|
+
rescue TTY::Option::InvalidParameter, TTY::Option::InvalidArgument => e
|
106
112
|
abort e.message
|
107
113
|
end
|
108
114
|
|
109
115
|
def run
|
110
116
|
if params[:help]
|
111
|
-
|
117
|
+
puts help
|
118
|
+
exit
|
119
|
+
end
|
120
|
+
|
121
|
+
if params[:version]
|
122
|
+
puts "git-fame v#{GitFame::VERSION}"
|
123
|
+
exit
|
112
124
|
end
|
113
125
|
|
114
126
|
thread = spinner.run do
|
data/lib/git_fame/version.rb
CHANGED