[Bps-public-commit] r14296 - in sd/trunk: bin lib/App/SD

jesse at bestpractical.com jesse at bestpractical.com
Fri Jul 18 19:11:41 EDT 2008


Author: jesse
Date: Fri Jul 18 19:11:41 2008
New Revision: 14296

Modified:
   sd/trunk/bin/sd
   sd/trunk/lib/App/SD/Model/Attachment.pm
   sd/trunk/lib/App/SD/Model/Comment.pm
   sd/trunk/lib/App/SD/Model/Ticket.pm
   sd/trunk/lib/App/SD/Test.pm

Log:
* Tests pass! ship it!
(Mostly new formats in this commit)

Modified: sd/trunk/bin/sd
==============================================================================
--- sd/trunk/bin/sd	(original)
+++ sd/trunk/bin/sd	Fri Jul 18 19:11:41 2008
@@ -14,7 +14,8 @@
     $SIG{__DIE__} = sub {
         my $line = shift;
         $line =~ s/\n.*//s if ($line =~ /at line/s);
-        die $line."\n";
+        $line .= "\n"; $line =~ s/\n+$/\n/gs;
+        die $line;
     };
 }
 

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	Fri Jul 18 19:11:41 2008
@@ -8,8 +8,8 @@
 use constant collection_class => 'App::SD::Collection::Attachment';
 use constant record_type => 'attachment';
 
-use constant summary_format => '%l %s %s';
-use constant summary_props => qw(name content_type);
+
+sub _default_summary_format { '%s,$luid | %s,name | %s,content_type'}
 
 __PACKAGE__->register_reference( ticket => 'App::SD::Model::Ticket');
 

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	Fri Jul 18 19:11:41 2008
@@ -9,8 +9,8 @@
 use constant collection_class => 'App::SD::Collection::Comment';
 use constant record_type => 'comment';
 
-use constant summary_format => '%u %s';
-use constant summary_props => qw(content);
+
+sub _default_summary_format { '%s,$uuid | %s,content'}
 
 use constant declared_props => qw(date 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	Fri Jul 18 19:11:41 2008
@@ -9,16 +9,7 @@
 
 sub default_prop_status { 'new' }
 
-sub summary_props {
-    #my @data = split(/\s+/, shift->app_handle->config('ticket_summary_props') || 'status summary');
-    my @data = split(/\s+/, 'summary status');
-    return @data;
-
-}
-sub summary_format {
-    #return shift->app_handle->config('ticket_summary_format')|| '%4l %-11.11s %-60.60s';
-            return '%l %s %s';
-}
+sub _default_summary_format { '%s,$luid | %s,summary | %s,status' }
 
 
 sub validate_prop_status {

Modified: sd/trunk/lib/App/SD/Test.pm
==============================================================================
--- sd/trunk/lib/App/SD/Test.pm	(original)
+++ sd/trunk/lib/App/SD/Test.pm	Fri Jul 18 19:11:41 2008
@@ -7,6 +7,8 @@
 use base qw/Exporter/;
 our @EXPORT = qw(create_ticket_ok create_ticket_comment_ok get_uuid_for_luid get_luid_for_uuid);
 
+$ENV{'PROPHET_APP_CONFIG'} = "t/prophet_testing.conf";
+
 sub create_ticket_ok {
     my @args = (@_);
     my ( $uuid, $luid );
@@ -30,7 +32,6 @@
 }
 
 
-
 sub get_uuid_for_luid {
         my $luid = shift;
     my ($ok, $out, $err) =  Prophet::Test::run_script( 'sd', [ 'ticket', 'show', '--batch', '--id', $luid ]);



More information about the Bps-public-commit mailing list