[Bps-public-commit] Prophet - A disconnected, replicated p2p database branch, master, updated. 6e3ba3db4eb733097bdc72664dd257586937a088

jesse jesse at bestpractical.com
Mon Feb 16 17:31:16 EST 2009


The branch, master has been updated
       via  6e3ba3db4eb733097bdc72664dd257586937a088 (commit)
       via  ef6489c315a57d98d74536cf557e12c0b2e17c08 (commit)
       via  657d29222e72012fafed9d1669ab53587d7037d0 (commit)
      from  896565451f2d0388abb3a1fe46f610e23e80cb82 (commit)

Summary of changes:
 lib/Prophet/Server.pm     |    3 +++
 lib/Prophet/Test/Arena.pm |    3 ++-
 t/resty-server.t          |   10 ++++++++--
 3 files changed, 13 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 657d29222e72012fafed9d1669ab53587d7037d0
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Feb 16 17:02:08 2009 -0500

    * Skip maintainer tests that need YAML::Syck if the user doesn't have it

diff --git a/lib/Prophet/Test/Arena.pm b/lib/Prophet/Test/Arena.pm
index 413eed8..7516031 100644
--- a/lib/Prophet/Test/Arena.pm
+++ b/lib/Prophet/Test/Arena.pm
@@ -26,7 +26,6 @@ sub add_history {
 
 use Prophet::Test::Participant;
 use Prophet::Test;
-use YAML::Syck ();
 
 sub setup {
     my $self  = shift;
@@ -55,12 +54,14 @@ sub run_from_yaml {
     return $self->run_from_yamlfile(@ARGV) unless fileno($fh);
 
     local $/;
+    eval { require YAML::Syck; } || Test::More::plan(skip_all => 'YAML::Syck required for these tests');
     $self->run_from_data( YAML::Syck::Load(<$fh>) );
 
 }
 
 sub run_from_yamlfile {
     my ( $self, $file ) = @_;
+    eval { require YAML::Syck; } || Test::More::plan(skip_all => 'YAML::Syck required for these tests');
     $self->run_from_data( YAML::Syck::LoadFile($file) );
 }
 

commit ef6489c315a57d98d74536cf557e12c0b2e17c08
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Feb 16 17:04:41 2009 -0500

    Skip tests for web server unless the user has Test::WWW::Mechanize

diff --git a/t/resty-server.t b/t/resty-server.t
index 33f5f0b..052ce82 100644
--- a/t/resty-server.t
+++ b/t/resty-server.t
@@ -8,8 +8,14 @@ BEGIN {
 
 }
 
-use Prophet::Test tests => 26;
-use Test::WWW::Mechanize;
+use Prophet::Test;
+BEGIN {
+    eval {require Test::WWW::Mechanize; } || plan skip_all => "This test  file requirs Test::WWW::Mechanize";
+}
+
+
+
+plan tests => 26;
 use JSON;
 
 use_ok('Prophet::Record');

commit 6e3ba3db4eb733097bdc72664dd257586937a088
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Feb 16 17:10:06 2009 -0500

    More warnings if a user is missing a dep

diff --git a/lib/Prophet/Server.pm b/lib/Prophet/Server.pm
index e417334..26db57f 100644
--- a/lib/Prophet/Server.pm
+++ b/lib/Prophet/Server.pm
@@ -37,6 +37,9 @@ sub run {
         require Net::Rendezvous::Publish;
         Net::Rendezvous::Publish->new;
     };
+
+    eval { require Template::Declare }  || return "Without Template::Declare installed, Prophet's Web UI won't work";
+
     if ($publisher) {
         $publisher->publish(
             name   => $self->handle->db_uuid,

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



More information about the Bps-public-commit mailing list