Permalink
Browse files

Pass through github search score.

Too bad it seems to be a meaningless number.
  • Loading branch information...
1 parent 414683a commit 3319d0636b2a3dd562ae354c461b604c17df954f @kappa committed Apr 2, 2010
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/CpanHub.pm
  2. +1 −1 views/serp.tt
View
@@ -67,7 +67,7 @@ sub github_search_req($q, $cb) {
author_link => "http://github.com/$_->{username}->[0]",
date => $dtf->parse_datetime($_->{pushed}->[0])->strftime('%e %B %Y'),
author => $_->{username}->[0],
- ongithub=> 1,
+ ghscore => $_->{score}->[0]->{content},
} } grep { $_->{name}
&& $_->{description}
&& $_->{pushed}
@@ -78,7 +78,7 @@ sub github_search_req($q, $cb) {
});
}
-sub merge_cpan_and_github($cpan, $gh) {
+sub merge_cpan_and_github($cpan, $gh, $q) {
my @res;
foreach my $cp (@$cpan) {
View
@@ -7,7 +7,7 @@ Results <b>1</b> - <b>[= scalar @$res =]</b> of
<p><h2 class=sr><a href="[= $r->{link} =]"><b>[= $r->{name} =]</b></a>
<?pl if ($r->{gh}) { ?>
<small>(<a href="[= $r->{gh}->{link} =]">on github</a>)</small>
- <?pl } elsif ($r->{ongithub}) { ?>
+ <?pl } elsif ($r->{ghscore}) { ?>
<small>(on github)</small>
<?pl } ?>
</h2>

0 comments on commit 3319d06

Please sign in to comment.