<commit_before>module Terraforming

  def exist?(file)
    File.exist?(destination_path(file))
  end

  def exemplar?
    options[:exemplar] != false && exist?('spec/exemplars')
  end

  def attributes
    views
    super
  end

  def views
    return @views if @views
    @views = []
    args.delete_if do |arg|
      @views << case arg
        when /^\w+\.\w+\.\w+$/ then arg
        when /^\w+$/ then "#{arg}.html.haml"
        when /^\w+\.js$/ then "#{arg}.rjs"
        when /^\w+\.(?:html|fbml)$/ then "#{arg}.haml"
        when /^\w+\.(?:xml|rss|atom)$/ then "#{arg}.builder"
      end
    end
    @views.compact!
    @views
  end

  def actions
    views.map do |arg|
      arg.sub(/\..*$/,'')
    end.uniq.reject do |arg|
      arg =~ /^_/
    end
  end

end<commit_msg>Fix attributes in fixtures and exemplars<commit_after>module Terraforming

  def exist?(file)
    File.exist?(destination_path(file))
  end

  def exemplar?
    options[:exemplar] != false && exist?('spec/exemplars')
  end

  def attributes
    views
    super
  end

  def views
    return @views if @views
    @views = []
    args.delete_if do |arg|
      @views << case arg
        when /^\w+\.\w+\.\w+$/ then arg
        when /^\w+$/ then "#{arg}.html.haml"
        when /^\w+\.js$/ then "#{arg}.rjs"
        when /^\w+\.(?:html|fbml)$/ then "#{arg}.haml"
        when /^\w+\.(?:xml|rss|atom)$/ then "#{arg}.builder"
        when /^\w+\.\w+$/ then "#{arg}.erb"
        else next
      end
    end
    @views.compact!
    @views
  end

  def actions
    views.map do |arg|
      arg.sub(/\..*$/,'')
    end.uniq.reject do |arg|
      arg =~ /^_/
    end
  end

end
{'fraction_non_alphanumeric': 0.1884498480243161, 'fraction_numerical': 0.0, 'mean_word_length': 1.9340463458110517, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3930172', 'n_tokens_mistral': 622, 'n_tokens_neox': 603, 'n_words': 146}