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

jesse jesse at bestpractical.com
Tue Feb 10 18:53:46 EST 2009


The branch, master has been updated
       via  a3b4a924d5764a0ac019541e2982ebb1f2cd11be (commit)
       via  4fc0fdb518450e6fd6b940b051bd0810c7801918 (commit)
       via  cd6d998f11553e88c2e85fa117fec82765e8a221 (commit)
      from  a399146ee809a32fa63e9018b62800fbd27c9116 (commit)

Summary of changes:
 lib/Prophet/Server/Dispatcher.pm  |   20 ++++++++++----------
 lib/Prophet/Server/View.pm        |    5 ++++-
 lib/Prophet/Server/ViewHelpers.pm |    2 +-
 t/cli-arg-parsing.t               |    2 +-
 4 files changed, 16 insertions(+), 13 deletions(-)

- Log -----------------------------------------------------------------
commit cd6d998f11553e88c2e85fa117fec82765e8a221
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 10 18:52:41 2009 -0500

    / fixes in the Dispatcher

diff --git a/lib/Prophet/Server/Dispatcher.pm b/lib/Prophet/Server/Dispatcher.pm
index 7803db4..ee87a1d 100644
--- a/lib/Prophet/Server/Dispatcher.pm
+++ b/lib/Prophet/Server/Dispatcher.pm
@@ -14,10 +14,10 @@ under { method => 'POST' } => sub {
         next_rule;
     };
 
-    under '/records' => sub {
-        on qr|^(.*)/(.*)/(.*)$| => sub { shift->server->update_record_prop($1,$2,$3) };
-        on qr|^(.*)/(.*).json$| => sub { shift->server->update_record($1,$2) };
-        on qr|^(.*).json$|     => sub { shift->server->create_record($1) };
+    under qr'/records' => sub {
+        on qr|^/(.*)/(.*)/(.*)$| => sub { shift->server->update_record_prop($1,$2,$3) };
+        on qr|^/(.*)/(.*).json$| => sub { shift->server->update_record($1,$2) };
+        on qr|^/(.*).json$|     => sub { shift->server->create_record($1) };
     };
 };
 
@@ -25,12 +25,12 @@ under { method => 'GET' } => sub {
     on qr'^/=/prophet/autocomplete' => sub {
         shift->server->show_template('/_prophet_autocompleter') };
     on qr'^/static/prophet/(.*)$' => sub { shift->server->send_static_file($1)};
-    on qr'/replica/+(.*)$' => sub { shift->server->serve_replica($1) };
-    on '/records.json' => sub { shift->server->get_record_types };
-    under '/records' => sub {
-        on qr|^(.*)/(.*)/(.*)$| => sub { shift->server->get_record_prop($1,$2,$3); };
-        on qr|^(.*)/(.*).json$| => sub { shift->server->get_record($1,$2) };
-        on qr|^(.*).json$|      => sub { shift->server->get_record_list($1) };
+    on qr'^/replica/+(.*)$' => sub { shift->server->serve_replica($1) };
+    on qr'^/records.json' => sub { shift->server->get_record_types };
+    under qr'/records' => sub {
+        on qr|^/(.*)/(.*)/(.*)$| => sub { shift->server->get_record_prop($1,$2,$3); };
+        on qr|^/(.*)/(.*).json$| => sub { shift->server->get_record($1,$2) };
+        on qr|^/(.*).json$|      => sub { shift->server->get_record_list($1) };
     };
 };
 

commit 4fc0fdb518450e6fd6b940b051bd0810c7801918
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 10 18:53:13 2009 -0500

    Switch arg parsing tests to use Prophet::Test

diff --git a/t/cli-arg-parsing.t b/t/cli-arg-parsing.t
index 9f8a976..fe7a735 100644
--- a/t/cli-arg-parsing.t
+++ b/t/cli-arg-parsing.t
@@ -1,6 +1,6 @@
 use warnings;
 use strict;
-use Test::More tests => 47;
+use Prophet::Test tests => 47;
 use Test::Exception;
 
 use File::Temp qw'tempdir';

commit a3b4a924d5764a0ac019541e2982ebb1f2cd11be
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 10 18:53:31 2009 -0500

    Tiny fixes to views to silence a warning

diff --git a/lib/Prophet/Server/View.pm b/lib/Prophet/Server/View.pm
index 46d035b..412882c 100644
--- a/lib/Prophet/Server/View.pm
+++ b/lib/Prophet/Server/View.pm
@@ -5,7 +5,10 @@ package Prophet::Server::View;
 use base 'Template::Declare';
 
 use Template::Declare::Tags;
-use Prophet::Server::ViewHelpers;
+BEGIN {
+    no warnings 'redefine'; # we stomp on form{}
+    use Prophet::Server::ViewHelpers;
+}
 use Params::Validate;
 use Prophet::Web::Menu;
 
diff --git a/lib/Prophet/Server/ViewHelpers.pm b/lib/Prophet/Server/ViewHelpers.pm
index defe5a6..cffa253 100644
--- a/lib/Prophet/Server/ViewHelpers.pm
+++ b/lib/Prophet/Server/ViewHelpers.pm
@@ -7,7 +7,7 @@ use base 'Exporter::Lite';
 use Params::Validate qw/validate/;
 use Template::Declare::Tags;
 use Prophet::Web::Field;
-our @EXPORT = ( qw(form page content widget function param_from_function hidden_param));
+our @EXPORT = (qw(form page content widget function param_from_function hidden_param));
 use Prophet::Server::ViewHelpers::Widget;
 use Prophet::Server::ViewHelpers::Function;
 use Prophet::Server::ViewHelpers::ParamFromFunction;

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



More information about the Bps-public-commit mailing list