-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to override number of entries for a specific feed
- Loading branch information
Showing
7 changed files
with
88 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use strict; | ||
use warnings; | ||
use Test::More; | ||
use FindBin qw($Bin); | ||
use Perlanet::Simple; | ||
|
||
chdir $Bin; | ||
|
||
my @tests = ({ | ||
rc => '5', | ||
count => 5, | ||
}, { | ||
rc => 'all', | ||
count => 10, | ||
}); | ||
|
||
for (@tests) { | ||
my $p = Perlanet::Simple->new_with_config(configfile => "$_->{rc}entriesrc"); | ||
|
||
my $feeds = $p->fetch_feeds($p->feeds); | ||
my $selected = $p->select_entries($feeds); | ||
is(@$selected, $_->{count}, "Override to get $_->{rc} selected entries"); | ||
} | ||
|
||
done_testing(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
title: planet test | ||
description: Testing stuff | ||
url: http://theplanetarium.org/ | ||
self_link: http://theplanetarium.org/ | ||
agent: Testing Perlanet | ||
entries_per_feed: 1 | ||
author: | ||
name: Dave Cross | ||
email: dave@dave.org.uk | ||
max_entries: 20 | ||
page: | ||
file: index.html | ||
template: index.tt | ||
feed: | ||
file: rss.xml | ||
format: Atom | ||
feeds: | ||
- url: file:data/davblog.xml | ||
title: davblog | ||
web: http://blogs.dave.org.uk/ | ||
max_entries: 5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
title: planet test | ||
description: Testing stuff | ||
url: http://theplanetarium.org/ | ||
self_link: http://theplanetarium.org/ | ||
agent: Testing Perlanet | ||
entries_per_feed: 1 | ||
author: | ||
name: Dave Cross | ||
email: dave@dave.org.uk | ||
max_entries: 20 | ||
page: | ||
file: index.html | ||
template: index.tt | ||
feed: | ||
file: rss.xml | ||
format: Atom | ||
feeds: | ||
- url: file:data/davblog.xml | ||
title: davblog | ||
web: http://blogs.dave.org.uk/ | ||
max_entries: 0 | ||
|