<commit_before># frozen_string_literal: true
require 'concourse/resource/rss/feed'
require 'concourse/resource/rss/serializer'

module Concourse
  module Resource
    module RSS
      class In
        def call(input, destination_directory)
          raise 'No destination directory given' if destination_directory.nil?
          version = Time.parse(input['version'].fetch('pubDate'))
          url = input['source'].fetch('url')

          feed = Feed.new(url)
          item = feed.items_at(version).first
          raise "Could not find the desired item with version #{version} in #{url}" if item.nil?

          Serializer.new(destination_directory).serialize(item)

          {
            'version'  => { 'pubDate' => version },
            'metadata' => [
              { 'name' => 'commit', 'value' => '61cebf' },
              { 'name' => 'author', 'value' => '<NAME>' },
            ]
          }
        end
      end
    end
  end
end
<commit_msg>Change in to use the exact same format as check<commit_after># frozen_string_literal: true
require 'concourse/resource/rss/feed'
require 'concourse/resource/rss/serializer'

module Concourse
  module Resource
    module RSS
      class In
        def call(input, destination_directory)
          raise 'No destination directory given' if destination_directory.nil?
          version = Time.parse(input['version'].fetch('pubDate'))
          url = input['source'].fetch('url')

          feed = Feed.new(url)
          item = feed.items_at(version).first
          raise "Could not find the desired item with version #{version} in #{url}" if item.nil?

          Serializer.new(destination_directory).serialize(item)

          {
            'version'  => { 'pubDate' => item.pubDate },
            'metadata' => [
              { 'name' => 'commit', 'value' => '61cebf' },
              { 'name' => 'author', 'value' => '<NAME>' },
            ]
          }
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.1262135922330097, 'fraction_numerical': 0.002043944813490036, 'mean_word_length': 2.1941272430668843, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '2954082', 'n_tokens_mistral': 545, 'n_tokens_neox': 534, 'n_words': 139}