Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pass through github search score.

Too bad it seems to be a meaningless number.
  • Loading branch information...
commit 3319d0636b2a3dd562ae354c461b604c17df954f 1 parent 414683a
@kappa authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/CpanHub.pm
  2. +1 −1  views/serp.tt
View
4 lib/CpanHub.pm
@@ -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
2  views/serp.tt
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.