[Bps-public-commit] Prophet branch, master, updated. 0.73-11-g87f2420

jesse jesse at bestpractical.com
Tue Oct 6 17:04:25 EDT 2009


The branch, master has been updated
       via  87f242081079520b337436cf65385881d0d56d36 (commit)
       via  0f8a7106019a40cd3a3e7dfadc3eb0fdffc46614 (commit)
      from  2e7806c10458ef31ef0a0a840bcdcbb4ed297a90 (commit)

Summary of changes:
 lib/Prophet/App.pm    |    2 +-
 lib/Prophet/Server.pm |   15 ++++++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 0f8a7106019a40cd3a3e7dfadc3eb0fdffc46614
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Oct 6 17:03:18 2009 -0400

    Some code from SD had accidentially snuck into prophet. rafl++ for alerting me

diff --git a/lib/Prophet/Server.pm b/lib/Prophet/Server.pm
index 3c1d0e0..0361921 100644
--- a/lib/Prophet/Server.pm
+++ b/lib/Prophet/Server.pm
@@ -41,10 +41,8 @@ sub run {
     eval { require File::ShareDir }  || return "Without File::ShareDir installed, Prophet's Web UI won't work";
 
     if ($publisher) {
-        my $name = $self->app_handle->setting( label => 'project_name' )->get->[0];
-        my $uuid = $self->handle->db_uuid;
         $publisher->publish(
-            name   => "$name ($uuid)",
+            name   => $self->database_bonjour_name,
             type   => '_prophet._tcp',
             port   => $self->port,
             domain => 'local',
@@ -58,6 +56,17 @@ sub run {
     $self->SUPER::run(@_);
 }
 
+=head2 database_bonjour_name
+
+Returns the name this database should use to announce itself via bonjour
+
+=cut
+
+sub database_bonjour_name {
+	my $self = shift;
+	return $self->handle->db_uuid;
+}
+
 sub setup_template_roots {
     my $self       = shift;
     my $view_class = ref( $self->app_handle ) . "::Server::View";

commit 87f242081079520b337436cf65385881d0d56d36
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Oct 6 17:04:01 2009 -0400

    The app settings hash is a hashref. don't just return null if we don't have one

diff --git a/lib/Prophet/App.pm b/lib/Prophet/App.pm
index 6d22426..aca7025 100644
--- a/lib/Prophet/App.pm
+++ b/lib/Prophet/App.pm
@@ -201,7 +201,7 @@ sub setting {
 
 }
 
-sub database_settings {} # XXX wants a better name
+sub database_settings { {} } # XXX wants a better name
 
 
 =head3 log $MSG

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



More information about the Bps-public-commit mailing list