[Bps-public-commit] r17660 - in Net-Google-Code/trunk: lib/Net/Google lib/Net/Google/Code
fayland at bestpractical.com
fayland at bestpractical.com
Fri Jan 9 02:38:44 EST 2009
Author: fayland
Date: Fri Jan 9 02:38:44 2009
New Revision: 17660
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 $project->description
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:38:44 2009
@@ -38,7 +38,7 @@
require Net::Google::Code::Home;
Net::Google::Code::Home->new( parent => $_[0] );
},
- handles => [ 'owners', 'members' ],
+ handles => [ 'owners', 'members', 'description' ],
);
has 'issue' => (
@@ -113,6 +113,10 @@
the project svn url (without trunk)
+=head2 description
+
+HTML Description in Project Home
+
=head2 owners
ArrayRef. project owners
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:38:44 2009
@@ -75,6 +75,18 @@
},
);
+has 'description' => (
+ isa => 'Str',
+ is => 'ro',
+ lazy => 1,
+ default => sub {
+ my $self = shift;
+
+ my $tree = $self->__html_tree;
+ return $tree->look_down(id => 'wikicontent')->content_array_ref->[0]->as_HTML;
+ },
+);
+
no Moose;
__PACKAGE__->meta->make_immutable;
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:38:44 2009
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 10;
+use Test::More tests => 11;
use Test::MockModule;
use FindBin qw/$Bin/;
use File::Slurp;
@@ -31,6 +31,7 @@
is( $project->project, $name, 'project name' );
is_deeply( $project->owners, [ 'sunnavy' ] );
is_deeply( $project->members, [ 'jessev', 'fayland' ] );
+like $project->description, qr/Net\:\: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