<commit_before>require 'on_the_spot/controller_extension'
require 'on_the_spot/on_the_spot_helpers'

module OnTheSpot
  class Engine < ::Rails::Engine

    config.before_initialize do
      config.action_view.javascript_expansions[:on_the_spot] = %w(jquery.jeditable.mini.js on_the_spot_code)
    end

    # configure our plugin on boot. other extension points such
    # as configuration, rake tasks, etc, are also available
    initializer "on_the_spot.initialize" do |app|
      ActionController::Base.send :include, OnTheSpot::ControllerExtension
      ActionView::Base.send :include, OnTheSpot::Helpers
    end<commit_msg>Make sure javascript_expansions config option exists<commit_after>require 'on_the_spot/controller_extension'
require 'on_the_spot/on_the_spot_helpers'

module OnTheSpot
  class Engine < ::Rails::Engine

    config.before_initialize do
      if config.action_view.javascript_expansions
        config.action_view.javascript_expansions[:on_the_spot] = %w(jquery.jeditable.mini.js on_the_spot_code)
      end
    end

    # configure our plugin on boot. other extension points such
    # as configuration, rake tasks, etc, are also available
    initializer "on_the_spot.initialize" do |app|
      ActionController::Base.send :include, OnTheSpot::ControllerExtension
      ActionView::Base.send :include, OnTheSpot::Helpers
    end
{'fraction_non_alphanumeric': 0.07822878228782287, 'fraction_numerical': 0.0, 'mean_word_length': 4.770212765957447, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5729553', 'n_tokens_mistral': 411, 'n_tokens_neox': 402, 'n_words': 93}