<commit_before>if ::Rails::VERSION::MAJOR < 3
  raise "Temple supports only Rails 3.x and greater, your Rails version is #{::Rails::VERSION::STRING}"
end

module Temple
  module Templates
    if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR < 1
      class Rails < ActionView::TemplateHandler
        include ActionView::TemplateHandlers::Compilable
        extend Mixins::Template

        def compile(template)
          self.class.build_engine.call(template.source)
        end

        def self.register_as(name)
          ActionView::Template.register_template_handler name.to_sym, self
        end
      end
    else
      class Rails
        extend Mixins::Template

        def self.call(template)
          build_engine.call(template.source)
        end

        def self.register_as(name)
          ActionView::Template.register_template_handler name.to_sym, self
        end
      end
    end
  end
end
<commit_msg>template file names in rails handler<commit_after>if ::Rails::VERSION::MAJOR < 3
  raise "Temple supports only Rails 3.x and greater, your Rails version is #{::Rails::VERSION::STRING}"
end

module Temple
  module Templates
    if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR < 1
      class Rails < ActionView::TemplateHandler
        include ActionView::TemplateHandlers::Compilable
        extend Mixins::Template

        def compile(template)
          self.class.build_engine(:file => template.identifier).call(template.source)
        end

        def self.register_as(name)
          ActionView::Template.register_template_handler name.to_sym, self
        end
      end
    else
      class Rails
        extend Mixins::Template

        def self.call(template)
          build_engine(:file => template.identifier).call(template.source)
        end

        def self.register_as(name)
          ActionView::Template.register_template_handler name.to_sym, self
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.09002557544757034, 'fraction_numerical': 0.004092071611253197, 'mean_word_length': 2.7186311787072244, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '7194781', 'n_tokens_mistral': 563, 'n_tokens_neox': 535, 'n_words': 133}