[Bps-public-commit] r15415 - in sd/trunk/lib/App/SD/CLI: Command/Attachment Command/Ticket/Comment Model

jesse at bestpractical.com jesse at bestpractical.com
Sun Aug 24 19:07:03 EDT 2008


Author: jesse
Date: Sun Aug 24 19:07:03 2008
New Revision: 15415

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

Log:
* Context cleanups

Modified: sd/trunk/lib/App/SD/CLI/Command/Attachment/Content.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Attachment/Content.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Attachment/Content.pm	Sun Aug 24 19:07:03 2008
@@ -7,7 +7,7 @@
 sub run {
     my $self = shift;
     my $record =  $self->_get_record_object;
-    $record->load(uuid => $self->cli->uuid);
+    $record->load(uuid => $self->uuid);
     print $record->prop('content');
 }
 

Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm	Sun Aug 24 19:07:03 2008
@@ -7,7 +7,7 @@
     my $self = shift;
     $self->require_uuid;
 
-    $self->set_prop(ticket => $self->cli->uuid);
+    $self->set_prop(ticket => $self->uuid);
 };
 
 __PACKAGE__->meta->make_immutable;

Modified: sd/trunk/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm	Sun Aug 24 19:07:03 2008
@@ -15,7 +15,7 @@
     die "Aborted.\n"
         if length($content) == 0;
 
-    $self->set_prop(ticket => $self->cli->uuid);
+    $self->set_prop(ticket => $self->uuid);
     $self->set_prop(content => $content);
 };
 

Modified: sd/trunk/lib/App/SD/CLI/Model/Ticket.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Model/Ticket.pm	(original)
+++ sd/trunk/lib/App/SD/CLI/Model/Ticket.pm	Sun Aug 24 19:07:03 2008
@@ -19,10 +19,11 @@
 
     require App::SD::CLI::Command::Ticket::Comment::Create;
 
-    $self->cli->mutate_attributes( args => \%args );
+    $self->context->mutate_attributes( args => \%args );
     my $command = App::SD::CLI::Command::Ticket::Comment::Create->new(
         uuid => $args{uuid},
         cli => $self->cli,
+        context => $self->context,
         type => 'comment',
     );
     $command->run();



More information about the Bps-public-commit mailing list