Skip to content

Commit 4ec7344

Browse files
committed
Remove /news which has not been updated in 5 years
1 parent 6932043 commit 4ec7344

File tree

5 files changed

+0
-306
lines changed

5 files changed

+0
-306
lines changed

News.md

Lines changed: 0 additions & 179 deletions
This file was deleted.

lib/MetaCPAN/Web/Controller/Feed.pm

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -59,60 +59,6 @@ sub recent : Private {
5959
);
6060
}
6161

62-
sub news_rss : Path('/news.rss') Args(0) {
63-
my ( $self, $c ) = @_;
64-
$c->detach( 'news', ['rss'] );
65-
}
66-
67-
sub news_atom : Path('/news.atom') Args(0) {
68-
my ( $self, $c ) = @_;
69-
$c->detach( 'news', ['atom'] );
70-
}
71-
72-
sub news : Private {
73-
my ( $self, $c, $type ) = @_;
74-
75-
$c->add_surrogate_key('NEWS');
76-
$c->browser_max_age('1h');
77-
$c->cdn_max_age('1h');
78-
79-
my $file = $c->config->{home} . '/News.md';
80-
my $news = path($file)->slurp_utf8;
81-
$news =~ s/^\s+|\s+$//g;
82-
my @entries;
83-
foreach my $str ( split /^Title:\s*/m, $news ) {
84-
next if $str =~ /^\s*$/;
85-
86-
my %e;
87-
$e{name} = $str =~ s/\A(.+)$//m ? $1 : 'No title';
88-
89-
# Use the same processing as _Header2Label in
90-
# Text::MultiMarkdown
91-
my $a_name = lc $e{name};
92-
$a_name =~ s/[^A-Za-z0-9:_.-]//g;
93-
$a_name =~ s/^[^a-z]+//gi;
94-
95-
$str =~ s/\A\s*-+//g;
96-
$e{date} = $str =~ s/^Date:\s*(.*)$//m ? $1 : '2014-01-01T00:00:00';
97-
$e{link} = '/news';
98-
$e{fragment} = $a_name;
99-
$e{author} = 'METACPAN';
100-
$str =~ s/^\s*|\s*$//g;
101-
102-
#$str =~ s{\[([^]]+)\]\(([^)]+)\)}{<a href="$2">$1</a>}g;
103-
$e{abstract} = $str;
104-
$e{abstract} = render_markdown($str);
105-
106-
push @entries, \%e;
107-
}
108-
109-
$c->stash->{feed} = $self->build_feed(
110-
format => $type,
111-
entries => \@entries,
112-
host => $c->config->{web_host},
113-
title => 'Recent MetaCPAN News',
114-
);
115-
}
11662

11763
sub author_rss : Chained('/author/root') PathPart('activity.rss') Args(0) {
11864
$_[1]->detach( 'author', ['rss'] );

lib/MetaCPAN/Web/Controller/News.pm

Lines changed: 0 additions & 24 deletions
This file was deleted.

root/news.tx

Lines changed: 0 additions & 32 deletions
This file was deleted.

t/controller/feed.t

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,6 @@ test_psgi app, sub {
9595
);
9696
}
9797
);
98-
get_feed_ok(
99-
$cb,
100-
'/news.rss',
101-
sub {
102-
my ( $res, $tx ) = @_;
103-
test_cache_headers(
104-
$res,
105-
{
106-
cache_control => 'max-age=3600',
107-
surrogate_key =>
108-
'NEWS content_type=application/rss+xml content_type=application',
109-
surrogate_control =>
110-
'max-age=3600, stale-if-error=2592000',
111-
}
112-
);
113-
}
114-
);
11598

11699
test_redirect( $cb, 'oalders' );
117100

0 commit comments

Comments
 (0)