ddollar-gem-github 0.4.2 → 0.5.0

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.rdoc CHANGED
@@ -1,4 +1,4 @@
1
- = gem-github-stats
1
+ = gem-github
2
2
 
3
3
  == Usage
4
4
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.5.0
data/gem-github.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gem-github}
8
- s.version = "0.4.2"
8
+ s.version = "0.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Dollar"]
12
- s.date = %q{2009-08-19}
12
+ s.date = %q{2009-09-03}
13
13
  s.description = %q{Show Github-related stats of the same gem from different users}
14
14
  s.email = %q{<ddollar@gmail.com>}
15
15
  s.extra_rdoc_files = [
@@ -28,7 +28,7 @@ class Gem::Commands::GithubCommand < Gem::Command
28
28
  stats = specs.map do |(gem, source)|
29
29
  next unless source == 'http://gems.github.com'
30
30
  stats_from_github_gem_name(gem.first)
31
- end
31
+ end.compact
32
32
 
33
33
  github_stats_sort(stats).each do |stat|
34
34
  say "%-30s fork:%-4s watchers:%-3d updated:%s" % [
@@ -46,7 +46,12 @@ private ######################################################################
46
46
 
47
47
  def stats_from_github_gem_name(name)
48
48
  user_name, repository_name = name.split('-', 2)
49
- repository = Octopi::User.find(user_name).repository(repository_name)
49
+
50
+ repository = Octopi::User.find(user_name).repositories.detect do |repo|
51
+ repo.name == repository_name
52
+ end
53
+ return unless repository
54
+
50
55
  {
51
56
  :name => name,
52
57
  :user => user_name,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddollar-gem-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Dollar
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-19 00:00:00 -07:00
12
+ date: 2009-09-03 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency