<commit_before>unless defined?(ActionView)
  raise "Rails is not loaded - Temple::Templates::Rails cannot be used"
end

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)
          # Overwrite option: No streaming support in Rails < 3.1
          opts = {}.update(self.class.default_options).update(:file => template.identifier, :streaming => false)
          self.class.compile(template.source, opts)
        end

        def self.register_as(*names)
          names.each do |name|
            ActionView::Template.register_template_handler name.to_sym, self
          end
        end
      end
    else
      class Rails
        extend Mixins::Template<commit_msg>use ActionPack::VERSION instead of Rails::VERSION<commit_after>unless defined?(ActionView)
  raise "Rails is not loaded - Temple::Templates::Rails cannot be used"
end

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

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

        def compile(template)
          # Overwrite option: No streaming support in Rails < 3.1
          opts = {}.update(self.class.default_options).update(:file => template.identifier, :streaming => false)
          self.class.compile(template.source, opts)
        end

        def self.register_as(*names)
          names.each do |name|
            ActionView::Template.register_template_handler name.to_sym, self
          end
        end
      end
    else
      class Rails
        extend Mixins::Template
{'fraction_non_alphanumeric': 0.10085632730732635, 'fraction_numerical': 0.005708848715509039, 'mean_word_length': 3.036468330134357, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '3076576', 'n_tokens_mistral': 593, 'n_tokens_neox': 565, 'n_words': 163}