dev-perl/Feed-Find: Drop old versions

Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
Matt Turner
2024-03-14 12:43:18 -04:00
parent 6f220cc547
commit a14b132d0a
4 changed files with 0 additions and 202 deletions

View File

@@ -1,30 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DIST_AUTHOR=DAVECROSS
DIST_VERSION=0.12
inherit perl-module
DESCRIPTION="Syndication feed auto-discovery"
SLOT="0"
KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv ~x86"
RDEPEND="
dev-perl/Class-ErrorHandler
dev-perl/HTML-Parser
dev-perl/libwww-perl
dev-perl/URI
"
BDEPEND="${RDEPEND}
>=virtual/perl-ExtUtils-MakeMaker-6.590.0
test? (
dev-perl/Test-LWP-UserAgent
)
"
PATCHES=(
"${FILESDIR}/${PN}-0.07-no-dot-inc.patch"
)

View File

@@ -1,61 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DIST_AUTHOR=BTROTT
DIST_VERSION=0.07
inherit perl-module
DESCRIPTION="Syndication feed auto-discovery"
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-perl/Class-ErrorHandler
dev-perl/HTML-Parser
dev-perl/libwww-perl
dev-perl/URI
"
BDEPEND="${RDEPEND}
test? (
dev-perl/Test-Base
dev-perl/CGI-Application-Server
dev-perl/Test-HTTP-Server-Simple
)
"
PATCHES=(
"${FILESDIR}/${PN}-0.07-no-dot-inc.patch"
"${FILESDIR}/${PN}-0.07-local-network.patch"
)
PERL_RM_FILES=(
inc/Spiffy.pm
inc/Test/Base.pm
inc/Test/Base/Filter.pm
inc/Test/Builder.pm
inc/Test/Builder/Module.pm
inc/Test/More.pm
)
src_test() {
local MODULES=(
"Feed::Find ${DIST_VERSION}"
)
local failed=()
for dep in "${MODULES[@]}"; do
ebegin "Compile testing ${dep}"
perl -Mblib="${S}" -M"${dep} ()" -e1
eend $? || failed+=( "$dep" )
done
if [[ ${failed[@]} ]]; then
echo
eerror "One or more modules failed compile:";
for dep in "${failed[@]}"; do
eerror " ${dep}"
done
die "Failing due to module compilation errors";
fi
perl-module_src_test
}

View File

@@ -1,3 +1 @@
DIST Feed-Find-0.07.tar.gz 46380 BLAKE2B 9e2c7e446801decaf0f59cd1399b3a92195fbc174b3e65188367416167c9bf188402d7d995673602492cb0fe4c473dfd21848b7d00956d4f0ee66ccc037bccb2 SHA512 5ae62c0d5380d00bfae9f94d1d9ab7d024f3394ca7865d7a086668d84b0e4dfb18095468b966f7afd03f3b766f02822e9b19cfddf0f95ad7c0c3908e5a5806e9
DIST Feed-Find-0.12.tar.gz 47396 BLAKE2B 4d41247ea6c592727a4db85662582e49a5744f3849bfa646758a6991963fcf20554b595847aa624cae605018826fa6bd354ff34ec64fc0d6eba84b4723e34e79 SHA512 7449563b99b85e2db8ec6662fe1b558bb78c591a205f58d0df6a3f1e786ffbece84150afb96fc71105a7de60bc82b68cfa1402c4d73d677773d4e0a687b66e97
DIST Feed-Find-0.13.tar.gz 47483 BLAKE2B 9f913b087dfb8085a87eed90382fb204e4a39621f3f2f4c022c5719761e21a25fd52d1fb0a7a51364d484263eb2c17ea137bbd653171a3236c8b56aa270c0126 SHA512 436438c361a7c228af8c5d31200f75b3eab8dded20040d9cd019384df28bd2348ca8c2f8f6cc3ae4b6dee90afba7c8ed911016fd4f8da46cfe8ffccf52eecd18

View File

