Changeset 1206
- Timestamp:
- 08/03/06 12:19:26
- Files:
-
- trunk/plagger/Makefile.PL (modified) (2 diffs)
- trunk/plagger/deps (added)
- trunk/plagger/deps/Aggregator-Xango.yaml (added)
- trunk/plagger/deps/Bundle-Planet.yaml (added)
- trunk/plagger/deps/CustomFeed-FlickrSearch.yaml (added)
- trunk/plagger/deps/CustomFeed-Mixi.yaml (added)
- trunk/plagger/deps/CustomFeed-SVNLog.yaml (added)
- trunk/plagger/deps/Filter-Babelfish.yaml (added)
- trunk/plagger/deps/Filter-Emoticon.yaml (added)
- trunk/plagger/deps/Filter-HatenaBookmarkUsersCount.yaml (added)
- trunk/plagger/deps/Filter-HatenaDiaryKeywordLink.yaml (added)
- trunk/plagger/deps/Filter-HatenaFormat.yaml (added)
- trunk/plagger/deps/Filter-ImageInfo.yaml (added)
- trunk/plagger/deps/Filter-Pipe.yaml (added)
- trunk/plagger/deps/Filter-Profanity.yaml (added)
- trunk/plagger/deps/Filter-RSSLiberalDateTime.yaml (added)
- trunk/plagger/deps/Filter-ResolveRelativeLink.yaml (added)
- trunk/plagger/deps/Filter-Romanize.yaml (added)
- trunk/plagger/deps/Filter-TTP.yaml (added)
- trunk/plagger/deps/Notify-Balloon.yaml (added)
- trunk/plagger/deps/Notify-Beep.yaml (added)
- trunk/plagger/deps/Notify-Eject-Win32.yaml (added)
- trunk/plagger/deps/Notify-Growl.yaml (added)
- trunk/plagger/deps/Notify-IRC.yaml (added)
- trunk/plagger/deps/Notify-NetSend.yaml (added)
- trunk/plagger/deps/Notify-UpdatePing.yaml (added)
- trunk/plagger/deps/Publish-2chdat.yaml (added)
- trunk/plagger/deps/Publish-CSV.yaml (added)
- trunk/plagger/deps/Publish-Delicious.yaml (added)
- trunk/plagger/deps/Publish-Excel.yaml (added)
- trunk/plagger/deps/Publish-Feed.yaml (added)
- trunk/plagger/deps/Publish-Gmail.yaml (added)
- trunk/plagger/deps/Publish-IMAP.yaml (added)
- trunk/plagger/deps/Publish-JavaScript.yaml (added)
- trunk/plagger/deps/Publish-MT.yaml (added)
- trunk/plagger/deps/Publish-Maildir.yaml (added)
- trunk/plagger/deps/Publish-PDF.yaml (added)
- trunk/plagger/deps/Publish-PalmDoc.yaml (added)
- trunk/plagger/deps/Publish-Planet.yaml (added)
- trunk/plagger/deps/Publish-PowerPoint.yaml (added)
- trunk/plagger/deps/Publish-SWF.yaml (added)
- trunk/plagger/deps/Publish-Speech-MacOSX.yaml (added)
- trunk/plagger/deps/Publish-Speech-Win32.yaml (added)
- trunk/plagger/deps/Search-Estraier.yaml (added)
- trunk/plagger/deps/Search-KinoSearch.yaml (added)
- trunk/plagger/deps/Search-Spotlight.yaml (added)
- trunk/plagger/deps/Subscription-Bloglines.yaml (added)
- trunk/plagger/deps/Subscription-Bookmarks-InternetExplorer.yaml (added)
- trunk/plagger/deps/Subscription-Bookmarks-Safari.yaml (added)
- trunk/plagger/deps/Subscription-DBI.yaml (added)
- trunk/plagger/deps/Subscription-FOAF.yaml (added)
- trunk/plagger/deps/Subscription-HatenaRSS.yaml (added)
- trunk/plagger/deps/Subscription-LivedoorReader.yaml (added)
- trunk/plagger/deps/Subscription-OPML.yaml (added)
- trunk/plagger/deps/Subscription-PlanetINI.yaml (added)
- trunk/plagger/t/TestPlagger.pm (modified) (2 diffs)
- trunk/plagger/t/plugins/Bundle-Planet/bundle.t (modified) (1 diff)
- trunk/plagger/t/plugins/Bundle-Planet/duration.t (modified) (1 diff)
- trunk/plagger/t/plugins/Bundle-Planet/scrubber.t (modified) (1 diff)
- trunk/plagger/t/plugins/Filter-Babelfish/babelfish.t (modified) (1 diff)
- trunk/plagger/t/plugins/Filter-FetchEnclosure/fetch.t (modified) (1 diff)
- trunk/plagger/t/plugins/Notify-UpdatePing/ping.t (modified) (1 diff)
- trunk/plagger/t/plugins/Publish-Feed/atom1.t (modified) (1 diff)
- trunk/plagger/t/plugins/Publish-Feed/fullcontent.t (modified) (1 diff)
- trunk/plagger/t/plugins/Publish-Feed/rss2-content.t (modified) (1 diff)
- trunk/plagger/t/plugins/Search-Estraier/search.t (modified) (1 diff)
- trunk/plagger/t/plugins/Search-KinoSearch/search.t (modified) (1 diff)
- trunk/plagger/t/plugins/Subscription-FOAF/subscription.t (modified) (1 diff)
- trunk/plagger/t/plugins/Subscription-PlanetINI (moved) (moved from trunk/plagger/t/plugins/Subscription-ConfigINI)
- trunk/plagger/t/plugins/Subscription-PlanetINI/subscription.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/Makefile.PL
r1197 r1206 34 34 requires('Term::Encoding'); 35 35 36 build_requires('YAML'); 36 37 build_requires('Test::More', 0.42); 37 38 build_requires('Test::Base', 0.52); … … 62 63 ); 63 64 64 features( 65 'Subscription::Bloglines' => [ 66 -default => 1, 67 recommends('WebService::Bloglines', 0.11), 68 ], 69 'Subscription::OPML' => [ 70 -default => 1, 71 recommends('XML::OPML'), 72 ], 73 'Publish::Gmail' => [ 74 -default => 1, 75 recommends('Mail::Address'), 76 recommends('MIME::Lite'), 77 recommends('Net::SMTP::TLS'), 78 ], 79 'Aggregator::Xango' => [ 80 -default => 0, 81 recommends('POE'), 82 recommends('Xango', 1.04), # protect ourselves from my stupidity 83 recommends('Cache::FastMmap'), 84 recommends('POE::Component::Client::DNS'), 85 recommends('POE::Component::Client::HTTP'), 86 ], 87 'CustomFeed::Mixi' => [ 88 -default => 0, 89 recommends('WWW::Mixi', 0.46), 90 ], 91 'Publish::PDF' => [ 92 -default => 0, 93 recommends('PDF::FromHTML'), 94 ], 95 'Publish::Delicious' => [ 96 -default => 0, 97 recommends('Net::Delicious'), 98 ], 99 'Notify::IRC' => [ 100 -default => 0, 101 recommends('POE::Component::IRC'), 102 recommends('POE::Component::IKC::Client'), 103 ], 104 'Publish::JavaScript' => [ 105 -default => 0, 106 recommends('Template::Plugin::JavaScript'), 107 ], 108 'Subscription::HatenaRSS' => [ 109 -default => 0, 110 recommends('WWW::Mechanize'), 111 ], 112 'Filter::HatenaBookmarkUsersCount' => [ 113 -default => 0, 114 recommends('XMLRPC::Lite'), 115 ], 116 'Filter::HatenaDiaryKeywordLink' => [ 117 -default => 0, 118 recommends('XMLRPC::Lite'), 119 ], 120 'Filter::ResolveRelativeLink' => [ 121 -default => 0, 122 recommends('HTML::ResolveLink', 0.02), 123 ], 124 'Publish::Planet' => [ 125 -default => 1, 126 recommends('HTML::Scrubber'), 127 recommends('File::Copy::Recursive'), 128 ], 129 'Publish::CSV' => [ 130 -default => 0, 131 recommends('Text::CSV_PP'), 132 ], 133 'Filter::HatenaFormat' => [ 134 -default => 0, 135 recommends('Text::Hatena'), 136 ], 137 'Publish::MT' => [ 138 -default => 0, 139 recommends('Net::MovableType'), 140 ], 141 'CustomFeed::FlickrSearch' => [ 142 -default => 0, 143 recommends('Flickr::API'), 144 recommends('DateTime::Format::Epoch'), 145 ], 146 'Filter::ImageInfo' => [ 147 -default => 0, 148 recommends('Image::Info'), 149 ], 150 'Filter::Pipe' => [ 151 -default => 0, 152 recommends('IPC::Run'), 153 ], 154 'Filter::RSSLiberalDateTime' => [ 155 -default => 0, 156 recommends('Date::Parse'), 157 ], 158 'Filter::Emoticon' => [ 159 -default => 0, 160 recommends('Text::Emoticon'), 161 ], 162 'Publish::Maildir' => [ 163 -default => 0, 164 recommends('MIME::Lite'), 165 ], 166 'Publish::IMAP' => [ 167 -default => 0, 168 recommends('Mail::IMAPClient'), 169 ], 170 'Filter::Profanity' => [ 171 -default => 0, 172 recommends('Regexp::Common::profanity_us'), 173 ], 174 'Subscription::DBI' => [ 175 -default => 0, 176 recommends('DBIx::Class::Schema'), 177 ], 178 'CustomFeed::SVNLog' => [ 179 -default => 0, 180 recommends('SVN::Core'), 181 recommends('SVN::Client'), 182 ], 183 'Filter::TTP' => [ 184 -default => 0, 185 recommends('URI::Find'), 186 ], 187 'Filter::Romanize' => [ 188 -default => 0, 189 recommends('Text::Kakasi'), 190 ], 191 'Subscription::LivedoorReader' => [ 192 -default => 0, 193 recommends('JSON::Syck', 0.10), 194 recommends('WWW::Mechanize'), 195 ], 196 'Search::Estraier' => [ 197 -default => 0, 198 recommends('Search::Estraier'), 199 ], 200 'Publish::2chdat' => [ 201 -default => 0, 202 recommends('DateTime::Locale'), 203 ], 204 'Subscription::PlanetINI' => [ 205 -default => 0, 206 recommends('Config::INI::Simple'), 207 ], 208 'Notify::UpdatePing' => [ 209 -default => 0, 210 recommends('XMLRPC::Lite'), 211 ], 212 'Publish::PalmDoc' => [ 213 -default => 0, 214 recommends('Palm::PalmDoc'), 215 ], 216 'Subscription::FOAF' => [ 217 -default => 0, 218 recommends('XML::FOAF'), 219 ], 220 'Notify::Beep' => [ 221 -default => 0, 222 recommends('Audio::Beep'), 223 ], 224 'Bundle::Planet' => [ 225 -default => 1, 226 recommends('Time::Duration::Parse'), 227 ], 228 'Publish::SWF' => [ 229 -default => 0, 230 recommends('SWF::Builder'), 231 recommends('Text::WrapI18N'), 232 ], 233 'Search::KinoSearch' => [ 234 -default => 0, 235 recommends('KinoSearch'), 236 ], 237 'Filter::Babelfish' => [ 238 -default => 0, 239 recommends('WWW::Babelfish'), 240 ], 241 'Notify::NetSend' => [ 242 -default => 0, 243 recommends('Net::NetSend'), 244 ], 245 'Publish::Excel' => [ 246 -default => 0, 247 recommends('Spreadsheet::WriteExcel'), 248 ], 249 ); 65 require YAML; 66 require DirHandle; 67 require File::Spec; 250 68 251 if ($^O eq 'darwin') { 252 features( 253 'Cookie sharing with Safari' => [ 254 -default => 0, 255 recommends('HTTP::Cookies::Safari'), 256 ], 257 'Search::Spotlight' => [ 258 -default => 1, 259 recommends('Mac::Glue'), 260 ], 261 'Publish::Speech' => [ 262 -default => 0, 263 recommends('Mac::Carbon'), 264 ], 265 'Notify::Growl' => [ 266 -default => 0, 267 recommends('Mac::Growl'), 268 ], 269 'Subscription::Bookmarks' => [ 270 -default => 0, 271 recommends('Mac::Tie::PList'), 272 ], 273 ); 69 my $dh = DirHandle->new("deps"); 70 while (my $f = $dh->read) { 71 next unless $f =~ /\.yaml$/; 72 my $meta = YAML::LoadFile( File::Spec->catfile("deps", $f) ); 274 73 275 install_script('bin/spotlight_comment.scpt'); 276 277 } elsif ($^O eq 'MSWin32') { 278 features( 279 'Cookie sharing with MSIE' => [ 280 -default => 0, 281 recommends('HTTP::Cookies::Microsoft'), 282 ], 283 'Publish::Speech' => [ 284 -default => 0, 285 recommends('Win32::OLE'), 286 recommends('Win32::SAPI4'), 287 recommends('Locale::Country'), 288 recommends('Locale::Language'), 289 ], 290 'Notify::Eject' => [ 291 -default => 0, 292 recommends('Win32::MCI::Basic'), 293 ], 294 'Subscription::Bookmarks' => [ 295 -default => 0, 296 recommends('Win32::IEFavorites', 0.03), 297 recommends('Win32::Locale'), 298 ], 299 'Notify::Balloon' => [ 300 -default => 0, 301 recommends('Win32::Console'), 302 ], 303 'Publish::PowerPoint' => [ 304 -default => 0, 305 recommends('Win32::PowerPoint'), 306 ], 307 ); 74 if (!$meta->{platform} || $meta->{platform} eq $^O) { 75 features( 76 $meta->{name}, [ 77 -default => $meta->{default}, 78 map recommends($_ => $meta->{depends}->{$_}), keys %{$meta->{depends}}, 79 ], 80 ); 81 } 308 82 } 309 83 trunk/plagger/t/TestPlagger.pm
r1204 r1206 1 1 package t::TestPlagger; 2 use FindBin; 3 use File::Basename; 4 use File::Spec; 2 5 use Test::Base -Base; 3 6 use Plagger; 4 7 5 our @EXPORT = qw(test_requires test_requires_network test_requires_command 8 our @EXPORT = qw(test_requires test_requires_network test_requires_command test_plugin_deps 6 9 run_eval_expected slurp_file file_contains file_doesnt_contain); 10 11 our $BaseDir; 12 { 13 my @path = File::Spec->splitdir($FindBin::Bin); 14 while (my $dir = pop @path) { 15 if ($dir eq 't') { 16 $BaseDir = File::Spec->catfile(@path); 17 last; 18 } 19 } 20 } 7 21 8 22 sub test_requires() { … … 42 56 } 43 57 plan skip_all => "Test requires '$command' command but it's not found"; 58 } 59 60 sub test_plugin_deps() { 61 my $mod = shift || File::Basename::basename($FindBin::Bin); 62 $mod =~ s!::!-!g; 63 64 my $file = File::Spec->catfile( $BaseDir, "deps", "$mod.yaml" ); 65 unless (-e $file) { 66 warn "Can't find deps file for $mod"; 67 return; 68 } 69 70 my $meta = YAML::LoadFile($file); 71 while (my($mod, $ver) = each %{$meta->{depends}}) { 72 test_requires($mod, $ver); 73 } 44 74 } 45 75 trunk/plagger/t/plugins/Bundle-Planet/bundle.t
r1173 r1206 5 5 6 6 test_requires_network; 7 test_ requires('Time::Duration::Parse');7 test_plugin_deps; 8 8 9 9 plan 'no_plan'; trunk/plagger/t/plugins/Bundle-Planet/duration.t
r1173 r1206 4 4 use t::TestPlagger; 5 5 6 test_requires('Time::Duration::Parse'); 7 6 test_plugin_deps; 8 7 plan 'no_plan'; 9 8 trunk/plagger/t/plugins/Bundle-Planet/scrubber.t
r1173 r1206 4 4 use t::TestPlagger; 5 5 6 test_requires('Time::Duration::Parse'); 7 6 test_plugin_deps; 8 7 plan 'no_plan'; 9 8 trunk/plagger/t/plugins/Filter-Babelfish/babelfish.t
r1189 r1206 4 4 use utf8; 5 5 6 test_ requires('WWW::Babelfish');6 test_plugin_deps; 7 7 test_requires_network; 8 8 trunk/plagger/t/plugins/Filter-FetchEnclosure/fetch.t
r1173 r1206 3 3 use File::Path qw(rmtree); 4 4 5 use t::TestPlagger;6 7 5 BEGIN { 6 use t::TestPlagger; 7 test_plugin_deps('Publish-Gmail'); 8 8 test_requires('MIME::Parser'); 9 test_requires('MIME::Lite');10 9 test_requires_network; 11 10 } trunk/plagger/t/plugins/Notify-UpdatePing/ping.t
r1173 r1206 4 4 use t::TestPlagger; 5 5 6 test_ requires('XMLRPC::Lite');6 test_plugin_deps; 7 7 test_requires_network; 8 8 trunk/plagger/t/plugins/Publish-Feed/atom1.t
r1173 r1206 5 5 use XML::Feed; 6 6 7 test_requires('XML::Feed', 0.09); 8 test_requires('XML::Atom', 0.20); 7 test_plugin_deps; 9 8 10 9 our $output = "$FindBin::Bin/atom.xml"; trunk/plagger/t/plugins/Publish-Feed/fullcontent.t
r1173 r1206 5 5 use XML::Feed; 6 6 7 test_ requires('XML::Feed', 0.09);7 test_plugin_deps; 8 8 9 9 our $output = "$FindBin::Bin/rss.xml"; trunk/plagger/t/plugins/Publish-Feed/rss2-content.t
r1173 r1206 5 5 use XML::Feed; 6 6 7 test_ requires('XML::Feed', 0.09);7 test_plugin_deps; 8 8 9 9 our $output = "$FindBin::Bin/rss.xml"; trunk/plagger/t/plugins/Search-Estraier/search.t
r1186 r1206 9 9 use t::TestPlagger; 10 10 11 test_ requires('Search::Estraier');11 test_plugin_deps; 12 12 test_requires('Tie::File'); 13 13 test_requires_command('estmaster'); trunk/plagger/t/plugins/Search-KinoSearch/search.t
r1183 r1206 5 5 use t::TestPlagger; 6 6 7 test_ requires('KinoSearch');7 test_plugin_deps; 8 8 9 9 our $dir = File::Spec->catfile($FindBin::Bin, 'invindex'); trunk/plagger/t/plugins/Subscription-FOAF/subscription.t
r1173 r1206 3 3 use t::TestPlagger; 4 4 5 test_ requires('XML::FOAF');5 test_plugin_deps; 6 6 plan tests => 1; 7 7 run_eval_expected; trunk/plagger/t/plugins/Subscription-PlanetINI/subscription.t
r1173 r1206 2 2 use t::TestPlagger; 3 3 4 test_ requires('Config::INI::Simple');4 test_plugin_deps; 5 5 6 6 plan tests => 1;
