[Bps-public-commit] r13943 - in sd/trunk: t

jesse at bestpractical.com jesse at bestpractical.com
Thu Jul 10 10:23:41 EDT 2008


Author: jesse
Date: Thu Jul 10 10:23:09 2008
New Revision: 13943

Modified:
   sd/trunk/lib/App/SD/Replica/Hiveminder.pm
   sd/trunk/t/sd-rt-hm.t

Log:
* Small cleanups during refactoring

Modified: sd/trunk/lib/App/SD/Replica/Hiveminder.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/Hiveminder.pm	(original)
+++ sd/trunk/lib/App/SD/Replica/Hiveminder.pm	Thu Jul 10 10:23:09 2008
@@ -152,57 +152,6 @@
 
 }
 
-sub integrate_ticket_create {
-    my $self = shift;
-    my ( $change, $changeset ) = validate_pos( @_, { isa => 'Prophet::Change' }, { isa => 'Prophet::ChangeSet' } );
-
-    # Build up a ticket object out of all the record's attributes
-
-    my $task = $self->hm->create(
-        'Task',
-        owner           => 'me',
-        group           => 0,
-        requestor       => 'me',
-        complete        => 0,
-        will_complete   => 1,
-        repeat_stacking => 0,
-        %{ $self->_recode_props_for_integrate($change) }
-
-    );
-
-    my $txns = $self->hm->search( 'TaskTransaction', task_id => $task->{content}->{id} );
-
-    # lalala
-    $self->record_pushed_transaction( transaction => $txns->[0]->{id}, changeset => $changeset );
-    return $task->{content}->{id};
-
-    #    return $ticket->id;
-
-}
-
-sub integrate_comment {
-    warn "comment not yet";
-}
-
-sub integrate_ticket_update {
-    warn "update not yet";
-}
-
-sub _recode_props_for_integrate {
-    my $self = shift;
-    my ($change) = validate_pos( @_, { isa => 'Prophet::Change' } );
-
-    my %props = map { $_->name => $_->new_value } $change->prop_changes;
-    my %attr;
-
-    for my $key ( keys %props ) {
-        # XXX: fill me in
-        #        next unless ( $key =~ /^(summary|queue|status|owner|custom)/ );
-        $attr{$key} = $props{$key};
-    }
-    return \%attr;
-}
-
 sub _integrate_change {
     my $self = shift;
     my ( $change, $changeset ) = validate_pos(

Modified: sd/trunk/t/sd-rt-hm.t
==============================================================================
--- sd/trunk/t/sd-rt-hm.t	(original)
+++ sd/trunk/t/sd-rt-hm.t	Thu Jul 10 10:23:09 2008
@@ -52,7 +52,6 @@
 $rt->login( username => 'root', password => 'password' );
 
 $url =~ s|http://|http://root:password@|;
-warn $url;
 my $sd_rt_url = "rt:$url|General|Status!='resolved'";
 
 my $ticket = RT::Client::REST::Ticket->new(



More information about the Bps-public-commit mailing list