File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -44,16 +44,13 @@ def link(collection, category)
4444
4545 def attributes ( collection , category )
4646 href = absolute_url ( generator . feed_path ( :collection => collection , :category => category ) )
47+ title = generator . feed_title ( :collection => collection , :category => category )
4748 {
4849 :type => "application/atom+xml" ,
4950 :rel => "alternate" ,
5051 :href => href ,
5152 :title => title ,
52- } . keep_if { |_ , v | v }
53- end
54-
55- def title
56- config [ "title" ] || config [ "name" ]
53+ } . delete_if { |_ , v | v . strip . empty? }
5754 end
5855
5956 def valid_collection
Original file line number Diff line number Diff line change 349349
350350 it "renders the feed meta for the selected collection" do
351351 default_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed.xml" title="My awesome site" />'
352- collection_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed/collection.xml" title="My awesome site" />'
353- category_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed/collection/news.xml" title="My awesome site" />'
352+ collection_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed/collection.xml" title="My awesome site | Collection " />'
353+ category_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed/collection/news.xml" title="My awesome site | Collection | News " />'
354354 expect ( default_feed ) . to eql ( default_feed_link )
355355 expect ( collection_feed ) . to eql ( collection_feed_link )
356356 expect ( category_feed ) . to eql ( category_feed_link )
378378
379379 it "renders the feed meta for all collections and categories" do
380380 default_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed.xml" title="My awesome site" />'
381- collection_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed/collection.xml" title="My awesome site" />'
382- category_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed/collection/news.xml" title="My awesome site" />'
381+ collection_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed/collection.xml" title="My awesome site | Collection " />'
382+ category_feed_link = '<link type="application/atom+xml" rel="alternate" href="http://example.org/feed/collection/news.xml" title="My awesome site | Collection | News " />'
383383 expect ( full_feed_meta ) . to include ( default_feed_link )
384384 expect ( full_feed_meta ) . to include ( collection_feed_link )
385385 expect ( full_feed_meta ) . to include ( category_feed_link )
You can’t perform that action at this time.
0 commit comments