gem-stats 1.0.1 → 1.0.2
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.
- data/README.md +4 -2
- data/lib/rubygems/commands/stats_command.rb +12 -6
- metadata +3 -3
data/README.md
CHANGED
@@ -18,8 +18,10 @@ Otherwise, you'll need to install by source
|
|
18
18
|
|
19
19
|
goldfish by Robert Gleeson
|
20
20
|
--------------------------
|
21
|
-
|
22
|
-
|
21
|
+
http://gemcutter.org/gems/goldfish
|
22
|
+
|
23
|
+
Downloads: 142
|
24
|
+
Current version: 0.1.3
|
23
25
|
|
24
26
|
## Copyright
|
25
27
|
|
@@ -14,17 +14,23 @@ class Gem::Commands::StatsCommand < Gem::Command
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def get_stats gem
|
17
|
-
HTTParty.get "http://gemcutter.org/gems/#{gem}.json"
|
17
|
+
HTTParty.get "http://gemcutter.org/api/v1/gems/#{gem}.json"
|
18
18
|
end
|
19
19
|
|
20
20
|
def execute
|
21
21
|
gem = get_one_optional_argument
|
22
22
|
stats = get_stats gem
|
23
|
-
|
23
|
+
|
24
|
+
if stats.to_s == 'This rubygem could not be found.'
|
25
|
+
puts "Sorry kid, doesn't look like that gem exists!"
|
26
|
+
else
|
27
|
+
title = "#{stats['name']} by #{stats['authors']}"
|
24
28
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
+
puts title
|
30
|
+
puts '-' * title.size
|
31
|
+
puts "http://gemcutter.org/gems/#{stats['name']}\n\n"
|
32
|
+
puts "Downloads: #{stats['downloads']}"
|
33
|
+
puts "Current version: #{stats['version']}"
|
34
|
+
end
|
29
35
|
end
|
30
36
|
end
|
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.
|
4
|
+
version: 1.0.2
|
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
|
+
date: 2009-12-21 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -35,7 +35,7 @@ files:
|
|
35
35
|
- LICENSE
|
36
36
|
- lib/rubygems/commands/stats_command.rb
|
37
37
|
- lib/rubygems_plugin.rb
|
38
|
-
has_rdoc:
|
38
|
+
has_rdoc: true
|
39
39
|
homepage: http://github.com/dannytatom/gem-stats
|
40
40
|
licenses: []
|
41
41
|
|