r71280 - in /trunk/libgravatar-url-perl: ./ debian/ debian/source/ lib/Gravatar/ lib/Libravatar/ lib/Unicornify/ t/

ansgar at users.alioth.debian.org ansgar at users.alioth.debian.org
Sat Mar 12 17:39:22 UTC 2011


Author: ansgar
Date: Sat Mar 12 17:39:14 2011
New Revision: 71280

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71280
Log:
* New upstream release.
* Add (build-)dep on libnet-dns-perl for Net::DNS::Resolver.
* Drop build-dep on perl (>= 5.10) | libmodule-build-perl (>= 0.2808) as
  perl 5.10 is already included in oldstable (lenny).
* debian/copyright: Update for new upstream release; refer to GPL-1; refer
  to "Debian systems" instead of "Debian GNU/Linux systems".
* Bump Standards-Version to 3.9.1.

Added:
    trunk/libgravatar-url-perl/debian/source/local-options
    trunk/libgravatar-url-perl/lib/Libravatar/
      - copied from r71279, branches/upstream/libgravatar-url-perl/current/lib/Libravatar/
    trunk/libgravatar-url-perl/t/libravatar.t
      - copied unchanged from r71279, branches/upstream/libgravatar-url-perl/current/t/libravatar.t
Removed:
    trunk/libgravatar-url-perl/SIGNATURE
Modified:
    trunk/libgravatar-url-perl/Build.PL
    trunk/libgravatar-url-perl/Changes
    trunk/libgravatar-url-perl/MANIFEST
    trunk/libgravatar-url-perl/MANIFEST.SKIP
    trunk/libgravatar-url-perl/META.yml
    trunk/libgravatar-url-perl/debian/changelog
    trunk/libgravatar-url-perl/debian/control
    trunk/libgravatar-url-perl/debian/copyright
    trunk/libgravatar-url-perl/lib/Gravatar/URL.pm
    trunk/libgravatar-url-perl/lib/Unicornify/URL.pm
    trunk/libgravatar-url-perl/t/url.t

Modified: trunk/libgravatar-url-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/Build.PL?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/Build.PL (original)
+++ trunk/libgravatar-url-perl/Build.PL Sat Mar 12 17:39:14 2011
@@ -30,11 +30,12 @@
     },
 
     requires             => {
-        'URI::Escape'       => 0,
-        'Digest::MD5'       => 0,
-        'Carp'              => 0,
-        perl                => '5.6.0',
-        'parent'            => 0,
+        'Net::DNS::Resolver' => 0,
+        'URI::Escape'        => 0,
+        'Digest::MD5'        => 0,
+        'Carp'               => 0,
+        perl                 => '5.6.0',
+        'parent'             => 0,
     },
 );
 

Modified: trunk/libgravatar-url-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/Changes?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/Changes (original)
+++ trunk/libgravatar-url-perl/Changes Sat Mar 12 17:39:14 2011
@@ -1,3 +1,16 @@
+1.03  Sat Mar 12 18:17:03 NZDT 2011
+    New Features
+    * Added Libravatar::URL for federated avatar hosting with a Gravatar
+      fallback. (http://www.libravatar.org)
+    * Add new optional 'https' parameter to deliver avatars over HTTPS.
+
+    New Docs
+    * Updated the defaults with the new "retro" and mystery man values.
+    * Document the https base URL now available.
+
+    New Co-Maintainer (Francois Marier)
+
+
 1.02  Thu Apr  1 15:36:52 PDT 2010
     New Features
     * Added Unicornify::URL for generated unicorn avatars, OMG!!!

Modified: trunk/libgravatar-url-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/MANIFEST?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/MANIFEST (original)
+++ trunk/libgravatar-url-perl/MANIFEST Sat Mar 12 17:39:14 2011
@@ -1,13 +1,14 @@
 Build.PL
 Changes
 lib/Gravatar/URL.pm
+lib/Libravatar/URL.pm
 lib/Unicornify/URL.pm
-MANIFEST
+MANIFEST			This list of files
 MANIFEST.SKIP
 META.yml
 t/deprecated.t
 t/error.t
 t/id.t
+t/libravatar.t
 t/unicornify.t
 t/url.t
-SIGNATURE    Added here by Module::Build

Modified: trunk/libgravatar-url-perl/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/MANIFEST.SKIP?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/MANIFEST.SKIP (original)
+++ trunk/libgravatar-url-perl/MANIFEST.SKIP Sat Mar 12 17:39:14 2011
@@ -1,4 +1,5 @@
-#!start included /usr/local/lib/perl5/5.10.1/ExtUtils/MANIFEST.SKIP
+
+#!start included /Users/schwern/perl5/perlbrew/perls/perl-v5.12.2/lib/5.12.2/ExtUtils/MANIFEST.SKIP
 # Avoid version control files.
 \bRCS\b
 \bCVS\b
@@ -54,5 +55,6 @@
  
 # Avoid MYMETA files
 ^MYMETA\.
-#!end included /usr/local/lib/perl5/5.10.1/ExtUtils/MANIFEST.SKIP
+#!end included /Users/schwern/perl5/perlbrew/perls/perl-v5.12.2/lib/5.12.2/ExtUtils/MANIFEST.SKIP
 
+

Modified: trunk/libgravatar-url-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/META.yml?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/META.yml (original)
+++ trunk/libgravatar-url-perl/META.yml Sat Mar 12 17:39:14 2011
@@ -1,34 +1,38 @@
 ---
-abstract: 'Make URLs for Gravatars from an email address'
+name: Gravatar-URL
+version: 1.03
 author: []
-build_requires:
-  Test::More: 0.4
-  Test::Warn: 0.11
-configure_requires:
-  Module::Build: 0.2808
-generated_by: 'Module::Build version 0.3603'
-keywords:
-  - Gravatar
+abstract: Make URLs for Gravatars from an email address
 license: perl
-meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
-name: Gravatar-URL
-provides:
-  Gravatar::URL:
-    file: lib/Gravatar/URL.pm
-    version: 1.02
-  Unicornify::URL:
-    file: lib/Unicornify/URL.pm
-    version: 1.02
-requires:
-  Carp: 0
-  Digest::MD5: 0
-  URI::Escape: 0
-  parent: 0
-  perl: v5.6.0
 resources:
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Gravatar-URL
   license: http://dev.perl.org/licenses/
   repository: http://github.com/schwern/gravatar-url/tree/master
-version: 1.02
+build_requires:
+  Test::More: 0.4
+  Test::Warn: 0.11
+requires:
+  Carp: 0
+  Digest::MD5: 0
+  Net::DNS::Resolver: 0
+  URI::Escape: 0
+  parent: 0
+  perl: v5.6.0
+configure_requires:
+  Module::Build: 0.2808
+provides:
+  Gravatar::URL:
+    file: lib/Gravatar/URL.pm
+    version: 1.03
+  Libravatar::URL:
+    file: lib/Libravatar/URL.pm
+    version: 1.03
+  Unicornify::URL:
+    file: lib/Unicornify/URL.pm
+    version: 1.03
+generated_by: Module::Build version 0.340201
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+keywords:
+  - Gravatar

Modified: trunk/libgravatar-url-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/debian/changelog?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/debian/changelog (original)
+++ trunk/libgravatar-url-perl/debian/changelog Sat Mar 12 17:39:14 2011
@@ -1,8 +1,15 @@
-libgravatar-url-perl (1.02-2) UNRELEASED; urgency=low
+libgravatar-url-perl (1.03-1) unstable; urgency=low
 
+  * New upstream release.
+  * Add (build-)dep on libnet-dns-perl for Net::DNS::Resolver.
+  * Drop build-dep on perl (>= 5.10) | libmodule-build-perl (>= 0.2808) as
+    perl 5.10 is already included in oldstable (lenny).
+  * debian/copyright: Update for new upstream release; refer to GPL-1; refer
+    to "Debian systems" instead of "Debian GNU/Linux systems".
+  * Bump Standards-Version to 3.9.1.
   * Update my email address.
 
- -- Ansgar Burchardt <ansgar at debian.org>  Mon, 01 Nov 2010 11:16:48 +0100
+ -- Ansgar Burchardt <ansgar at debian.org>  Sat, 12 Mar 2011 18:34:41 +0100
 
 libgravatar-url-perl (1.02-1) unstable; urgency=low
 

Modified: trunk/libgravatar-url-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/debian/control?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/debian/control (original)
+++ trunk/libgravatar-url-perl/debian/control Sat Mar 12 17:39:14 2011
@@ -1,18 +1,18 @@
 Source: libgravatar-url-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 7), perl (>= 5.10) | libmodule-build-perl (>= 0.2808)
-Build-Depends-Indep: libtest-warn-perl (>= 0.11), liburi-perl, perl
+Build-Depends: debhelper (>= 7), perl
+Build-Depends-Indep: libnet-dns-perl, libtest-warn-perl (>= 0.11), liburi-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Ryan Niebur <ryan at debian.org>, Ansgar Burchardt <ansgar at debian.org>
-Standards-Version: 3.8.4
+Standards-Version: 3.9.1
 Homepage: http://search.cpan.org/dist/Gravatar-URL/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libgravatar-url-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libgravatar-url-perl/
 
 Package: libgravatar-url-perl
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, liburi-perl
+Depends: ${misc:Depends}, ${perl:Depends}, libnet-dns-perl, liburi-perl
 Description: Perl interface to make URLs for Gravatars from an email address
  A Gravatar is a Globally Recognized Avatar for a given email address. This
  allows you to have a global picture associated with your email address. You

Modified: trunk/libgravatar-url-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/debian/copyright?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/debian/copyright (original)
+++ trunk/libgravatar-url-perl/debian/copyright Sat Mar 12 17:39:14 2011
@@ -3,7 +3,9 @@
 Source: http://search.cpan.org/dist/Gravatar-URL/
 Name: Gravatar-URL
 
-Copyright: 2007-2009, Michael G Schwern <schwern at pobox.com>
+Copyright:
+ 2007-2009, Michael G Schwern <schwern at pobox.com>
+ 2011,      Francois Marier <fmarier at gmail.com>
 License: Artistic or GPL-1+
 
 Files: debian/*
@@ -11,15 +13,17 @@
 License: Artistic or GPL-1+
 
 License: Artistic
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the Artistic License, which comes with Perl.
-    On Debian GNU/Linux systems, the complete text of the Artistic License
-    can be found in `/usr/share/common-licenses/Artistic'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian systems, the complete text of the Artistic License can be
+ found in `/usr/share/common-licenses/Artistic'
 
 License: GPL-1+
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 1, or (at your option)
-    any later version.
-    On Debian GNU/Linux systems, the complete text of the GNU General
-    Public License can be found in `/usr/share/common-licenses/GPL'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ .
+ On Debian systems, the complete text of version 1 of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-1'.

Added: trunk/libgravatar-url-perl/debian/source/local-options
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/debian/source/local-options?rev=71280&op=file
==============================================================================
--- trunk/libgravatar-url-perl/debian/source/local-options (added)
+++ trunk/libgravatar-url-perl/debian/source/local-options Sat Mar 12 17:39:14 2011
@@ -1,0 +1,2 @@
+abort-on-upstream-changes
+unapply-patches

Modified: trunk/libgravatar-url-perl/lib/Gravatar/URL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/lib/Gravatar/URL.pm?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/lib/Gravatar/URL.pm (original)
+++ trunk/libgravatar-url-perl/lib/Gravatar/URL.pm Sat Mar 12 17:39:14 2011
@@ -7,7 +7,7 @@
 use Digest::MD5 qw(md5_hex);
 use Carp;
 
-our $VERSION = '1.02';
+our $VERSION = '1.03';
 
 use parent 'Exporter';
 our @EXPORT = qw(
@@ -15,8 +15,8 @@
     gravatar_url
 );    
 
-my $Gravatar_Base = "http://www.gravatar.com/avatar/";
-
+my $Gravatar_Http_Base  = "http://www.gravatar.com/avatar/";
+my $Gravatar_Https_Base = "https://secure.gravatar.com/avatar/";
 
 =head1 NAME
 
@@ -85,9 +85,10 @@
 Relative URLs will be relative to the base (ie. gravatar.com), not your web site.
 
 Gravatar defines special values that you may use as a default to
-produce dynamic default images. These are "identicon", "monsterid" and
-"wavatar".  "404" will cause the URL to return an HTTP 404 "Not Found"
-error instead.  See L<http://en.gravatar.com/site/implement/url> for
+produce dynamic default images. These are "identicon", "monsterid",
+"wavatar" and "retro".  "404" will cause the URL to return an HTTP 404 "Not Found"
+error instead whereas "mm" will display the same "mystery man" image for all
+missing people.  See L<http://en.gravatar.com/site/implement/url> for
 more info.
 
 If omitted, Gravatar will serve up their default image, the blue G.
@@ -107,7 +108,8 @@
 
 This is the URL of the location of the Gravatar server you wish to
 grab Gravatars from.  Defaults to
-L<http://www.gravatar.com/avatar/">.
+L<http://www.gravatar.com/avatar/"> for HTTP and
+L<https://secure.gravatar.com/avatar/> for HTTPS.
 
 =head4 short_keys
 
@@ -116,11 +118,22 @@
 
 short_keys defaults to true.
 
+=head4 https
+
+If true, serve avatars over HTTPS instead of HTTP.
+
+You should select this option if your site is served over HTTPS to
+avoid browser warnings about the presence of insecure content.
+
+https defaults to false.
+
 =cut
 
 my %defaults = (
     short_keys  => 1,
-    base        => $Gravatar_Base
+    base_http   => $Gravatar_Http_Base,
+    base_https  => $Gravatar_Https_Base,
+    https       => 0,
 );
 
 sub gravatar_url {
@@ -179,8 +192,13 @@
     my($hash, $defaults) = @_;
 
     for my $key (keys %$defaults) {
+        next if 'base_http' eq $key or 'base_https' eq $key;
         next if exists $hash->{$key};
         $hash->{$key} = $defaults->{$key};
+    }
+
+    if (not exists $hash->{'base'}) {
+        $hash->{'base'} = $hash->{'https'} ? $defaults->{base_https} : $defaults->{base_http};
     }
 
     return;
@@ -210,11 +228,12 @@
 =head1 LICENSE
 
 Copyright 2007 - 2009, Michael G Schwern <schwern at pobox.com>.
+Copyright 2011, Francois Marier <fmarier at gmail.com>.
 
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
 
-See F<http://www.perl.com/perl/misc/Artistic.html>
+See F<http://dev.perl.org/licenses/artistic.html>
 
 
 =head1 SEE ALSO

Modified: trunk/libgravatar-url-perl/lib/Unicornify/URL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/lib/Unicornify/URL.pm?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/lib/Unicornify/URL.pm (original)
+++ trunk/libgravatar-url-perl/lib/Unicornify/URL.pm Sat Mar 12 17:39:14 2011
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.02';
+our $VERSION = '1.03';
 
 use Gravatar::URL qw(gravatar_url);
 

Modified: trunk/libgravatar-url-perl/t/url.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgravatar-url-perl/t/url.t?rev=71280&op=diff
==============================================================================
--- trunk/libgravatar-url-perl/t/url.t (original)
+++ trunk/libgravatar-url-perl/t/url.t Sat Mar 12 17:39:14 2011
@@ -2,12 +2,30 @@
 
 use Test::More 'no_plan';
 
-BEGIN { use_ok 'Gravatar::URL'; }
+BEGIN { use_ok 'Gravatar::URL';
+        use_ok 'Libravatar::URL'; }
 
-{
+my %interfaces = (
+    libravatar => {
+        func => \&libravatar_url,
+        base => 'http://cdn.libravatar.org/avatar',
+        https_base => 'https://seccdn.libravatar.org/avatar',
+    },
+    gravatar => {
+        func => \&gravatar_url,
+        base => 'http://www.gravatar.com/avatar',
+        https_base => 'https://secure.gravatar.com/avatar',
+    },
+);
+
+for my $interface_name (keys %interfaces) {
+    my $interface = $interfaces{$interface_name};
+    my $base = $interface->{base};
+    my $https_base = $interface->{https_base};
+    my $func = $interface->{func};
+
     my $id = 'a60fc0828e808b9a6a9d50f1792240c8';
     my $email = 'whatever at wherever.whichever';
-    my $base = 'http://www.gravatar.com/avatar';
 
     my @tests = (
         [{ email => $email },
@@ -19,7 +37,26 @@
         ],
         
         [{ email => $email,
+           https => 1
+         },
+         "$https_base/$id",
+        ],
+
+        [{ email => $email,
+           https => 0
+         },
+         "$base/$id",
+        ],
+
+        [{ email => $email,
            base  => 'http://example.com/gravatar'
+         },
+         "http://example.com/gravatar/$id",
+        ],
+
+        [{ email => $email,
+           base  => 'http://example.com/gravatar',
+           https => 1
          },
          "http://example.com/gravatar/$id",
         ],
@@ -87,7 +124,7 @@
     );
 
     # Add tests for the special defaults.
-    for my $special ("identicon", "monsterid", "wavatar") {
+    for my $special ("identicon", "mm", "monsterid", "retro", "wavatar") {
         my $test = [{ default => $special,
                       email   => $email,
                     },
@@ -98,7 +135,6 @@
 
     for my $test (@tests) {
         my($args, $url) = @$test;
-        is gravatar_url( %$args ), $url, join ", ", keys %$args;
+        is &$func( %$args ), $url, join ", ", keys %$args;
     }
 }
-




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