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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8df295a66aac19b5e17698fc1cdc0ec965f42a19bd7cbe588c5ae36f32dd56a2
4
- data.tar.gz: 11c9a291204496ff78616f0b26303ca25d54b5983ed00ac6b1406f61760cbe2e
3
+ metadata.gz: 6b64ca7a20b7d296c35bd46ea88f2a689967ea48ae98e3030ddadecee0bcb841
4
+ data.tar.gz: '09bd6f34963246f08d0ff581274e5845f70ecbd31ca71d2986a26226a9337880'
5
5
  SHA512:
6
- metadata.gz: 17fcbad587dbfbc71c485641ea2f1894317c634c26133097de9288d84edcc4afa148a8e5fb3fdc8d57417c24d12d5810be40a380046c7a5d540ecf54f1896354
7
- data.tar.gz: c548c641a4ea2096fcb6dd3982effad044eef0d0c7ffeb0209ed12eb04e66391c5c28f798bca9b229450e0ad403775319e24197c5a65092698004fa7fd140bf1
6
+ metadata.gz: c37fd745264d72660e54966abb05e497db99f148e103e53548784687726d81f0ad36eae57fbf6ca39fc3c1ef2dd67584f161acfc1fcde5a2a6dda13fd12d3938
7
+ data.tar.gz: 7bd5bad83948492bc956a781b4b329dae0d6483b22a668ac08b06bcc1ca85c947de05665c427e844208c2e17a01b79fc05d3ef8e618a3b47d3be15ea4d5e11c1
@@ -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::Error => e
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
- abort help
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitFame
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_fame
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Oleander