This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository libwebservice-cia-perl.

commit f726ec43d599fe78496b6945a155b632357e4458
Author: Axel Beckert <a...@deuxchevaux.org>
Date:   Mon Jun 2 01:44:15 2014 +0200

    Add patch to update data source URL and data matching regexp
    
    Closes: #744779
    
    Patch also fixes the simple test cases in upstream's test suite.
    
    Still not fixed: Test-suite example data in the __DATA__ section of
    t/lib/WCUA.pm needs to be updated, but is likely non-free, so the
    orig.tar.gz probably needs to get repacked.
---
 debian/changelog                              |  5 ++
 debian/patches/fix-urls-and-html-parser.patch | 75 +++++++++++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 81 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index a6690c7..0794163 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 libwebservice-cia-perl (1.4-2) UNRELEASED; urgency=low
 
+  TODO: Repack orig.tar.gz without the likely non-free __DATA__ section of
+    t/lib/WCUA.pm
+
   [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
@@ -26,6 +29,8 @@ libwebservice-cia-perl (1.4-2) UNRELEASED; urgency=low
 
   [ Axel Beckert ]
   * Switch to source format "3.0 (quilt)"
+  * Add patch to update data source URL and data matching regular
+    expression. (Closes: #744779)
 
  -- gregor herrmann <gre...@debian.org>  Sun, 16 Nov 2008 20:48:55 +0100
 
diff --git a/debian/patches/fix-urls-and-html-parser.patch 
b/debian/patches/fix-urls-and-html-parser.patch
new file mode 100644
index 0000000..8c12bf0
--- /dev/null
+++ b/debian/patches/fix-urls-and-html-parser.patch
@@ -0,0 +1,75 @@
+Index: libwebservice-cia-perl/lib/WebService/CIA/Parser.pm
+===================================================================
+--- libwebservice-cia-perl.orig/lib/WebService/CIA/Parser.pm   2014-06-02 
01:48:32.000000000 +0200
++++ libwebservice-cia-perl/lib/WebService/CIA/Parser.pm        2014-06-02 
02:03:23.000000000 +0200
+@@ -24,20 +24,20 @@
+     my ($self, $cc, $html) = @_;
+ 
+     my $data = {
+-        'URL - Flag'  => $WebService::CIA::base_url . 'flags/' . $cc . 
'-flag.gif',
+-        'URL - Map'   => $WebService::CIA::base_url . 'maps/'  . $cc . 
'-map.gif',
++        'URL - Flag'  => $WebService::CIA::base_url . 'graphics/flags/large/' 
. $cc . '-lgflag.gif',
++        'URL - Map'   => $WebService::CIA::base_url . 'graphics/maps/'  . $cc 
. '-map.gif',
+         'URL'         => $WebService::CIA::base_url . 'geos/'  . $cc . 
'.html',
+-        'URL - Print' => $WebService::CIA::base_url . 'print/'  . $cc . 
'.html'
++        'URL - Print' => $WebService::CIA::base_url . 'geos/countrytemplate_' 
 . $cc . '.html'
+     };
+     while ($html =~ m#
+-        <td[^>]+ class="FieldLabel">.*?
+-            <div.*?>
+-                (.+?):
+-            .*?</div>.*?
+-        </td>.*?
+-        <td[^>]+>
+-            (.*?)
+-        (</td>|</table>)
++        <div\s+class="category".*?>\s*
++          (?:<a\s[^>]+?>)?
++          (.+?)
++          (?::\s*</a>|</a>:|:)\s*
++        </div>.*?
++        <div\sclass="category_data">
++          (.*?)
++        </div>
+     #xsg) {
+         my $field = $1;
+         my $value = $2;
+Index: libwebservice-cia-perl/lib/WebService/CIA/Source/Web.pm
+===================================================================
+--- libwebservice-cia-perl.orig/lib/WebService/CIA/Source/Web.pm       
2014-06-02 01:48:32.000000000 +0200
++++ libwebservice-cia-perl/lib/WebService/CIA/Source/Web.pm    2014-06-02 
01:49:56.000000000 +0200
+@@ -74,7 +74,7 @@
+ 
+     my $self = shift;
+     my $cc = shift;
+-    my $response = $self->ua->get($WebService::CIA::base_url . 
"print/$cc.html");
++    my $response = $self->ua->get($WebService::CIA::base_url . 
"geos/countrytemplate_$cc.html");
+     $self->last_response( $response );
+     if ($response->is_success) {
+         my $data = $self->parser->parse($cc, $response->content);
+Index: libwebservice-cia-perl/t/webservice-cia-parser.t
+===================================================================
+--- libwebservice-cia-perl.orig/t/webservice-cia-parser.t      2013-08-29 
17:07:42.000000000 +0200
++++ libwebservice-cia-perl/t/webservice-cia-parser.t   2014-06-02 
01:56:22.000000000 +0200
+@@ -13,12 +13,16 @@
+ ok( $parser->isa('WebService::CIA::Parser'), 'new() returns a 
WebService::CIA::Parser object' );
+ 
+ my $data = $parser->parse('zz', q(
+-                        <td width="20%" valign="top" class="FieldLabel">
+-                                <div align="right">Test:</div>
+-                        </td>
+-                        <td valign="top" bgcolor="#FFFFFF" width="80%">
+-                                Wombat
++                        <tr class="eur_light">
++                        <td width="450" height="20">
++                        <div class="category" style="padding-left:5px;" 
id="field">
++                        <a href="something" title="Notes and Definitions: 
Test"> Test:</a>
++                        </div>
+                         </td>
++                        </tr>
++                        <tr height="22">
++                        <td colspan="2" id="data">
++                        <div class="category_data">Wombat</div>
+ ));
+ 
+ #4
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7a3633b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-urls-and-html-parser.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libwebservice-cia-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to