r54711 - in /branches/upstream/librt-client-rest-perl/current: CHANGES Changes MANIFEST META.yml lib/RT/Client/REST.pm lib/RT/Client/REST/Forms.pm lib/RT/Client/REST/Object.pm lib/RT/Client/REST/Ticket.pm lib/RT/Client/REST/User.pm t/21-user.t
christine at users.alioth.debian.org
christine at users.alioth.debian.org
Wed Mar 24 01:57:32 UTC 2010
Author: christine
Date: Wed Mar 24 01:57:23 2010
New Revision: 54711
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54711
Log:
[svn-upgrade] Integrating new upstream version, librt-client-rest-perl (0.4)
Added:
branches/upstream/librt-client-rest-perl/current/CHANGES
Removed:
branches/upstream/librt-client-rest-perl/current/Changes
Modified:
branches/upstream/librt-client-rest-perl/current/MANIFEST
branches/upstream/librt-client-rest-perl/current/META.yml
branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST.pm
branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Forms.pm
branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Object.pm
branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Ticket.pm
branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/User.pm
branches/upstream/librt-client-rest-perl/current/t/21-user.t
Added: branches/upstream/librt-client-rest-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/CHANGES?rev=54711&op=file
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/CHANGES (added)
+++ branches/upstream/librt-client-rest-perl/current/CHANGES Wed Mar 24 01:57:23 2010
@@ -1,0 +1,522 @@
+Revision history for Perl module RT::Client::REST
+
+0.40
+ Jerrad Pierce <jpierce at cpan.org>
+ - #38710, more user attributes
+ - #39868 & #42391, Alter CF parsing to accomodate 3.8 as well as 3.6
+ This required tweaks to Forms as well as Object.
+ - #38591 & #43844, Add requestor attribute to Ticket so that autoreplies
+ are sent to users under RT3.8
+
+0.37 Fri Aug 15 2008 "Dmitri Tikhonov" <dtikhonov at yahoo.com>
+ - Fri Aug 15 2008 "Dmitri Tikhonov" <dtikhonov at yahoo.com>
+ Improvement: reorganized exceptions, made
+ RT::Client::REST::Object::Exception a subclass of
+ RT::Client::REST::Exception. What this means is that now any native
+ exception thrown by RT::Client::REST code can be caught by catching a
+ generic RT::Client::REST::Exception class. Added tests to ticket and
+ attachment tests scripts to verify the behavior. I have been meaning
+ to do this for a while now.
+
+ Fixed an error in RT::Client::REST::Ticket POD. Bug 36814.
+
+0.36 Sat May 10 2008 "Damien Krotkine" <dams at cpan.org>
+ - Sat May 10 2008 "Damien Krotkine" <dams at cpan.org>
+ Bug 35692 and 35146 : added test and fix.
+
+0.35 Tue Apr 15 2008 "Damien Krotkine" <dams at cpan.org>
+ - Tue Mar 04 2008 "Damien Krotkine" <dams at cpan.org>
+ Bug 34917 : applying patch from Andreas J. Koenig.
+ remove unneeded Encode
+
+0.34 Tue Mar 04 2008 "Damien Krotkine" <dams at cpan.org>
+ - Mon, 03 Mar 2008 "Damien Krotkine" <dams at cpan.org>
+ added Encode prerequist
+
+0.33 Fri Feb 29 2008 "Damien Krotkine" <dams at cpan.org>
+ - Fri, 01 Feb 2008 "Dmitri Tikhonov" <dtikhonov at yahoo.com>
+ Fixed a typo.
+ Updated POD; no code changes.
+ s/dtikhonov at vonage.com/dtikhonov at yahoo.com/
+
+ - Tue, 29 Jan 2008 "Damien Krotkine" <dams at cpan.org>
+ Decode data from REST from the proper encoding to Perl internal.
+ Thanks to "Sébastien Aperghis-Tramoni" <sebastien at aperghis.net>
+
+ - Fri, 25 Jan 2008 "Damien Krotkine" <dams at cpan.org>
+ Add dirty custom fields handling. Without it, cf are always submitted,
+ included void ones, which may (and does on rt.cpan.org) conflict with
+ custom fields rules on the server (e.g. a custom field value cannot be
+ empty)
+
+0.32 Sun Dec 23 2007 "Dmitri Tikhonov" <dtikhonov at yahoo.com>
+ - Fixed bug 31827 -- allow to specify custom fields at creation time.
+ Method 'cf' can now take a hash reference that has a list of custom
+ fields and their values.
+
+ - Fixed bug 31828: allow to specify ticket content at creation time.
+ Methods RT::Client::REST->create and RT::Client::REST::Ticket->store
+ now take optional 'text' parameter.
+
+0.31 Fri May 25 2007 "Dmitri Tikhonov" <dtikhonov at yahoo.com>
+ ! lib/RT/Client/REST.pm
+ * Fixed 'VERSION' section of POD to print the correct version.
+
+ ! lib/RT/Client/REST/Ticket.pm
+ ! lib/RT/Client/REST/User.pm
+ * Fixed SYNOPSYS in POD to reflect reality. No code changes.
+
+ ! lib/RT/Client/REST/Queue.pm
+ * CPAN.RT #27267 - fixed POD. No code changes.
+
+ ! Makefile.PL
+ * Added 'LICENSE' option.
+
+0.30 Sat May 19 2007 "Dmitri Tikhonov" <dtikhonov at yahoo.com>
+ ! lib/RT/Client/REST.pm
+ * CPAN.RT #27201 -- if one login fails, subsequent logins should
+ fail as well.
+
+0.29 Thu May 17 2007 "Dmitri Tikhonov" <dtikhonov at yahoo.com>
+ ! lib/RT/Client/REST/Object.pm
+ * Do not validate values received from the server (from_form
+ method).
+
+0.28 Fri Apr 27 2007 "Dmitri Tikhonov" <dtikhonov at yahoo.com>
+ This is a bug fix release.
+
+ ! lib/RT/Client/REST/Ticket.pm
+ * CPAN.RT #25185 -- fixed typos in attribute validation specs.
+
+ ! lib/RT/Client/REST.pm
+ * CPAN.RT #26528 -- fixed a typo in method 'get_transaction_ids'
+
+ ! examples/show_ticket.pl
+ * Added code to display all custom fields.
+
+ + t/99-kwalitee.t
+ * Kwalitee is spelled... vanity?!
+
+ ! TODO
+ * Removed a couple of old items.
+
+ Special thanks to Damien Krotkine (Dams) who found and provided
+ patches for both bugs.
+
+0.27 Tue Oct 3 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ This is a small release to fix warnings and a couple of documentation
+ errors.
+
+ ! lib/RT/Client/REST.pm
+ * Fixed SYNOPSIS (CPAN RT 21314).
+ * Upped $VERSION to 0.27.
+
+ ! lib/RT/Client/REST/Object.pm
+ * Fixed code to avoid a possible 'undefined value' warnings from
+ tests.
+ * Fixed up POD (annocpan note #989).
+
+ ! t/35-db.t
+ * Changed from 'no_plan' to plan 20 tests.
+
+ ! t/22-ticket.t
+ * Added test to verify properties of list attributes.
+
+0.26 Tue Aug 15 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST.pm
+ * Match either $res->content or $res->message for the timeout
+ message; this depends on version of HTTP::Response installed on
+ the system. Discovered when timeout tests threw wrong exceptions
+ on an old box.
+
+ ! README
+ * Reworded some things.
+
+0.25 Wed Aug 9 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ Added support for basic HTTP authentication.
+
+ ! lib/RT/Client/REST.pm
+ * Added support for using basic HTTP authentication with the help
+ of a callback provided via method "basic_auth_cb".
+ * Use our own UA class (subclass of LWP::UserAgent).
+
+ ! t/10-core.t
+ * More tests.
+
+ + lib/RT/Client/REST/HTTPClient.pm
+ * Subclass of LWP::UserAgent to add some methods.
+
+ + examples/report-bug-to-cpan.pl
+ * Report a bug to CPAN rt.
+
+ ! examples/show_ticket.pl
+ * Removed ticket-modifying code.
+
+ ! MANIFEST
+ * Added new files.
+
+ ! TODO
+ * More stuff to do.
+
+0.24 Tue Aug 8 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST.pm
+ * Added 'timeout' attribute to the object. If specified, overrides
+ the default used by LWP::UserAgent.
+
+ ! lib/RT/Client/REST/Exception.pm
+ * Added RT::Client::REST::RequestTimedOutException.
+
+ ! 91-pod-coverage.t
+ * RT::Client::REST now has improved POD.
+
+ ! MANIFEST
+ * Added new files.
+
+ ! TODO
+ * Added 'write user manual' item.
+
+ + t/80-timeout.t
+ * Test timeout exceptions.
+
+ + README
+ * Added README file.
+
+0.23 Fri Aug 4 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST.pm
+ * API change -- added 'login' method.
+
+ ! lib/RT/Client/REST/SearchResult.pm
+ * API change -- 'object' instead of 'retrieve'.
+
+ ! lib/RT/Client/REST/Object.pm
+ * Added support for transparency and a bunch of other goodies.
+ See POD.
+
+ ! lib/RT/Client/REST/Attachment.pm
+ ! lib/RT/Client/REST/Ticket.pm
+ * Modified to conform to changed APIs.
+
+ ! examples/*.pl
+ * Modified to adhere to new APIs.
+
+ + t/35-db.t
+ * Test auto* goodies.
+
+ + t/91-pod-coverage.t
+ * Test POD coverage.
+
+ ! t/10-core.t
+ ! t/20-object.t
+ ! t/40-search.t
+ * Updated with new tests, methods, APIs, etc.
+
+ ! MANIFEST
+ * Added new test files.
+
+0.22 Fri Aug 4 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST/Object.pm
+ * Modified behavior. Now list attribute methods return lists,
+ not array references.
+ * Fixed the way comma-separated values are split when parsing forms.
+ * Updated POD.
+
+ ! Makefile.PL
+ * Added dependency on Test::Exception, so that automated CPAN tests
+ don't fail.
+
+ ! lib/RT/Client/REST.pm
+ * Updated POD.
+ * Upped VERSION.
+ * No code changes.
+
+ ! examples/edit_ticket.pl
+ * Modified to support setting list attributes.
+
+0.21 Thu Aug 3 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST.pm
+ * Added support for attachments.
+
+ ! lib/RT/Client/REST/Ticket.pm
+ * Updated POD.
+
+ ! lib/RT/Client/REST/Exception.pm
+ * Added exception RT::Client::REST::CannotReadAttachmentException.
+ * Jump version to 0.17 so that CPAN indexer does not bitch.
+
+ ! t/22-ticket.t
+ * Added test for RT::Client::REST::CannotReadAttachmentException.
+
+0.20 Wed Aug 2 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ Added support for queues.
+
+ ! lib/RT/Client/REST.pm
+ * Modified method "show()" to accept non-numeric IDs for objects
+ of type 'queue'.
+
+ + lib/RT/Client/REST/Queue.pm
+ + t/25-queue.t
+ * Queue support.
+
+ + examples/show_queue.pl
+ + examples/create_user.pl
+ + examples/list_tickets.pl
+ * More examples.
+
+ ! MANIFEST
+ * Added new files.
+
+0.19 Wed Aug 2 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST.pm
+ * Fixed a bug in 'create' and 'edit' -- introduced in 0.14 when
+ APIs changed. (Note to self - need a full-blown test suite).
+
+0.18 Wed Aug 2 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST.pm
+ ! t/10-core.t
+ * Added methods 'take', 'untake', and 'steal'.
+ * If attribute 'server' is unset,
+ RT::Client::REST::RequiredAttributeUnsetException will be thrown
+ when a REST method is called.
+
+ ! lib/RT/Client/REST/Exception.pm
+ * Added exceptions:
+ * RT::Client::REST::RequiredAttributeUnsetException
+ * RT::Client::REST::AlreadyTicketOwnerException
+
+ ! lib/RT/Client/REST/Object.pm
+ ! t/20-object.t
+ * Added convenience assertions methods:
+ * _assert_rt_and_id
+ * _assert_rt
+ * Added assertions to methods 'retrieve', 'store', and 'count'.
+
+ ! lib/RT/Client/REST/Object/Exception.pm
+ * Added exceptions:
+ * RT::Client::REST::Object::NoopOperationException
+ * RT::Client::REST::Object::RequiredAttributeUnsetException
+
+ ! lib/RT/Client/REST/Ticket.pm
+ ! t/22-ticket.t
+ * Added methods 'take', 'untake', and 'steal'
+ * Added assertions in a couple of places
+ * Fixed up POD.
+
+ + examples/take_ticket.pl
+ * Taking a ticket.
+
+ ! MANIFEST
+ * Added new example.
+
+0.17 Tue Aug 1 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ + lib/RT/Client/REST/Transaction.pm
+ + t/24-transaction.t
+ * Added transaction object.
+
+ + examples/show_transaction.pl
+ + examples/list_transactions_rt.pl
+ + examples/list_transactions.pl
+ * Some more examples.
+
+ ! lib/RT/Client/REST/Ticket.pm
+ * Added method "transactions()".
+
+ ! lib/RT/Client/REST.pm
+ ! t/10-core.t
+ * Added methods "get_transaction_ids()" and "get_transaction()"
+
+ ! lib/RT/Client/REST/Attachment.pm
+ * After retrieving values, set everything to not dirty.
+ * Fixed up POD.
+
+ ! MANIFEST
+ * Added new files.
+
+0.16 Tue Aug 1 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ Added support for user object; other minor changes.
+
+ + lib/RT/Client/REST/User.pm
+ + t/21-user.t
+ * Added user object.
+
+ + examples/show_user.pl
+ + examples/edit_user.pl
+ * Examples of the user APIs.
+
+ ! lib/RT/Client/REST.pm
+ * If method "show()" is called to retrieve an object of type "user",
+ 'id' parameter does not have to be numeric.
+
+ ! lib/RT/Client/REST/Exception.pm
+ * Added RT::Client::REST::UnauthorizedActionException
+ * Method _rt_content_to_exception() now returns a ready-to-throw
+ exception with message set to massaged text from RT server.
+
+ ! MANIFEST
+ * Added new files.
+
+0.15 Tue Aug 1 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST/Ticket.pm
+ * Fixed up POD.
+
+ ! lib/RT/Client/REST.pm
+ * Upped $VERSION to 0.15 -- no code changes.
+
+0.14 Tue Aug 1 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ + lib/RT/Client/REST/Attachment.pm
+ + examples/list_attachments.pl
+ + examples/show_attachment.pl
+ + t/23-attachment.t
+ * New attachment representation.
+
+ ! lib/RT/Client/REST/Ticket.pm
+ ! t/22-ticket.t
+ * Added method "attachments()".
+
+ ! lib/RT/Client/REST/SearchResult.pm
+ ! t/40-search.t
+ * Changed APIs to be more flexible -- pass a closure to retrieve
+ objects.
+
+ ! lib/RT/Client/REST/Object.pm
+ * Modified to work correctly with new REST.pm and SearchResult.pm APIs.
+
+ ! lib/RT/Client/REST/Object/Exception.pm
+ * Added RT::Client::REST::Object::IllegalMethodException
+
+ ! examples/show_ticket.pl
+ * Catch and display exceptions.
+
+ ! lib/RT/Client/REST/Exception.pm
+ * Added several exceptions.
+ * Added POD.
+
+ ! lib/RT/Client/REST.pm
+ ! t/10-core.t
+ * Modified "show()" and "edit()" methods to only accept a single ID.
+ This is needed in order to correctly throw exceptions -- one object
+ at a time, please.
+ * Added methods "get_attachment_ids()" and "get_attachment()".
+ * Removed list of exceptions (see Exception.pm docs).
+ * Various small updates to POD.
+
+ ! MANIFEST
+ * Added the new files.
+
+0.13 Mon Jul 31 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ Added searching APIs.
+
+ ! lib/RT/Client/REST/Object.pm
+ * Added methods 'search' and 'count'.
+ * Updated POD.
+
+ + lib/RT/Client/REST/SearchResult.pm
+ * This class is an OO representation of search results.
+
+ + t/40-search.t
+ * Tests for RT/Client/REST/SearchResult.pm
+
+ + examples/search_tickets.pl
+ * Example of a search.
+
+ ! lib/RT/Client/REST.pm
+ * Added method 'search'.
+ * Modified POD to reflect latest changes.
+
+ ! t/10-core.t
+ * Added test for method 'search'.
+
+ ! lib/RT/Client/REST/Exception.pm
+ * Added RT::Client::REST::InvalidQueryException
+ * Added $VERSION
+
+ ! lib/RT/Client/REST/Object/Exception.pm
+ * Added two exceptions:
+ * RT::Client::REST::Object::InvalidSearchParametersException
+ * RT::Clite::REST::Object::InvalidAttributeException
+
+ ! TODO
+ * Search has been implemented.
+
+ ! MANIFEST
+ * Added search-related files.
+
+0.12 Tue Jul 25 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ Refactoring and improvement continues. Still very much beta.
+
+ ! lib/RT/Client/REST/Ticket.pm
+ * Added methods 'comment' and 'correspond'.
+ * Added attribute 'last_updated'.
+ * Added POD.
+
+ ! t/22-ticket.t
+ * Added tests for new methods and attributes.
+
+ ! lib/RT/Client/REST.pm
+ * Added 'cc' and 'bcc' support to 'comment' and 'correspond' methods.
+ * Refactoring: moved forms functions and exceptions into their own files.
+ * Fixed POD (s/=end/=cut/).
+ * Throw 409 RT errors (syntax errors), since this client is not
+ interactive.
+
+ + lib/RT/Client/REST/Exception.pm
+ * Refactoring: moved forms functions and exceptions into their own files.
+ * Mapped 'does not exist' to ObjectNotFound exception.
+ * Added RT::Client::REST::UnknownCustomFieldException.
+
+ + lib/RT/Client/REST/Forms.pm
+ * Refactoring: moved forms functions and exceptions into their own files.
+
+ ! lib/RT/Client/REST/Object.pm
+ * When creating an object, update $self with the new id.
+ * Added support for fetching and updating custom fields.
+ * Added method 'cf' for custom field manipulation.
+ * Added POD.
+
+ ! t/20-object.t
+ * Added test for 'cf' method.
+
+ + t/90-pod.t
+ * Added POD tests using Test::Pod.
+
+ ! examples/edit_ticket.pl
+ ! examples/show_ticket.pl
+ * Now rtserver is $ENV{RTSERVER} by default.
+
+ + examples/create_ticket.pl
+ + examples/comment_on_ticket.pl
+ + examples/edit_custom_field.pl
+ * More examples.
+
+ ! Makefile.PL
+ * Added dependency on Params::Validate.
+
+ ! MANIFEST
+ * Updated to reflect new tests, examples, and classes.
+
+ + TODO
+ * Added TODO file.
+
+0.11 Sat Jul 22 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ ! lib/RT/Client/REST.pm
+ * Make $VERSION a string so that 'make tardist' works as
+ expected (i.e. version 0.10 instead of 0.1).
+
+0.10 Sat Jul 22 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ Started working on new APIs; new objects and file structure.
+
+0.06 Wed Jul 12 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ * Method 'create' now returns numeric ID of the new object.
+ * RT::Interface::REST is no longer a requirement. If it is not
+ installed, embedded copy of auxiliary methods is used.
+ * Added tests.
+
+0.05 Thu Apr 20 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ * Added RT::Client::REST::CouldNotCreateObjectException
+
+0.04 Wed Apr 19 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ * Removed old print statements
+
+0.03 Wed Apr 19 2006 "Dmitri Tikhonov" <dtikhonov at vonage.com>
+ This is the initial release.
+
+# vim:sts=2:sw=2:et:ft=changelog:
Modified: branches/upstream/librt-client-rest-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/MANIFEST?rev=54711&op=diff
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/MANIFEST (original)
+++ branches/upstream/librt-client-rest-perl/current/MANIFEST Wed Mar 24 01:57:23 2010
@@ -1,4 +1,4 @@
-Changes
+CHANGES
examples/comment_on_ticket.pl
examples/create_ticket.pl
examples/create_user.pl
Modified: branches/upstream/librt-client-rest-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/META.yml?rev=54711&op=diff
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/META.yml (original)
+++ branches/upstream/librt-client-rest-perl/current/META.yml Wed Mar 24 01:57:23 2010
@@ -1,20 +1,28 @@
--- #YAML:1.0
-name: RT-Client-REST
-version: 0.37
-abstract: ~
-license: perl
-author: ~
-generated_by: ExtUtils::MakeMaker version 6.42
-distribution_type: module
-requires:
- Encode: 0
- Error: 0
- Exception::Class: 0
- HTTP::Cookies: 0
- HTTP::Request::Common: 0
- LWP: 0
- Params::Validate: 0
- Test::Exception: 0
+name: RT-Client-REST
+version: 0.4
+abstract: ~
+author: []
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
+requires:
+ Encode: 0
+ Error: 0
+ Exception::Class: 0
+ HTTP::Cookies: 0
+ HTTP::Request::Common: 0
+ LWP: 0
+ Params::Validate: 0
+ Test::Exception: 0
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.56
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST.pm?rev=54711&op=diff
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST.pm (original)
+++ branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST.pm Wed Mar 24 01:57:23 2010
@@ -1,4 +1,4 @@
-# $Id: REST.pm 30 2008-08-16 00:58:07Z dtikhonov $
+# $Id: REST.pm 38 2010-03-10 17:30:50Z pplusdomain $
# RT::Client::REST
#
# Dmitri Tikhonov <dtikhonov at yahoo.com>
@@ -25,7 +25,7 @@
use warnings;
use vars qw/$VERSION/;
-$VERSION = '0.37';
+$VERSION = 0.40;
use Error qw(:try);
use HTTP::Cookies;
@@ -1080,14 +1080,14 @@
=head1 VERSION
-This is version 0.37 of B<RT::Client::REST>.
+This is version 0.40 of B<RT::Client::REST>.
=head1 AUTHORS
Original /usr/bin/rt was written by Abhijit Menon-Sen <ams at wiw.org>. rt
was later converted to this module by Dmitri Tikhonov <dtikhonov at yahoo.com>.
In January of 2008, Damien "dams" Krotkine <dams at cpan.org> joined as the
-project's co-maintainer.
+project's co-maintainer. JLMARTIN has become co-maintainer as of March 2010.
=head1 LICENSE
Modified: branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Forms.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Forms.pm?rev=54711&op=diff
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Forms.pm (original)
+++ branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Forms.pm Wed Mar 24 01:57:23 2010
@@ -1,8 +1,7 @@
-# $Id: Forms.pm 2 2007-12-23 02:16:25Z dtikhonov $
+# $Id: Forms.pm 34 2009-04-10 01:45:19Z belg4mit $
#
-# This package provides functions from RT::Interface::REST, because we do
-# not want to depend on rt being installed. The source code is copied from
-# rt 3.4.5.
+# This package provides functions from RT::Interface::REST, because we don't
+# want to depend on rt being installed. Derived from rt 3.4.5.
package RT::Client::REST::Forms;
@@ -10,12 +9,14 @@
use warnings;
use Exporter;
-use vars qw(@EXPORT @ISA);
+use vars qw(@EXPORT @ISA $VERSION);
@ISA = qw(Exporter);
@EXPORT = qw(expand_list form_parse form_compose vpush vsplit);
-
-my $field = '(?:[a-zA-Z][a-zA-Z0-9_-]*|CF-[a-zA-Z0-9_ -]*)';
+$VERSION = .02;
+
+my $CF_name = qr%[\s\w:()/-]+%;
+my $field = qr/[a-z][\w-]*|C(?:ustom)?F(?:ield)?-$CF_name|CF\.{$CF_name}/i;
sub expand_list {
my ($list) = @_;
Modified: branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Object.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Object.pm?rev=54711&op=diff
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Object.pm (original)
+++ branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Object.pm Wed Mar 24 01:57:23 2010
@@ -1,4 +1,4 @@
-# $Id: Object.pm 13 2008-01-25 19:17:27Z dkrotkine $
+# $Id: Object.pm 34 2009-04-10 01:45:19Z belg4mit $
package RT::Client::REST::Object;
@@ -434,10 +434,14 @@
$rest2attr{$rest_name} = $attr;
}
- # Now set attbibutes:
+ # Now set attributes:
while (my ($key, $value) = each(%$hash)) {
- if ($key =~ s/^cf-//) { # Handle custom fields.
- if ($value =~ /,/) { # OK, this is questionable.
+ # Handle custom fields, ideally /(?(1)})/ would be appened to RE
+ if( $key =~ m%^(?:cf|customfield)(?:-|\.{)([\s\w_:()/-]+)% ){
+ $key = $1;
+
+ # XXX very sketchy. Will fail on long form data e.g; wiki CF
+ if ($value =~ /,/) {
$value = [ split(/\s*,\s*/, $value) ];
}
Modified: branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Ticket.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Ticket.pm?rev=54711&op=diff
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Ticket.pm (original)
+++ branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/Ticket.pm Wed Mar 24 01:57:23 2010
@@ -1,4 +1,4 @@
-# $Id: Ticket.pm 28 2008-08-16 00:23:30Z dtikhonov $
+# $Id: Ticket.pm 36 2009-04-10 18:43:46Z belg4mit $
#
# RT::Client::REST::Ticket -- ticket object representation.
@@ -8,7 +8,7 @@
use warnings;
use vars qw($VERSION);
-$VERSION = '0.09';
+$VERSION = 0.10;
use Error qw(:try);
use Params::Validate qw(:types);
@@ -136,6 +136,13 @@
list => 1,
},
+ requestor => {
+ validation => {
+ type => ARRAYREF,
+ },
+ list => 1,
+ },
+
cc => {
validation => {
type => ARRAYREF,
@@ -254,11 +261,22 @@
=item B<final_priority>
+=item B<requestor>
+
+This is the attribute for setting the requestor on ticket creation.
+If you use requestors to do this in 3.8, the recipient may not receive
+an autoreply from RT because the ticket is initially created as the user
+your REST session is connected as.
+
+It is a list attribute (for explanation of list attributes, see
+B<LIST ATTRIBUTE PROPERTIES> in L<RT::Client::REST::Object>).
+
=item B<requestors>
-This is a list attribute (for explanation of list attributes, see
-B<LIST ATTRIBUTE PROPERTIES> in L<RT::Client::REST::Object>). Contains
-e-mail addresses of the requestors.
+This contains e-mail addresses of the requestors.
+
+It is a list attribute (for explanation of list attributes, see
+B<LIST ATTRIBUTE PROPERTIES> in L<RT::Client::REST::Object>).
=item B<cc>
Modified: branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/User.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/User.pm?rev=54711&op=diff
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/User.pm (original)
+++ branches/upstream/librt-client-rest-perl/current/lib/RT/Client/REST/User.pm Wed Mar 24 01:57:23 2010
@@ -1,4 +1,4 @@
-# $Id: User.pm 2 2007-12-23 02:16:25Z dtikhonov $
+# $Id: User.pm 34 2009-04-10 01:45:19Z belg4mit $
#
# RT::Client::REST::User -- user object representation.
@@ -8,7 +8,7 @@
use warnings;
use vars qw($VERSION);
-$VERSION = '0.02';
+$VERSION = 0.03;
use Params::Validate qw(:types);
use RT::Client::REST 0.14;
@@ -41,7 +41,7 @@
=cut
sub _attributes {{
- id => {
+ id => {
validation => {
type => SCALAR,
},
@@ -54,42 +54,110 @@
},
},
- name => {
- validation => {
- type => SCALAR,
- },
- },
-
- password => {
- validation => {
- type => SCALAR,
- },
- },
-
+
+
+ priveleged => {
+ validation => {
+ type => SCALAR,
+ },
+ },
+ name => {
+ validation => {
+ type => SCALAR,
+ },
+ },
+ password => {
+ validation => {
+ type => SCALAR,
+ },
+ },
email_address => {
validation => {
type => SCALAR,
},
rest_name => 'EmailAddress',
},
-
real_name => {
validation => {
type => SCALAR,
},
rest_name => 'RealName',
},
-
gecos => {
validation => {
type => SCALAR,
},
},
-
comments => {
validation => {
type => SCALAR,
},
+ },
+
+
+
+ organization => {
+ validation => {
+ type => SCALAR,
+ },
+ },
+ address_one => {
+ validation => {
+ type => SCALAR,
+ },
+ rest_name => 'Address1',
+ },
+ address_two => {
+ validation => {
+ type => SCALAR,
+ },
+ rest_name => 'Address2',
+ },
+ city => {
+ validation => {
+ type => SCALAR,
+ },
+ },
+ state => {
+ validation => {
+ type => SCALAR,
+ },
+ },
+ zip => {
+ validation => {
+ type => SCALAR,
+ },
+ },
+ country => {
+ validation => {
+ type => SCALAR,
+ },
+ },
+
+
+ home_phone => {
+ validation => {
+ type => SCALAR,
+ },
+ rest_name => 'HomePhone',
+ },
+ work_phone => {
+ validation => {
+ type => SCALAR,
+ },
+ rest_name => 'WorkPhone',
+ },
+ cell_phone => {
+ validation => {
+ type => SCALAR,
+ },
+ rest_name => 'MobilePhone',
+ },
+ pager => {
+ validation => {
+ type => SCALAR,
+ },
+ rest_name => 'PagerPhone',
},
}}
@@ -112,13 +180,17 @@
User's password. Reading it will only give you a bunch of stars (what
else would you expect?).
+=item B<priveleged>
+
+Can the user have special rights?
+
=item B<email_address>
-E-mail address of the user.
+E-mail address of the user, EmailAddress.
=item B<real_name>
-Real name of the user.
+Real name of the user, RealName.
=item B<gecos>
@@ -127,6 +199,44 @@
=item B<comments>
Comments about this user.
+
+=item B<organization>
+
+=item B<address_one>
+
+First line of the street address, Address1.
+
+=item B<address_two>
+
+Second line of the street address, Address2.
+
+=item B<city>
+
+City segment of user's address.
+
+=item B<zip>
+
+ZIP or Postal code segment of user's address.
+
+=item B<country>
+
+Country segment of user's address.
+
+=item B<home_phone>
+
+User's home phone number, HomePhone.
+
+=item B<work_phone>
+
+User's work phone number, WorkPhone.
+
+=item B<cell_phone>
+
+User's cell phone number, MobilePhone.
+
+=item B<pager>
+
+User's pager number, PagerPhone.
=back
Modified: branches/upstream/librt-client-rest-perl/current/t/21-user.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librt-client-rest-perl/current/t/21-user.t?rev=54711&op=diff
==============================================================================
--- branches/upstream/librt-client-rest-perl/current/t/21-user.t (original)
+++ branches/upstream/librt-client-rest-perl/current/t/21-user.t Wed Mar 24 01:57:23 2010
@@ -1,15 +1,18 @@
use strict;
use warnings;
-use Test::More tests => 14;
+use Test::More tests => 26;
use Test::Exception;
use constant METHODS => (
- 'new', 'to_form', 'from_form', 'rt_type',
+ 'new', 'to_form', 'from_form',
+ 'rt_type', 'id',
- # attrubutes:
- 'id', 'name', 'password', 'real_name', 'email_address', 'gecos',
- 'comments',
+ # attributes:
+ 'name', 'password', 'real_name', 'gecos',
+ 'priveleged', 'email_address', 'comments', 'organization',
+ 'address_one', 'address_two', 'city', 'state', 'zip', 'country',
+ 'home_phone', 'work_phone', 'cell_phone', 'pager'
);
BEGIN {
More information about the Pkg-perl-cvs-commits
mailing list