[Bps-public-commit] r11715 - in Prophet/trunk: . lib/Prophet/Replica lib/Prophet/Server
jesse at bestpractical.com
jesse at bestpractical.com
Sun Apr 13 20:44:17 EDT 2008
Author: jesse
Date: Sun Apr 13 20:44:17 2008
New Revision: 11715
Modified:
Prophet/trunk/ (props changed)
Prophet/trunk/lib/Prophet/CLI.pm
Prophet/trunk/lib/Prophet/Collection.pm
Prophet/trunk/lib/Prophet/Replica.pm
Prophet/trunk/lib/Prophet/Replica/SVN.pm
Prophet/trunk/lib/Prophet/ReplicaExporter.pm
Prophet/trunk/lib/Prophet/Server/REST.pm
Log:
r29645 at 31b: jesse | 2008-04-13 19:04:04 -0400
enumerate -> list
Modified: Prophet/trunk/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI.pm (original)
+++ Prophet/trunk/lib/Prophet/CLI.pm Sun Apr 13 20:44:17 2008
@@ -5,7 +5,6 @@
use base qw/Class::Accessor/;
__PACKAGE__->mk_accessors(qw/app_class record_class type uuid app_handle/);
-use Path::Class;
use Prophet;
use Prophet::Record;
use Prophet::Collection;
Modified: Prophet/trunk/lib/Prophet/Collection.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Collection.pm (original)
+++ Prophet/trunk/lib/Prophet/Collection.pm Sun Apr 13 20:44:17 2008
@@ -57,7 +57,7 @@
# find all items,
Carp::cluck unless defined $self->type;
- my $nodes = $self->handle->enumerate_nodes( type => $self->type );
+ my $nodes = $self->handle->list_nodes( type => $self->type );
# run coderef against each item;
# if it matches, add it to _items
Modified: Prophet/trunk/lib/Prophet/Replica.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica.pm (original)
+++ Prophet/trunk/lib/Prophet/Replica.pm Sun Apr 13 20:44:17 2008
@@ -779,11 +779,11 @@
Returns true if the node in question exists. False otherwise
-=head2 enumerate_nodes { type => $type }
+=head2 list_nodes { type => $type }
Returns a reference to a list of all the records of type $type
-=head2 enumerate_nodes
+=head2 list_nodes
Returns a reference to a list of all the known types in your Prophet database
Modified: Prophet/trunk/lib/Prophet/Replica/SVN.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica/SVN.pm (original)
+++ Prophet/trunk/lib/Prophet/Replica/SVN.pm Sun Apr 13 20:44:17 2008
@@ -431,25 +431,25 @@
}
-=head2 enumerate_nodes { type => $type }
+=head2 list_nodes { type => $type }
Returns a reference to a list of all the records of type $type
=cut
-sub enumerate_nodes {
+sub list_nodes {
my $self = shift;
my %args = validate( @_ => { type => 1 } );
return [ keys %{ $self->current_root->dir_entries( $self->db_uuid . '/' . $args{type} . '/' ) } ];
}
-=head2 enumerate_types
+=head2 list_types
Returns a reference to a list of all the known types in your Prophet database
=cut
-sub enumerate_types {
+sub list_types {
my $self = shift;
return [ keys %{ $self->current_root->dir_entries( $self->db_uuid . '/' ) } ];
}
Modified: Prophet/trunk/lib/Prophet/ReplicaExporter.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/ReplicaExporter.pm (original)
+++ Prophet/trunk/lib/Prophet/ReplicaExporter.pm Sun Apr 13 20:44:17 2008
@@ -174,7 +174,7 @@
$self->_init_export_metadata( root => $replica_root );
- foreach my $type ( @{ $self->replica->enumerate_types } ) {
+ foreach my $type ( @{ $self->replica->list_types } ) {
$self->export_records(
type => $type,
root => $replica_root,
Modified: Prophet/trunk/lib/Prophet/Server/REST.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Server/REST.pm (original)
+++ Prophet/trunk/lib/Prophet/Server/REST.pm Sun Apr 13 20:44:17 2008
@@ -32,7 +32,7 @@
if ( $p =~ m|^/records\.json$| ) {
$self->_send_content(
content_type => 'text/x-json',
- content => to_json( $self->prophet_handle->enumerate_types )
+ content => to_json( $self->prophet_handle->list_types )
);
} elsif ( $p =~ m|^/records/(.*)/(.*)/(.*)| ) {
More information about the Bps-public-commit
mailing list