[Bps-public-commit] SD branch, master, updated. 55b19743800b732a01803dedce247a55c2e2f644

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Jun 19 01:02:10 EDT 2009


The branch, master has been updated
       via  55b19743800b732a01803dedce247a55c2e2f644 (commit)
       via  254abd6f0d9aec10cbc64565d52084a8d7fd2ec7 (commit)
      from  993870d1058ec8e2c6de1512909054302777afaf (commit)

Summary of changes:
 lib/App/SD/Replica/gcode/PushEncoder.pm |    4 ++--
 lib/App/SD/Replica/rt/PushEncoder.pm    |    4 ++--
 lib/App/SD/Replica/trac/PushEncoder.pm  |    3 ++-
 3 files changed, 6 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit 254abd6f0d9aec10cbc64565d52084a8d7fd2ec7
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jun 19 12:59:34 2009 +0800

    no sub file() exists, update for it

diff --git a/lib/App/SD/Replica/gcode/PushEncoder.pm b/lib/App/SD/Replica/gcode/PushEncoder.pm
index ec05cb8..9f75dc2 100644
--- a/lib/App/SD/Replica/gcode/PushEncoder.pm
+++ b/lib/App/SD/Replica/gcode/PushEncoder.pm
@@ -147,8 +147,8 @@ sub integrate_attachment {
     my $ticket    = $self->sync_source->gcode->issue( id => $ticket_id, );
 
     my $tempdir = File::Temp::tempdir( CLEANUP => 1 );
-    my $file = file( $tempdir => ( $props{'name'} || 'unnamed' ) );
-    my $fh = $file->openw;
+    my $file = File::Spec->catfile( $tempdir, ( $props{'name'} || 'unnamed' ) );
+    open my $fh, '>', $file or die $!;
     print $fh $props{content};
     close $fh;
     my %content = ( comment => '(See attachments)', files => ["$file"] );
diff --git a/lib/App/SD/Replica/rt/PushEncoder.pm b/lib/App/SD/Replica/rt/PushEncoder.pm
index 9bf2831..9ed9a8d 100644
--- a/lib/App/SD/Replica/rt/PushEncoder.pm
+++ b/lib/App/SD/Replica/rt/PushEncoder.pm
@@ -75,8 +75,8 @@ sub integrate_attachment {
     my $ticket = RT::Client::REST::Ticket->new( rt => $self->sync_source->rt, id => $ticket_id );
 
     my $tempdir = File::Temp::tempdir( CLEANUP => 1 );
-    my $file = file( $tempdir => ( $props{'name'} || 'unnamed' ) );
-    my $fh = $file->openw;
+    my $file = File::Spec->catfile( $tempdir, ( $props{'name'} || 'unnamed' ) );
+    open my $fh, '>', $file or die $!;
     print $fh $props{content};
     close $fh;
     my %content = ( message     => '(See attachments)', attachments => ["$file"]);
diff --git a/lib/App/SD/Replica/trac/PushEncoder.pm b/lib/App/SD/Replica/trac/PushEncoder.pm
index c4bf0b9..dadb540 100644
--- a/lib/App/SD/Replica/trac/PushEncoder.pm
+++ b/lib/App/SD/Replica/trac/PushEncoder.pm
@@ -77,7 +77,8 @@ sub integrate_attachment {
     my $ticket = Net::Trac::Ticket->new( trac => $self->sync_source->trac, id => $ticket_id );
 
     my $tempdir = File::Temp::tempdir( CLEANUP => 1 );
-    my $file = file( $tempdir => ( $props{'name'} || 'unnamed' ) );
+    my $file = File::Spec->catfile( $tempdir, ( $props{'name'} || 'unnamed' ) );
+    open my $fh, '>', $file or die $!;
     my $fh = $file->openw;
     print $fh $props{content};
     close $fh;

commit 55b19743800b732a01803dedce247a55c2e2f644
Merge: 254abd6... 993870d...
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jun 19 13:01:46 2009 +0800

    Merge branch 'master' of code.bestpractical.com:/git/sd


-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list