<commit_before>require 'rails/generators'

module Editarea
  class InstallGenerator < ::Rails::Generators::Base
    desc "Copy static files and add js to application.js"
    source_root File.expand_path('../templates', __FILE__)

    def add_js 
      js_manifest = 'app/assets/javascripts/application.js'

      if File.exist?(js_manifest)
        insert_into_file js_manifest, "//= require edit_area_full\n", :after => "jquery_ujs\n"
      else
        copy_file "application.js", js_manifest
      end
    end


    def copy_assets 
      directory File.expand_path("../../../../vendor/assets", __FILE__), "public/assets"
    end
  end
end<commit_msg>Fixes install generator<commit_after>require 'rails/generators'

module Editarea
  class InstallGenerator < ::Rails::Generators::Base
    desc "Copy static files and add js to application.js"
    source_root File.expand_path('../templates', __FILE__)

    def add_js
      js_manifest = 'app/assets/javascripts/application.js'

      if File.exist?(js_manifest)
        insert_into_file js_manifest, "//= require edit_area_full\n", :after => "jquery_ujs\n"
      else
        copy_file "application.js", js_manifest
      end
    end


    def copy_assets
      directory File.expand_path("../../../../app/assets", __FILE__), "public/assets"
    end
  end
end
{'fraction_non_alphanumeric': 0.1172886519421173, 'fraction_numerical': 0.0, 'mean_word_length': 3.068111455108359, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5704340', 'n_tokens_mistral': 414, 'n_tokens_neox': 395, 'n_words': 93}