feed-normalizer icon indicating copy to clipboard operation
feed-normalizer copied to clipboard

Sorting entries

Open renich opened this issue 9 years ago • 0 comments

Hello,

I've aggregating two feeds and sorting them by date. Here's the code:

feeds = [
    'http://blog.woralelandia.com/tag/mi-musica/feed/',
    'http://mexicoindie.net/feed/'
]

stories = []
feeds.each do |f|
    feed = FeedNormalizer::FeedNormalizer.parse f
    stories.push( *feed.entries )
end

stories.sort_by! { |k| k[ :date_published ] }

SystemStackError: stack level too deep
from /home/renich/.gem/ruby/2.2.0/gems/feed-normalizer-1.5.2/lib/structures.rb:14:in `rescue in method_missing'

I am getting 20 stories so it shouldn't be much. Could you help me out with this and maybe add a suggestion at the readme?

renich avatar May 08 '16 07:05 renich