[Bps-public-commit] Net-Google-Code branch, master, updated. 8ada26effb4f64f8bd6313d9a918eb8b99e3bc0f
? sunnavy
sunnavy at bestpractical.com
Wed Apr 28 00:42:54 EDT 2010
The branch, master has been updated
via 8ada26effb4f64f8bd6313d9a918eb8b99e3bc0f (commit)
via 12b4cfdc27a518d8ce287c52b972a90967bf4aec (commit)
from b2e008613816a4376fb2a40c98ac36ee0bbf4450 (commit)
Summary of changes:
lib/Net/Google/Code/Issue.pm | 14 +++-----------
t/02.issue.t | 2 +-
2 files changed, 4 insertions(+), 12 deletions(-)
- Log -----------------------------------------------------------------
commit 12b4cfdc27a518d8ce287c52b972a90967bf4aec
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Apr 28 12:41:50 2010 +0800
tweak issuemeta extraction
diff --git a/lib/Net/Google/Code/Issue.pm b/lib/Net/Google/Code/Issue.pm
index 50b9dc9..57b6969 100644
--- a/lib/Net/Google/Code/Issue.pm
+++ b/lib/Net/Google/Code/Issue.pm
@@ -169,7 +169,6 @@ sub parse {
my @meta = $meta->find_by_tag_name('tr');
my @labels;
for my $meta (@meta) {
-
my ( $key, $value );
if ( my $k = $meta->find_by_tag_name('th') ) {
my $v = $meta->find_by_tag_name('td');
@@ -182,14 +181,11 @@ sub parse {
$key = lc $key;
if ($v) {
- my $v_content = $v->content_array_ref->[0];
- while ( ref $v_content ) {
- $v_content = $v_content->content_array_ref->[0];
- }
- $value = $v_content;
+ $value = $v->as_text;
$value =~ s/^\s+//;
$value =~ s/\s+$//;
}
+
if ( $self->can( $key ) ) {
if ( $key eq 'merged' && $value =~ /issue\s+(\d+)/ ) {
$value = $1;
@@ -306,11 +302,7 @@ sub parse_hybrid {
$key = lc $key;
if ($v) {
- my $v_content = $v->content_array_ref->[0];
- while ( ref $v_content ) {
- $v_content = $v_content->content_array_ref->[0];
- }
- $value = $v_content;
+ $value = $v->as_text;
$value =~ s/^\s+//;
$value =~ s/\s+$//;
}
commit 8ada26effb4f64f8bd6313d9a918eb8b99e3bc0f
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Apr 28 12:42:42 2010 +0800
update test
diff --git a/t/02.issue.t b/t/02.issue.t
index 25eb3be..f21b512 100644
--- a/t/02.issue.t
+++ b/t/02.issue.t
@@ -28,7 +28,7 @@ my %info = (
id => 8,
summary => 'issue 8',
description => 'test the hack of file field',
- cc => 'sunnavy',
+ cc => 'sunnavy, t... at example.com',
owner => 'sunnavy',
reporter => 'sunnavy',
status => 'Accepted',
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list