<commit_before>class FeedItem
	include Mongoid::Document
    attr_accessor :title, :content, :updated_at, :id

    def self.all
    	return Story.all.desc(:updated_date).map do |story|
			FeedItem.create(story)
    	end
    end

    def self.create(story)
    	feed = FeedItem.new<commit_msg>Avoid feeding a possibly incomplete story until it is safe to say it has ended.<commit_after>class FeedItem
	include Mongoid::Document
    attr_accessor :title, :content, :updated_at, :id

    def self.all
    	all = Story.all.desc(:updated_date).map do |story|
			FeedItem.create(story)
    	end
        #Avoid feeding a possibly incomplete story
        unless all.empty?
            if Time.now - all.first.updated_date < 18 * 60
                all = all[1..-1]
            end
        end
        return all
    end

    def self.create(story)
    	feed = FeedItem.new
{'fraction_non_alphanumeric': 0.08670520231213873, 'fraction_numerical': 0.006936416184971098, 'mean_word_length': 2.4365079365079363, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3706732', 'n_tokens_mistral': 284, 'n_tokens_neox': 264, 'n_words': 76}