[Bps-public-commit] r15090 - in sd/trunk: . lib/App/SD lib/App/SD/CLI/Command lib/App/SD/CLI/Command/Help lib/App/SD/CLI/Command/Ticket lib/App/SD/Model lib/App/SD/Replica/Hiveminder lib/App/SD/Replica/RT t
spang at bestpractical.com
spang at bestpractical.com
Tue Aug 12 09:34:18 EDT 2008
Author: spang
Date: Tue Aug 12 09:34:18 2008
New Revision: 15090
Removed:
sd/trunk/lib/App/SD/CLI/Command/Help/
sd/trunk/lib/App/SD/CLI/Command/Server.pm
sd/trunk/t/big-hm-rt.t
Modified:
sd/trunk/ (props changed)
sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm
sd/trunk/lib/App/SD/CLI/Command/Ticket/Search.pm
sd/trunk/lib/App/SD/Model/Comment.pm
sd/trunk/lib/App/SD/Model/Ticket.pm
sd/trunk/lib/App/SD/Record.pm
sd/trunk/lib/App/SD/Replica/Hiveminder/PushEncoder.pm
sd/trunk/lib/App/SD/Replica/RT.pm
sd/trunk/lib/App/SD/Replica/RT/PushEncoder.pm
sd/trunk/t/01-create.t
sd/trunk/t/sd-attachments.t
sd/trunk/t/sd-comments.t
Log:
Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm (original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Details.pm Tue Aug 12 09:34:18 2008
@@ -13,13 +13,22 @@
print "\n=head1 METADATA\n\n";
super();
- print "\n=head1 ATTACHMENTS\n\n";
my @attachments = sort by_creation_date @{$record->attachments};
- print $_->format_summary . "\n" for @attachments;
+ if (@attachments) {
+ print "\n=head1 ATTACHMENTS\n\n";
+ print $_->format_summary . "\n"
+ for @attachments;
+ }
- print "\n=head1 COMMENTS\n\n";
my @comments = sort by_creation_date @{$record->comments};
- print $_->prop('created') . "\n" . $_->prop('content') . "\n\n" for @comments;
+ if (@comments) {
+ print "\n=head1 COMMENTS\n\n";
+ print $_->prop('created') . "\n" . $_->prop('content') . "\n\n"
+ for @comments;
+ }
+
+ print "\n=head1 HISTORY\n\n";
+ print $record->history_as_string;
};
__PACKAGE__->meta->make_immutable;
Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Search.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Search.pm (original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Search.pm Tue Aug 12 09:34:18 2008
@@ -19,6 +19,15 @@
}
};
+# implicit status != closed
+sub default_match {
+ my $self = shift;
+ my $ticket = shift;
+
+ return 0 if $ticket->prop('status') eq 'closed';
+ return 1;
+}
+
__PACKAGE__->meta->make_immutable;
no Moose;
Modified: sd/trunk/lib/App/SD/Model/Comment.pm
==============================================================================
--- sd/trunk/lib/App/SD/Model/Comment.pm (original)
+++ sd/trunk/lib/App/SD/Model/Comment.pm Tue Aug 12 09:34:18 2008
@@ -18,4 +18,6 @@
__PACKAGE__->register_reference( ticket => 'App::SD::Model::Comment');
+__PACKAGE__->meta->make_immutable;
+no Moose;
1;
Modified: sd/trunk/lib/App/SD/Model/Ticket.pm
==============================================================================
--- sd/trunk/lib/App/SD/Model/Ticket.pm (original)
+++ sd/trunk/lib/App/SD/Model/Ticket.pm Tue Aug 12 09:34:18 2008
@@ -90,7 +90,7 @@
=cut
sub props_to_show {
- ('id', 'summary', 'status', 'owner', 'created', 'due', 'creator', 'reported_by', 'CF-Broken in', 'CF-Severity')
+ ('id', 'summary', 'status', 'owner', 'created', 'due', 'creator', 'reported_by')
}
=head2 is_overdue [$date]
Modified: sd/trunk/lib/App/SD/Record.pm
==============================================================================
--- sd/trunk/lib/App/SD/Record.pm (original)
+++ sd/trunk/lib/App/SD/Record.pm Tue Aug 12 09:34:18 2008
@@ -37,6 +37,8 @@
return 1;
}
+__PACKAGE__->meta->make_immutable;
+no Moose;
1;
Modified: sd/trunk/lib/App/SD/Replica/Hiveminder/PushEncoder.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/Hiveminder/PushEncoder.pm (original)
+++ sd/trunk/lib/App/SD/Replica/Hiveminder/PushEncoder.pm Tue Aug 12 09:34:18 2008
@@ -105,6 +105,8 @@
return \%attr;
}
+__PACKAGE__->meta->make_immutable;
+no Moose;
1;
Modified: sd/trunk/lib/App/SD/Replica/RT.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/RT.pm (original)
+++ sd/trunk/lib/App/SD/Replica/RT.pm Tue Aug 12 09:34:18 2008
@@ -278,4 +278,7 @@
=cut
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
1;
Modified: sd/trunk/lib/App/SD/Replica/RT/PushEncoder.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/RT/PushEncoder.pm (original)
+++ sd/trunk/lib/App/SD/Replica/RT/PushEncoder.pm Tue Aug 12 09:34:18 2008
@@ -152,4 +152,9 @@
}
return \%attr;
}
+
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
1;
Modified: sd/trunk/t/01-create.t
==============================================================================
--- sd/trunk/t/01-create.t (original)
+++ sd/trunk/t/01-create.t Tue Aug 12 09:34:18 2008
@@ -24,13 +24,13 @@
);
-run_output_matches( 'sd', [ 'ticket',
- 'show', '--id', $yatta_id ],
+run_output_matches( 'sd', [ 'ticket', 'show', '--batch', '--id', $yatta_id ],
[
- qr/id:\s+$yatta_id\s+\($yatta_uuid\)/,
- qr/summary:\s+YATTA/,
- qr/status:.+new/,
- qr/created:\s+\d{4}-\d{2}-\d{2}.+/,
+ "id: $yatta_id ($yatta_uuid)",
+ 'summary: YATTA',
+ 'status: new',
+ qr/^created: \d{4}-\d{2}-\d{2}.+$/,
+ qr/^creator: .+ at .+$/,
]
);
Modified: sd/trunk/t/sd-attachments.t
==============================================================================
--- sd/trunk/t/sd-attachments.t (original)
+++ sd/trunk/t/sd-attachments.t Tue Aug 12 09:34:18 2008
@@ -30,8 +30,10 @@
[ qw/ticket attachment show --batch --id/, $attachment_id ],
[
qr/id: $attachment_id \($attachment_uuid\)/,
- qr/created:\s+\d{4}-\d{2}-\d{2}.+/,
+ "content: stub",
"content_type: text/plain",
+ qr/created: \d{4}-\d{2}-\d{2}.+/,
+ qr/creator: .+ at .+$/,
qr/paper_order.doc/,
"ticket: $yatta_uuid",
],
@@ -53,8 +55,10 @@
[ qw/ticket attachment show --batch --uuid/, $attachment_uuid ],
[
qr/id: (\d+) \($attachment_uuid\)/,
- qr/created:\s+\d{4}-\d{2}-\d{2}.+/,
+ "content: stub",
"content_type: text/plain",
+ qr/created: \d{4}-\d{2}-\d{2}.+/,
+ qr/creator: .+ at .+$/,
qr/plague_recipe.doc/,
"ticket: $yatta_uuid"
],
Modified: sd/trunk/t/sd-comments.t
==============================================================================
--- sd/trunk/t/sd-comments.t (original)
+++ sd/trunk/t/sd-comments.t Tue Aug 12 09:34:18 2008
@@ -34,7 +34,6 @@
'sd',
[ qw/ticket comment show --batch --uuid/, $comment_uuid ],
[ qr/id: (\d+) \($comment_uuid\)/,
- qr/created: /i,
qr/This is a test/,
qr/created: /,
qr/creator: /,
@@ -57,8 +56,11 @@
'sd',
[ qw/ticket comment show --batch --uuid/, $comment_uuid ],
[ qr/id: (\d+) \($comment_uuid\)/,
+ qr/I hate you/,
qr/created: /i,
- qr/I hate you/, "ticket: $yatta_uuid" ],
+ qr/creator: /i,
+ "ticket: $yatta_uuid"
+ ],
[],
"Found the comment new version"
);
More information about the Bps-public-commit
mailing list