r73306 - in /trunk/libwebservice-solr-perl: Changes META.yml README debian/changelog lib/WebService/Solr.pm lib/WebService/Solr/Document.pm lib/WebService/Solr/Field.pm lib/WebService/Solr/Query.pm lib/WebService/Solr/Response.pm t/document.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Apr 23 18:44:08 UTC 2011


Author: gregoa
Date: Sat Apr 23 18:44:00 2011
New Revision: 73306

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73306
Log:
New upstream release.

Modified:
    trunk/libwebservice-solr-perl/Changes
    trunk/libwebservice-solr-perl/META.yml
    trunk/libwebservice-solr-perl/README
    trunk/libwebservice-solr-perl/debian/changelog
    trunk/libwebservice-solr-perl/lib/WebService/Solr.pm
    trunk/libwebservice-solr-perl/lib/WebService/Solr/Document.pm
    trunk/libwebservice-solr-perl/lib/WebService/Solr/Field.pm
    trunk/libwebservice-solr-perl/lib/WebService/Solr/Query.pm
    trunk/libwebservice-solr-perl/lib/WebService/Solr/Response.pm
    trunk/libwebservice-solr-perl/t/document.t

Modified: trunk/libwebservice-solr-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/Changes?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/Changes (original)
+++ trunk/libwebservice-solr-perl/Changes Sat Apr 23 18:44:00 2011
@@ -1,57 +1,61 @@
 Revision history for Perl extension WebService::Solr.
 
-0.11  Wed Oct 27 2010
-    - Add a note about enabling Keep-Alive connections (Stijn Prompers)
-    - Add field_names method to Document (Cory Watson, Craig Hall)
+0.12 2011-04-12
+ - Clean up docs in relation to autocommit
+ - Handle blessed field values (Dan Brook)
 
-0.10  Wed Mar 17 2010
-    - Add spellcheck() convenience method to Response object
-    - Fix exception when response contained no documents
+0.11 2010-10-27
+ - Add a note about enabling Keep-Alive connections (Stijn Prompers)
+ - Add field_names method to Document (Cory Watson, Craig Hall)
 
-0.09  Fri Dec 04 2009
-    - Return undef in pager/pageset special case when we explicitly
-      return 0 rows
-    - Add rollback() from Solr 1.4
-    - Add generic delete() from Solr 1.4
-    - Update docs to match Solr 1.4 options
-    - Fix ping() to check only the HTTP status
+0.10 2010-03-17
+ - Add spellcheck() convenience method to Response object
+ - Fix exception when response contained no documents
 
-0.08  Wed Oct 14 2009
-    - Allow scalar ref value in WebService::Solr::Query, which works like
-      SQL::Abstract (literal query)
-    - Fix status_message and status_code in Response
-    - Add Data::Pageset capabilities to Response (Jos Boumans)
-    - Ensure compatibility with older versions of Encode by making sure we
-      pass a string to encode() (Gert Brinkmann)
+0.09 2009-12-04
+ - Return undef in pager/pageset special case when we explicitly return 0
+   rows
+ - Add rollback() from Solr 1.4
+ - Add generic delete() from Solr 1.4
+ - Update docs to match Solr 1.4 options
+ - Fix ping() to check only the HTTP status
 
-0.07  Fri Jun 26 2009
-    - Trap JSON::XS exceptions (Jos Boumans)
-    - Provide an abstract query generator: WebService::Solr::Query
-      (Jos Boumans, Brian Cassidy)
+0.08 2009-10-14
+ - Allow scalar ref value in WebService::Solr::Query, which works like
+   SQL::Abstract (literal query)
+ - Fix status_message and status_code in Response
+ - Add Data::Pageset capabilities to Response (Jos Boumans)
+ - Ensure compatibility with older versions of Encode by making sure we
+   pass a string to encode() (Gert Brinkmann)
 
