Changeset 206 for cgi-wiki-plugin-rss-reader
- Timestamp:
- 10/21/04 19:53:13 (7 years ago)
- Location:
- cgi-wiki-plugin-rss-reader/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
cgi-wiki-plugin-rss-reader/trunk/CHANGES
r202 r206 1 2004-10-21: 1.4 2 * Add descriptions to RSS items as per request from Kake Pugh. 3 1 4 2004-06-03: 1.3 2 5 * Fixed a bug with handling of RSS 2.0 GUIDs that was spotted by -
cgi-wiki-plugin-rss-reader/trunk/lib/CGI/Wiki/Plugin/RSS/Reader.pm
r202 r206 5 5 use vars qw( $VERSION @ISA ); 6 6 7 $VERSION = '1. 3';7 $VERSION = '1.4'; 8 8 @ISA = qw(CGI::Wiki::Plugin); 9 9 … … 105 105 106 106 push @rss_items, { 107 title => $_->{title}, 108 link => $link 107 title => $_->{title}, 108 link => $link, 109 description => $_->{description}, 109 110 }; 110 111 } … … 156 157 157 158 C<retrieve> will return an array of hashes, one for each item in the RSS 158 feed. The hashes contain t wo items, C<title> and C<link>.159 feed. The hashes contain three items, C<title>, C<link>, and C<description>. 159 160 160 161 If the URL or file you specified cannot be retrieved/read, C<retrieve> will -
cgi-wiki-plugin-rss-reader/trunk/t/rss.t
r202 r206 26 26 <title>Example item 1</title> 27 27 <link>http://example.com/1.html</link> 28 <description>The first example.</description> 28 29 </item> 29 30 <item> 30 31 <title>Example item 2</title> 31 32 <link>http://example.com/2.html</link> 33 <description>The second example.</description> 32 34 </item> 33 35 <item> 34 36 <title>Example item 3</title> 35 37 <link>http://example.com/3.html</link> 38 <description>The third example.</description> 36 39 </item> 37 40 </channel> … … 49 52 package main; 50 53 51 use Test::More tests => 7;54 use Test::More tests => 9; 52 55 53 56 # Create a temporary file, fill it with the RSS we defined … … 77 80 is($items[0]{link}, 'http://example.com/1.html', 'Got local link'); 78 81 82 #5 83 is($items[0]{description}, 'The first example.', 'Got local description'); 84 79 85 $rss = CGI::Wiki::Plugin::RSS::Reader->new( 80 86 url => 'http://example.com/example.rss', … … 83 89 @items = $rss->retrieve; 84 90 85 # 591 #6 86 92 is($items[0]{title}, 'Example item 1', 'Got remote title'); 87 93 88 # 694 #7 89 95 is($items[0]{link}, 'http://example.com/1.html', 'Got remote link'); 96 97 #8 98 is($items[0]{description}, 'The first example.', 'Got remote description'); 90 99 91 100 my $died; … … 101 110 }; 102 111 103 # 7112 #9 104 113 is($died, 1, 'Caught illegal config options'); 105 114
