[Bps-public-commit] Shipwright branch, master, updated. ce9880a812882ba784113c86d051525de2cba7c4

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Aug 5 03:40:37 EDT 2009


The branch, master has been updated
       via  ce9880a812882ba784113c86d051525de2cba7c4 (commit)
      from  949dc3fa6694b76ea921a0155a10ae7b232aa2d8 (commit)

Summary of changes:
 META.yml                       |    1 -
 Makefile.PL                    |    1 -
 lib/Shipwright/Backend/Base.pm |    6 ++++--
 3 files changed, 4 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit ce9880a812882ba784113c86d051525de2cba7c4
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Aug 5 15:40:28 2009 +0800

    make repository name more readable in .shipwright/backend

diff --git a/META.yml b/META.yml
index dcd28c9..b05cc26 100644
--- a/META.yml
+++ b/META.yml
@@ -44,7 +44,6 @@ requires:
   LWP::UserAgent: 0
   List::MoreUtils: 0
   Log::Log4perl: 0
-  MIME::Base64::URLSafe: 0
   Module::CoreList: 0
   Module::Info: 0
   UNIVERSAL::require: 0
diff --git a/Makefile.PL b/Makefile.PL
index 74b47c6..56f37a9 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -34,7 +34,6 @@ requires 'IO::Uncompress::RawInflate' => '2.012';
 requires 'Archive::Tar' => 0;
 requires 'Archive::Extract' => 0;
 requires 'File::Compare' => 0;
-requires 'MIME::Base64::URLSafe' => 0;
 requires 'File::Path' => 2.07;
 
 
diff --git a/lib/Shipwright/Backend/Base.pm b/lib/Shipwright/Backend/Base.pm
index 51eb50c..32da241 100644
--- a/lib/Shipwright/Backend/Base.pm
+++ b/lib/Shipwright/Backend/Base.pm
@@ -10,7 +10,6 @@ use File::Copy::Recursive qw/rcopy/;
 use File::Path qw/make_path remove_tree/;
 use List::MoreUtils qw/uniq firstidx/;
 use Module::Info;
-use MIME::Base64::URLSafe;
 
 our %REQUIRE_OPTIONS = ( import => [qw/source/] );
 
@@ -882,7 +881,10 @@ sub local_dir {
     my $base_dir =
       catdir( Shipwright::Util->shipwright_user_root(), 'backends' );
     make_path( $base_dir ) unless -e $base_dir;
-    my $target = catdir( $base_dir, urlsafe_b64encode( $self->repository ) );
+    my $repo = $self->repository;
+    $repo =~ s/:/-/g;
+    $repo =~ s![/\\]!_!g;
+    my $target = catdir( $base_dir, $repo );
 
 # if explicitly defined $need_init, we should do exactly what it asks
 # else, if the $target is not existed yet, we do the init thing

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



More information about the Bps-public-commit mailing list