[Bps-public-commit] r14324 - in sd/trunk: bin lib/App/SD/CLI/Command/Ticket

jesse at bestpractical.com jesse at bestpractical.com
Sun Jul 20 18:54:36 EDT 2008


Author: jesse
Date: Sun Jul 20 18:54:35 2008
New Revision: 14324

Modified:
   sd/trunk/bin/sd
   sd/trunk/lib/App/SD/CLI/Command/Ticket/Comments.pm
   sd/trunk/lib/App/SD/Model/Attachment.pm
   sd/trunk/lib/App/SD/Model/Comment.pm
   sd/trunk/lib/App/SD/Model/Ticket.pm

Log:
* cleanups for the record_type -> type refactor

Modified: sd/trunk/bin/sd
==============================================================================
--- sd/trunk/bin/sd	(original)
+++ sd/trunk/bin/sd	Sun Jul 20 18:54:35 2008
@@ -10,7 +10,7 @@
 # anything more than the root cause of the failure. Developers and the curious
 # can set environment variable SD_VERBOSE_ERROR to retain the backtraces.
 # When Moose's error throwing is more malleable we should switch to using that.
-unless ($ENV{SD_VERBOSE_ERROR}) {
+unless ($ENV{SD_VERBOSE_ERROR} || $ENV{'TEST_VERBOSE'}) {
     $SIG{__DIE__} = sub {
         my $line = shift;
         $line =~ s/\n.*//s if ($line =~ /at line/s);

Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Comments.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Comments.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Comments.pm	Sun Jul 20 18:54:35 2008
@@ -12,10 +12,10 @@
         print "No comments found\n";
     }
 
-    for (sort { $a->prop('date') cmp $b->prop('date') } @{$record->comments}) {
-        print "id: ".$_->luid." (".$_->uuid.")\n";
-        print "date: ".$_->prop('date')."\n";
-        print $_->prop('content')."\n";
+    for my $entry (sort { $a->prop('date') cmp $b->prop('date') } @{$record->comments}) {
+         print "id: ".$entry->luid." (".$entry->uuid.")\n";
+        print "date: ".$entry->prop('date')."\n";
+        print $entry->prop('content')."\n";
     }
 
 }

Modified: sd/trunk/lib/App/SD/Model/Attachment.pm
==============================================================================
--- sd/trunk/lib/App/SD/Model/Attachment.pm	(original)
+++ sd/trunk/lib/App/SD/Model/Attachment.pm	Sun Jul 20 18:54:35 2008
@@ -6,7 +6,7 @@
 use Params::Validate qw/validate/;
 
 use constant collection_class => 'App::SD::Collection::Attachment';
-use constant record_type => 'attachment';
+use constant type => 'attachment';
 
 
 sub _default_summary_format { '%s,$luid | %s,name | %s,content_type'}

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	Sun Jul 20 18:54:35 2008
@@ -7,7 +7,7 @@
 use DateTime;
 
 use constant collection_class => 'App::SD::Collection::Comment';
-use constant record_type => 'comment';
+use constant type => 'comment';
 
 
 sub _default_summary_format { '%s,$uuid | %s,content'}

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	Sun Jul 20 18:54:35 2008
@@ -5,7 +5,7 @@
 use Term::ANSIColor;
 
 use constant collection_class => 'App::SD::Collection::Ticket';
-use constant record_type => 'ticket';
+use constant type => 'ticket';
 
 sub default_prop_status { 'new' }
 



More information about the Bps-public-commit mailing list