r51668 - in /branches/upstream/libnet-github-perl/current: Changes META.yml lib/Net/GitHub.pm lib/Net/GitHub/V2/Repositories.pm
angelabad-guest at users.alioth.debian.org
angelabad-guest at users.alioth.debian.org
Wed Jan 27 22:12:13 UTC 2010
Author: angelabad-guest
Date: Wed Jan 27 22:12:01 2010
New Revision: 51668
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=51668
Log:
[svn-upgrade] Integrating new upstream version, libnet-github-perl (0.20)
Modified:
branches/upstream/libnet-github-perl/current/Changes
branches/upstream/libnet-github-perl/current/META.yml
branches/upstream/libnet-github-perl/current/lib/Net/GitHub.pm
branches/upstream/libnet-github-perl/current/lib/Net/GitHub/V2/Repositories.pm
Modified: branches/upstream/libnet-github-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-github-perl/current/Changes?rev=51668&op=diff
==============================================================================
--- branches/upstream/libnet-github-perl/current/Changes (original)
+++ branches/upstream/libnet-github-perl/current/Changes Wed Jan 27 22:12:01 2010
@@ -1,4 +1,7 @@
Revision history for Net-GitHub
+
+0.20 2010.01.27
+ add languages support to repositories api (franckcuny)
0.19 2009.09.05
Bugfix: Send delete token to GitHub, not obj hash (spang)
Modified: branches/upstream/libnet-github-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-github-perl/current/META.yml?rev=51668&op=diff
==============================================================================
--- branches/upstream/libnet-github-perl/current/META.yml (original)
+++ branches/upstream/libnet-github-perl/current/META.yml Wed Jan 27 22:12:01 2010
@@ -30,4 +30,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/fayland/perl-net-github/tree/master
-version: 0.19
+version: 0.20
Modified: branches/upstream/libnet-github-perl/current/lib/Net/GitHub.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-github-perl/current/lib/Net/GitHub.pm?rev=51668&op=diff
==============================================================================
--- branches/upstream/libnet-github-perl/current/lib/Net/GitHub.pm (original)
+++ branches/upstream/libnet-github-perl/current/lib/Net/GitHub.pm Wed Jan 27 22:12:01 2010
@@ -2,7 +2,7 @@
use Any::Moose;
-our $VERSION = '0.19';
+our $VERSION = '0.20';
our $AUTHORITY = 'cpan:FAYLAND';
sub new {
Modified: branches/upstream/libnet-github-perl/current/lib/Net/GitHub/V2/Repositories.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-github-perl/current/lib/Net/GitHub/V2/Repositories.pm?rev=51668&op=diff
==============================================================================
--- branches/upstream/libnet-github-perl/current/lib/Net/GitHub/V2/Repositories.pm (original)
+++ branches/upstream/libnet-github-perl/current/lib/Net/GitHub/V2/Repositories.pm Wed Jan 27 22:12:01 2010
@@ -2,7 +2,7 @@
use Any::Moose;
-our $VERSION = '0.19';
+our $VERSION = '0.20';
our $AUTHORITY = 'cpan:FAYLAND';
use URI::Escape;
@@ -11,56 +11,56 @@
sub search {
my ( $self, $word ) = @_;
-
+
return $self->get_json_to_obj( 'repos/search/' . uri_escape($word), 'repositories' );
}
sub show {
my ( $self, $owner, $repo ) = @_;
-
+
$owner ||= $self->owner;
$repo ||= $self->repo;
-
+
return $self->get_json_to_obj( "repos/show/$owner/$repo", 'repository' );
}
sub list {
my ( $self, $owner ) = @_;
-
+
$owner ||= $self->owner;
-
+
return $self->get_json_to_obj( "repos/show/$owner", 'repositories' );
}
sub watch {
my ( $self ) = @_;
-
- my $owner = $self->owner;
- my $repo = $self->repo;
-
+
+ my $owner = $self->owner;
+ my $repo = $self->repo;
+
return $self->get_json_to_obj_authed( "repos/watch/$owner/$repo", 'repository' );
}
sub unwatch {
my ( $self ) = @_;
-
- my $owner = $self->owner;
- my $repo = $self->repo;
-
+
+ my $owner = $self->owner;
+ my $repo = $self->repo;
+
return $self->get_json_to_obj_authed( "repos/unwatch/$owner/$repo", 'repository' );
}
sub fork {
my ( $self ) = @_;
-
- my $owner = $self->owner;
- my $repo = $self->repo;
-
+
+ my $owner = $self->owner;
+ my $repo = $self->repo;
+
return $self->get_json_to_obj_authed( "repos/fork/$owner/$repo", 'repository' );
}
sub create {
my ( $self, $name, $desc, $homepage, $is_public ) = @_;
-
+
return $self->get_json_to_obj_authed( 'repos/create',
name => $name,
description => $desc,
@@ -72,9 +72,9 @@
sub delete {
my ( $self, $opts ) = @_;
-
- my $repo = $self->repo;
-
+
+ my $repo = $self->repo;
+
my $delete_response
= $self->get_json_to_obj_authed( "repos/delete/$repo" );
if ( $opts->{confirm} ) {
@@ -88,31 +88,31 @@
sub set_private {
my ( $self ) = @_;
-
- my $repo = $self->repo;
-
+
+ my $repo = $self->repo;
+
return $self->get_json_to_obj_authed( "repos/set/private/$repo", 'repository' );
}
sub set_public {
my ( $self ) = @_;
-
- my $repo = $self->repo;
-
+
+ my $repo = $self->repo;
+
return $self->get_json_to_obj_authed( "repos/set/public/$repo", 'repository' );
}
sub deploy_keys {
my ( $self ) = @_;
-
+
my $repo = $self->repo;
-
+
return $self->get_json_to_obj_authed( "repos/keys/$repo", 'public_keys' );
}
sub add_deploy_key {
my ( $self, $title, $key ) = @_;
-
+
my $repo = $self->repo;
-
+
return $self->get_json_to_obj_authed( "repos/key/$repo/add",
title => $title,
key => $key,
@@ -121,9 +121,9 @@
}
sub remove_deploy_key {
my ( $self, $id ) = @_;
-
+
my $repo = $self->repo;
-
+
return $self->get_json_to_obj_authed( "repos/key/$repo/remove",
id => $id,
'public_keys'
@@ -132,50 +132,59 @@
sub collaborators {
my ( $self ) = @_;
-
- my $owner = $self->owner;
- my $repo = $self->repo;
-
+
+ my $owner = $self->owner;
+ my $repo = $self->repo;
+
return $self->get_json_to_obj_authed( "repos/show/$owner/$repo/collaborators", 'collaborators' );
}
sub add_collaborator {
my ( $self, $user ) = @_;
-
- my $repo = $self->repo;
-
+
+ my $repo = $self->repo;
+
return $self->get_json_to_obj_authed( "repos/collaborators/$repo/add/$user", 'collaborators' );
}
sub remove_collaborator {
my ( $self, $user ) = @_;
-
- my $repo = $self->repo;
-
+
+ my $repo = $self->repo;
+
return $self->get_json_to_obj_authed( "repos/collaborators/$repo/remove/$user", 'collaborators' );
}
sub network {
my ( $self ) = @_;
-
- my $owner = $self->owner;
- my $repo = $self->repo;
-
+
+ my $owner = $self->owner;
+ my $repo = $self->repo;
+
return $self->get_json_to_obj( "repos/show/$owner/$repo/network", 'network' );
}
+sub languages {
+ my ($self) = @_;
+ my $owner = $self->owner;
+ my $repo = $self->repo;
+
+ return $self->get_json_to_obj_authed( "repos/show/$owner/$repo/languages",
+ "languages" );
+}
+
sub tags {
my ( $self ) = @_;
-
- my $owner = $self->owner;
- my $repo = $self->repo;
-
+
+ my $owner = $self->owner;
+ my $repo = $self->repo;
+
return $self->get_json_to_obj( "repos/show/$owner/$repo/tags", 'tags' );
}
sub branches {
my ( $self ) = @_;
-
- my $owner = $self->owner;
- my $repo = $self->repo;
-
+
+ my $owner = $self->owner;
+ my $repo = $self->repo;
+
return $self->get_json_to_obj( "repos/show/$owner/$repo/branches", 'branches' );
}
@@ -222,14 +231,14 @@
my $repos_in_detail = $repos->show(); # show the owner+repo in ->new
my $repos_in_detail = $repos->show('fayland', 'foorum'); # another
-
+
To look at more in-depth information for a repository
=item list
my $repositories = $repos->list(); # show the owner in ->new
my $repositories = $repos->list('nothingmuch');
-
+
list out all the repositories for a user
=item watch
@@ -297,6 +306,12 @@
my $network = $repos->network();
+=item languages
+
+List the languages used in a particular repository. Values are in bytes calculated.
+
+ my $languages = $repos->languages();
+
=item tags
my $tags = $repos->tags();
More information about the Pkg-perl-cvs-commits
mailing list