-0.06  Thu May 07 2009
-    - Add auto_suggest to hit the new Solr 1.4 /autoSuggest API (RT #45798)
-    - Refactor a basic GET request into its own public
-      method (generic_solr_request)
+0.07 2009-06-26
+ - Trap JSON::XS exceptions (Jos Boumans)
+ - Provide an abstract query generator: WebService::Solr::Query (Jos
+   Boumans, Brian Cassidy)
 
-0.05  Mon Apr 13 2009
-    - Confess upon HTTP error (Leon Brocard)
-    - Send UTF-8 requests to keep new LWP happy (Leon Brocard)
+0.06 2009-05-07
+ - Add auto_suggest to hit the new Solr 1.4 /autoSuggest API (RT #45798)
+ - Refactor a basic GET request into its own public method
+   (generic_solr_request)
 
-0.04  Mon Mar 02 2009
-    - add make_immutable to Solr.pm
-    - be paranoid about XML escaping (Gert Brinkmann)
+0.05 2009-04-13
+ - Confess upon HTTP error (Leon Brocard)
+ - Send UTF-8 requests to keep new LWP happy (Leon Brocard)
 
-0.03  Thu Jan 15 2009
-    - fix typo (Thanks cog)
-    - pod fixes
-    - try to work around old LWP versions when setting HTTP headers
-    - require URI >= 1.28
-    - require XML::Generator >= 0.94
+0.04 2009-03-02
+ - add make_immutable to Solr.pm
+ - be paranoid about XML escaping (Gert Brinkmann)
 
-0.02  Thu Oct 09 2008
-    - fix pager creation, missing prereq
-    - add a simple facet_counts() shortcut method
+0.03 2009-01-15
+ - fix typo (Thanks cog)
+ - pod fixes
+ - try to work around old LWP versions when setting HTTP headers
+ - require URI >= 1.28
+ - require XML::Generator >= 0.94
 
-0.01  Tue Oct 07 2008
-    - original version;
+0.02 2008-10-09
+ - fix pager creation, missing prereq
+ - add a simple facet_counts() shortcut method
+
+0.01 2008-10-07
+ - original version;

Modified: trunk/libwebservice-solr-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/META.yml?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/META.yml (original)
+++ trunk/libwebservice-solr-perl/META.yml Sat Apr 23 18:44:00 2011
@@ -33,4 +33,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: http://github.com/bricas/webservice-solr
-version: 0.11
+version: 0.12

Modified: trunk/libwebservice-solr-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/README?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/README (original)
+++ trunk/libwebservice-solr-perl/README Sat Apr 23 18:44:00 2011
@@ -20,7 +20,7 @@
     *   agent - a user agent object
 
     *   autocommit - a boolean value for automatic commit() after
-        add/update/delete
+        add/update/delete (default: enabled)
 
     *   default_params - a hashref of parameters to send on every request
 
@@ -90,10 +90,11 @@
 
   commit( \%options )
     Sends a commit command. Returns true on success, false otherwise. You
-    must do a commit after an add, update or delete. You can turn autocommit
-    on to have the library do it for you:
+    must do a commit after an add, update or delete. By default, autocommit
+    is enabled. You may disable autocommit to allow you to issue commit
+    commands manually:
 
-        my $solr = WebService::Solr->new( undef, { autocommit => 1 } );
+        my $solr = WebService::Solr->new( undef, { autocommit => 0 } );
         $solr->add( $doc ); # will not automatically call commit()
         $solr->commit;
 
@@ -134,10 +135,10 @@
 AUTHORS
     Brian Cassidy <bricas at cpan.org>
 
-    Kirk Beers <kirk.beers at nald.ca>
+    Kirk Beers
 
 COPYRIGHT AND LICENSE
-    Copyright 2008-2010 National Adult Literacy Database
+    Copyright 2008-2011 National Adult Literacy Database
 
     This library is free software; you can redistribute it and/or modify it
     under the same terms as Perl itself.

Modified: trunk/libwebservice-solr-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/debian/changelog?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/debian/changelog (original)
+++ trunk/libwebservice-solr-perl/debian/changelog Sat Apr 23 18:44:00 2011
@@ -1,3 +1,9 @@
+libwebservice-solr-perl (0.12-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Sat, 23 Apr 2011 20:42:54 +0200
+
 libwebservice-solr-perl (0.11-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/libwebservice-solr-perl/lib/WebService/Solr.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/lib/WebService/Solr.pm?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/lib/WebService/Solr.pm (original)
+++ trunk/libwebservice-solr-perl/lib/WebService/Solr.pm Sat Apr 23 18:44:00 2011
@@ -36,7 +36,7 @@
     },
 );
 
-our $VERSION = '0.11';
+our $VERSION = '0.12';
 
 sub BUILDARGS {
     my ( $self, $url, $options ) = @_;
@@ -223,7 +223,7 @@
 
 =item * agent - a user agent object
 
-=item * autocommit - a boolean value for automatic commit() after add/update/delete
+=item * autocommit - a boolean value for automatic commit() after add/update/delete (default: enabled)
 
 =item * default_params - a hashref of parameters to send on every request
 
@@ -308,10 +308,10 @@
 =head2 commit( \%options )
 
 Sends a commit command. Returns true on success, false otherwise. You must do
-a commit after an add, update or delete. You can turn autocommit on to have
-the library do it for you:
-
-    my $solr = WebService::Solr->new( undef, { autocommit => 1 } );
+a commit after an add, update or delete. By default, autocommit is enabled. 
+You may disable autocommit to allow you to issue commit commands manually:
+
+    my $solr = WebService::Solr->new( undef, { autocommit => 0 } );
     $solr->add( $doc ); # will not automatically call commit()
     $solr->commit;
 
@@ -364,11 +364,11 @@
 
 Brian Cassidy E<lt>bricas at cpan.orgE<gt>
 
-Kirk Beers E<lt>kirk.beers at nald.caE<gt>
+Kirk Beers
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2008-2010 National Adult Literacy Database
+Copyright 2008-2011 National Adult Literacy Database
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 

Modified: trunk/libwebservice-solr-perl/lib/WebService/Solr/Document.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/lib/WebService/Solr/Document.pm?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/lib/WebService/Solr/Document.pm (original)
+++ trunk/libwebservice-solr-perl/lib/WebService/Solr/Document.pm Sat Apr 23 18:44:00 2011
@@ -41,9 +41,9 @@
         }
 
         my $v = shift @fields;
-        my @values = ( ref $v and !blessed $v ) ? @$v : ( "$v" );
+        my @values = ( ref $v and !blessed $v ) ? @$v : $v;
         push @new_fields,
-            map { WebService::Solr::Field->new( $f => $_ ) } @values;
+            map { WebService::Solr::Field->new( $f => "$_" ) } @values;
     }
 
     return @new_fields;
@@ -144,11 +144,11 @@
 
 Brian Cassidy E<lt>bricas at cpan.orgE<gt>
 
-Kirk Beers E<lt>kirk.beers at nald.caE<gt>
+Kirk Beers
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2008-2010 National Adult Literacy Database
+Copyright 2008-2011 National Adult Literacy Database
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 

Modified: trunk/libwebservice-solr-perl/lib/WebService/Solr/Field.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/lib/WebService/Solr/Field.pm?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/lib/WebService/Solr/Field.pm (original)
+++ trunk/libwebservice-solr-perl/lib/WebService/Solr/Field.pm Sat Apr 23 18:44:00 2011
@@ -77,11 +77,11 @@
 
 Brian Cassidy E<lt>bricas at cpan.orgE<gt>
 
-Kirk Beers E<lt>kirk.beers at nald.caE<gt>
+Kirk Beers
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2008-2010 National Adult Literacy Database
+Copyright 2008-2011 National Adult Literacy Database
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 

Modified: trunk/libwebservice-solr-perl/lib/WebService/Solr/Query.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/lib/WebService/Solr/Query.pm?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/lib/WebService/Solr/Query.pm (original)
+++ trunk/libwebservice-solr-perl/lib/WebService/Solr/Query.pm Sat Apr 23 18:44:00 2011
@@ -446,7 +446,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2008-2010 National Adult Literacy Database
+Copyright 2008-2011 National Adult Literacy Database
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 

Modified: trunk/libwebservice-solr-perl/lib/WebService/Solr/Response.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/lib/WebService/Solr/Response.pm?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/lib/WebService/Solr/Response.pm (original)
+++ trunk/libwebservice-solr-perl/lib/WebService/Solr/Response.pm Sat Apr 23 18:44:00 2011
@@ -217,11 +217,11 @@
 
 Brian Cassidy E<lt>bricas at cpan.orgE<gt>
 
-Kirk Beers E<lt>kirk.beers at nald.caE<gt>
+Kirk Beers
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2008-2010 National Adult Literacy Database
+Copyright 2008-2011 National Adult Literacy Database
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 

Modified: trunk/libwebservice-solr-perl/t/document.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwebservice-solr-perl/t/document.t?rev=73306&op=diff
==============================================================================
--- trunk/libwebservice-solr-perl/t/document.t (original)
+++ trunk/libwebservice-solr-perl/t/document.t Sat Apr 23 18:44:00 2011
@@ -1,4 +1,4 @@
-use Test::More tests => 23;
+use Test::More tests => 25;
 
 use strict;
 use warnings;
@@ -7,6 +7,8 @@
     use_ok( 'WebService::Solr::Document' );
     use_ok( 'WebService::Solr::Field' );
 }
+
+use JSON::XS;
 
 my @fields = (
     [ id     => 1,               { boost => 1.6 } ],
@@ -126,3 +128,11 @@
     my $doc = WebService::Solr::Document->new( @fields[ 0 .. 4 ] );
     is_deeply([ sort($doc->field_names) ], [ qw(id manu name sku weight)], 'field_names');
 }
+
+{
+    my $doc = WebService::Solr::Document->new(
+        bools => decode_json(q/{"arr": [true,false,true]}/)->{arr}
+    );
+    isa_ok( $doc, 'WebService::Solr::Document' );
+    is_deeply([1,0,1], [$doc->values_for('bools')], 'boolean arrays');
+}




More information about the Pkg-perl-cvs-commits mailing list