[Bps-public-commit] SD branch, master, updated. 0.74-68-g8ed511b

Christine Spang spang at bestpractical.com
Thu Jan 6 09:06:33 EST 2011


The branch, master has been updated
       via  8ed511b4b361c97e064a8a0f8838809352802f4a (commit)
       via  c198999d9c21d483f5a3efe9b5832b6f30b5d21c (commit)
       via  fc45369e9b922688628bde923a70defbfbe5e34c (commit)
      from  c63ff765d22328f09621efaa1dc93515540043b1 (commit)

Summary of changes:
 Makefile.PL                       |    3 ++-
 lib/App/SD/CLI/Command/Publish.pm |    9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit fc45369e9b922688628bde923a70defbfbe5e34c
Author: Christine Spang <christine at debian.org>
Date:   Thu Jan 6 12:27:10 2011 +0000

    pass app_handle in to App::SD::Server::Static on instantiation
    
    We now try to access the config to find a default value for the port,
    which requires the app_handle from the get go.

diff --git a/lib/App/SD/CLI/Command/Publish.pm b/lib/App/SD/CLI/Command/Publish.pm
index b9daeae..1eab37d 100644
--- a/lib/App/SD/CLI/Command/Publish.pm
+++ b/lib/App/SD/CLI/Command/Publish.pm
@@ -28,8 +28,8 @@ sub render_templates_into {
     my $dir  = shift;
 
     require App::SD::Server;
-    my $server = App::SD::Server::Static->new( read_only => 1, static => 1 );
-    $server->app_handle( $self->app_handle );
+    my $server = App::SD::Server::Static->new(
+        read_only => 1, static => 1, app_handle => $self->app_handle );
     $server->static(1);
     $server->setup_template_roots();
     use CGI;

commit c198999d9c21d483f5a3efe9b5832b6f30b5d21c
Author: Christine Spang <christine at debian.org>
Date:   Thu Jan 6 13:34:40 2011 +0000

    don't die when trying to make already-existing dir in publish
    
    Should close Debian bug #591385.

diff --git a/lib/App/SD/CLI/Command/Publish.pm b/lib/App/SD/CLI/Command/Publish.pm
index 1eab37d..b5f85ae 100644
--- a/lib/App/SD/CLI/Command/Publish.pm
+++ b/lib/App/SD/CLI/Command/Publish.pm
@@ -157,8 +157,9 @@ sub handle_redirect {
     my $redirected_to   = File::Spec->catfile( $dir => $new_file );
     {
         my $parent = Prophet::Util->updir($redirected_from);
-        unless ( -d $parent ) {
-            eval { mkpath( [$parent] ) };
+        # mkpath succeeds (but returns nothing) if a directory already exists
+        eval { mkpath( [$parent] ) };
+        if ( $@ ) {
             die "Failed to create directory " . $parent . " - for $redirected_to " . $@;
         }
     }

commit 8ed511b4b361c97e064a8a0f8838809352802f4a
Author: Christine Spang <christine at debian.org>
Date:   Thu Jan 6 14:00:11 2011 +0000

    bump HTML::TreeBuilder dep
    
    Closes RT #49528, thanks to Nelson Elhage for reporting

diff --git a/Makefile.PL b/Makefile.PL
index 75e5f87..2c67aff 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -9,7 +9,8 @@ requires 'Prophet'; # URI Params::Validate Class::Accessor Template::Declare::Ta
 
 requires('DateTime');
 requires('Time::Progress');
-requires('HTML::TreeBuilder');
+# versions < 4.1 are buggy handling utf8
+requires('HTML::TreeBuilder' => '4.1');
 requires('DateTime::Format::Natural');
 requires('HTML::Tree');
 requires('URI::file');

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



More information about the Bps-public-commit mailing list