gem-stats 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,9 +18,15 @@ class Gem::Commands::StatsCommand < Gem::Command
18
18
  end
19
19
 
20
20
  def execute
21
- gem = get_one_optional_argument
22
- stats = get_stats gem
21
+ begin
22
+ gem = get_one_gem_name
23
+ rescue Gem::CommandLineError
24
+ puts 'Please specify a gem name (e.g. gem stats sinatra).'
25
+ exit
26
+ end
23
27
 
28
+ stats = get_stats gem
29
+
24
30
  if stats.to_s == 'This rubygem could not be found.'
25
31
  puts "Sorry kid, doesn't look like that gem exists!"
26
32
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Tatom
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-21 00:00:00 -08:00
12
+ date: 2009-12-22 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency