<commit_before>module Api
  class Environment
    def self.normalized_attributes
      @normalized_attributes ||= {
        :time      => time_attributes,
        :url       => Set.new(%w(href)),
        :resource  => Set.new(%w(image_href)),
        :encrypted => encrypted_attributes
      }
    end

    def self.encrypted_attributes
      @encrypted_attributes ||= Set.new(%w(password)) |
                                ::MiqRequestWorkflow.all_encrypted_options_fields.map(&:to_s) |
                                ::Vmdb::Settings::PASSWORD_FIELDS.map(&:to_s)
    end
<commit_msg>Introduce (url,resource)_attributes methods<commit_after>module Api
  class Environment
    def self.normalized_attributes
      @normalized_attributes ||= {
        :time      => time_attributes,
        :url       => url_attributes,
        :resource  => resource_attributes,
        :encrypted => encrypted_attributes
      }
    end

    def self.url_attributes
      @url_attributes ||= Set.new(%w(href))
    end

    def self.resource_attributes
      @resource_attributes ||= Set.new(%w(image_href))
    end

    def self.encrypted_attributes
      @encrypted_attributes ||= Set.new(%w(password)) |
                                ::MiqRequestWorkflow.all_encrypted_options_fields.map(&:to_s) |
                                ::Vmdb::Settings::PASSWORD_FIELDS.map(&:to_s)
    end

{'fraction_non_alphanumeric': 0.10981818181818181, 'fraction_numerical': 0.0, 'mean_word_length': 2.2840095465393793, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '623186', 'n_tokens_mistral': 406, 'n_tokens_neox': 397, 'n_words': 58}