[Bps-public-commit] SD branch, master, updated. 0.73-16-g47ea794

jesse jesse at bestpractical.com
Tue Oct 6 17:05:15 EDT 2009


The branch, master has been updated
       via  47ea794bfa20efa5df16b3a6b367f2e2930ca867 (commit)
      from  56847fb52dd7519f379cec161b64959dbe2018d9 (commit)

Summary of changes:
 lib/App/SD/Server.pm |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 47ea794bfa20efa5df16b3a6b367f2e2930ca867
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Oct 6 17:04:32 2009 -0400

    Update SD to use the new database_bonjour_name API provided by prophet

diff --git a/lib/App/SD/Server.pm b/lib/App/SD/Server.pm
index c680b6d..86a17a6 100644
--- a/lib/App/SD/Server.pm
+++ b/lib/App/SD/Server.pm
@@ -1,6 +1,23 @@
 package App::SD::Server;
 use base 'Prophet::Server';
 
+
+
+=head2 database_bonjour_name
+
+Returns the name this database should use to announce itself via bonjour
+
+=cut
+
+sub database_bonjour_name {
+    my $self = shift;
+    my $name = $self->app_handle->setting( label => 'project_name' )->get->[0];
+    my $uuid = $self->handle->db_uuid;
+    return "$name ($uuid)";
+
+}
+
+
 sub css {
     return shift->SUPER::css(@_), "/static/sd/css/main.css";
 }

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



More information about the Bps-public-commit mailing list