[Bps-public-commit] r17662 - in Net-Google-Code/trunk: lib/Net/Google lib/Net/Google/Code
fayland at bestpractical.com
fayland at bestpractical.com
Fri Jan 9 02:58:07 EST 2009
Author: fayland
Date: Fri Jan 9 02:58:07 2009
New Revision: 17662
Modified:
Net-Google-Code/trunk/lib/Net/Google/Code.pm
Net-Google-Code/trunk/lib/Net/Google/Code/Home.pm
Net-Google-Code/trunk/t/20.code.t
Log:
add summary in Net::Google::Code
Modified: Net-Google-Code/trunk/lib/Net/Google/Code.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code.pm (original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code.pm Fri Jan 9 02:58:07 2009
@@ -38,7 +38,7 @@
require Net::Google::Code::Home;
Net::Google::Code::Home->new( parent => $_[0] );
},
- handles => [ 'owners', 'members', 'description', 'labels' ],
+ handles => [ 'owners', 'members', 'summary', 'description', 'labels' ],
);
has 'issue' => (
@@ -115,6 +115,10 @@
the project svn url (without trunk)
+=item summary
+
+short Summary in 'Project Home'
+
=item description
HTML Description in 'Project Home'
Modified: Net-Google-Code/trunk/lib/Net/Google/Code/Home.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/Home.pm (original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/Home.pm Fri Jan 9 02:58:07 2009
@@ -75,6 +75,18 @@
},
);
+has 'summary' => (
+ isa => 'Str',
+ is => 'ro',
+ lazy => 1,
+ default => sub {
+ my $self = shift;
+
+ my $tree = $self->__html_tree;
+ return $tree->look_down(id => 'psum')->find_by_tag_name('a')->content_array_ref->[0];
+ },
+);
+
has 'description' => (
isa => 'Str',
is => 'ro',
Modified: Net-Google-Code/trunk/t/20.code.t
==============================================================================
--- Net-Google-Code/trunk/t/20.code.t (original)
+++ Net-Google-Code/trunk/t/20.code.t Fri Jan 9 02:58:07 2009
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 13;
use Test::MockModule;
use FindBin qw/$Bin/;
use File::Slurp;
@@ -33,6 +33,7 @@
is_deeply( $project->members, [ 'jessev', 'fayland' ] );
like $project->description, qr/Net\:\:Google\:\:Code/;
is_deeply( $project->labels, [ 'perl', 'Google' ] );
+is $project->summary, 'a simple client library for google code';
isa_ok( $project->connection, 'Net::Google::Code::Connection' );
isa_ok( $project->issue, 'Net::Google::Code::Issue' );
More information about the Bps-public-commit
mailing list