@@ -1,109 +0,0 @@
From bea092aae37300053b971a12b6e37b6104df41f9 Mon Sep 17 00:00:00 2001
From: Nikolay Mishin <mi@ya.ru>
Date: Thu, 22 Oct 2015 02:59:04 +0400
Subject: Rework 01-find.t
Rework test to not rely on external web resources by mocking the setup
with a HTTP::Server::Simple derived webserver
Bug: https://github.com/btrott/Feed-Find/pull/2
Signed-off-by: Gary Greene <greeneg@tolharadys.net>
Signed-off-by: Kent Fredric <kentnl@gentoo.org>
---
t/01-find.t | 57 ++++++++++++++++++++++++++++++++------
t/htdocs/anchors-only.html | 9 ++++++
2 files changed, 58 insertions(+), 8 deletions(-)
create mode 100644 t/htdocs/anchors-only.html
diff --git a/t/01-find.t b/t/01-find.t
index 58549b5..22d0048 100644
--- a/t/01-find.t
+++ b/t/01-find.t
@@ -1,20 +1,61 @@
+use CGI::Application::Server;
+use Test::HTTP::Server::Simple;
+
+package My::WebServer {
+ use base qw/Test::HTTP::Server::Simple CGI::Application::Server/;
+}
+
+package main;
+
use strict;
-use Test::More tests => 4;
+use Test::More tests => 5;
use Feed::Find;
use LWP::UserAgent;
-use constant BASE => 'http://stupidfool.org/perl/feeds/';
+my $port = $ENV{CGI_APP_SERVER_TEST_PORT} || 40000 + int(rand(10000));
+
+my $s = My::WebServer->new($port);
+$s->document_root('./t/htdocs');
+
+my $url_root = $s->started_ok("start up my web server");
+
+# generate our anchors-only.html file to get the URL correct in the links
+my $anchor_html = <<"END";
+<html>
+ <head>
+ <link rel="alternate" title="my feed"
+ href="$url_root/ok.xml" type="application/xml" />
+ <head>
+ <body>
+ <a href="$url_root/ok.xml" type="application/xml">my feed</a>
+ </body>
+</html>
+END
-my(@feeds);
+open(my $fh, ">./t/htdocs/anchors-only.html") or
+ die "Cannot open file\n";
+print $fh <<"END";
+<html>
+ <head>
+ <link rel="alternate" title="my feed"
+ href="$url_root/ok.xml" type="application/xml" />
+ <head>
+ <body>
+ <a href="$url_root/ok.xml" type="application/xml">my feed</a>
+ </body>
+</html>
+END
+close $fh;
-@feeds = Feed::Find->find(BASE . 'anchors-only.html');
+my @feeds = ();
+@feeds = Feed::Find->find("$url_root/anchors-only.html");
is(scalar @feeds, 1);
-is($feeds[0], BASE . 'ok.xml');
+is($feeds[0], "$url_root/ok.xml");
my $ua = LWP::UserAgent->new;
$ua->env_proxy;
-my $req = HTTP::Request->new(GET => BASE . 'anchors-only.html');
+my $req = HTTP::Request->new(GET => "$url_root/anchors-only.html");
my $res = $ua->request($req);
-@feeds = Feed::Find->find_in_html(\$res->content, BASE . 'anchors-only.html');
+@feeds = Feed::Find->find_in_html(\$res->content, "$url_root/anchors-only.html");
is(scalar @feeds, 1);
-is($feeds[0], BASE . 'ok.xml');
+is($feeds[0], "$url_root/ok.xml");
diff --git a/t/htdocs/anchors-only.html b/t/htdocs/anchors-only.html
new file mode 100644
index 0000000..79f1df8
--- /dev/null
+++ b/t/htdocs/anchors-only.html
@@ -0,0 +1,9 @@
+<html>
+ <head>
+ <link rel="alternate" title="my feed"
+ href="http://localhost:45578/ok.xml" type="application/xml" />
+ <head>
+ <body>
+ <a href="http://localhost:45578/ok.xml" type="application/xml">my feed</a>
+ </body>
+</html>
--
2.28.0