[perl-URI-Title] Fix the live test failures (#1058734, rt#92091)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 15b8df0ebb2d8c5dcd12e5c3eac2e4f478c9b721
Author: Petr Šabata <contyk@xxxxxxxxxx>
Date:   Wed Jan 29 10:47:24 2014 +0100

    Fix the live test failures (#1058734, rt#92091)
    
    - Minor spec cleanup

 URI-Title-1.86-live-tests.patch |   28 ++++++++++++++++++++++++++++
 perl-URI-Title.spec             |   15 +++++++++++----
 2 files changed, 39 insertions(+), 4 deletions(-)
---
diff --git a/URI-Title-1.86-live-tests.patch b/URI-Title-1.86-live-tests.patch
new file mode 100644
index 0000000..5222936
--- /dev/null
+++ b/URI-Title-1.86-live-tests.patch
@@ -0,0 +1,28 @@
+diff --git a/lib/URI/Title/HTML.pm b/lib/URI/Title/HTML.pm
+index 74c74b4..576cc1a 100644
+--- a/lib/URI/Title/HTML.pm
++++ b/lib/URI/Title/HTML.pm
+@@ -60,7 +60,7 @@ sub title {
+     $title = "paste - ";
+ 
+   } elsif ($url =~ /twitter.com\/(.*?)\/status(es)?\/\d+/i) {
+-    $special_case = '<p class="js-tweet-text tweet-text ">([^\<]+)';
++    $special_case = '<p class="js-tweet-text tweet-text">([^\<]+)';
+     $title = "twitter - ";
+ 
+   } elsif ($url =~ /independent\.co\.uk/i) {
+diff --git a/t/html.t b/t/html.t
+index 585f112..8293bc2 100644
+--- a/t/html.t
++++ b/t/html.t
+@@ -24,8 +24,8 @@ if ($s) {
+ #  "got title for jerakeen.org");
+ 
+ ok(
+-  title('http://theregister.co.uk/content/6/34549.html') =~ /lack of technology may harm your prospects/,
+-  "got register title");
++  title('http://yro.slashdot.org/story/14/01/28/1731201/why-does-facebook-need-to-read-my-text-messages') =~ /Why Does Facebook Need To Read My Text Messages\? - Slashdot/,
++  "got slashdot title");
+ 
+ ok(
+   title('http://twitter.com/al3x/status/1039647490') eq 'twitter - Arianna Huffington: not a good saleswoman for blogging.',
diff --git a/perl-URI-Title.spec b/perl-URI-Title.spec
index 6234b7d..76d73dd 100644
--- a/perl-URI-Title.spec
+++ b/perl-URI-Title.spec
@@ -1,12 +1,13 @@
 Name:           perl-URI-Title
 Version:        1.86
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Get the titles of things on the web in a sensible way
 # Mentioned in URI::Title POD
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/URI-Title/
 Source0:        http://www.cpan.org/authors/id/T/TO/TOMI/URI-Title-%{version}.tar.gz
+Patch0:         URI-Title-1.86-live-tests.patch
 BuildArch:      noarch
 BuildRequires:  perl(base)
 BuildRequires:  perl(lib)
@@ -19,13 +20,15 @@ BuildRequires:  perl(HTML::Entities)
 BuildRequires:  perl(HTTP::Request)
 BuildRequires:  perl(HTTP::Response)
 BuildRequires:  perl(Image::Size)
+# Needed for Twitter in live tests
+BuildRequires:  perl(LWP::Protocol::https)
 BuildRequires:  perl(LWP::UserAgent)
 BuildRequires:  perl(Module::Pluggable) >= 1.2
 BuildRequires:  perl(MP3::Info)
 BuildRequires:  perl(Test::More)
 Requires:       perl(File::Type) >= 0.22
 Requires:       perl(Module::Pluggable) >= 1.2
-Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires:       perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
 
 %global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(File::Type\\)
 %global __requires_exclude %__requires_exclude|^perl\\(Module::Pluggable\\)
@@ -46,15 +49,15 @@ So, let's solve these issues once.
 
 %prep
 %setup -q -n URI-Title-%{version}
+%patch0 -p1
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor
 make %{?_smp_mflags}
 
 %install
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
+make pure_install DESTDIR=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} \;
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
 %{_fixperms} %{buildroot}/*
 
 %check
@@ -66,6 +69,10 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Tue Jan 28 2014 Petr Šabata <contyk@xxxxxxxxxx> - 1.86-7
+- Fix the live test failures (#1058734, rt#92091)
+- Minor spec cleanup
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.86-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux