<commit_before>class EnjuLeaf::QuickInstallGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def quick_install
    environment = ENV['ENJU_ENV'] || 'development'
    if !ENV['SKIP_CONFIG']
      rake("db:migrate", :env => environment)
      generate("enju_circulation:setup")
      generate("enju_subject:setup")
      gsub_file 'config/schedule.rb', /^set :environment, :development$/,
        "set :environment, :#{environment}"
      gsub_file 'config/environments/production.rb',
        /config.serve_static_assets = false$/,
        "config.serve_static_assets = true"
      gsub_file 'config/environments/production.rb',
        /# config.cache_store = :mem_cache_store$/,
        "config.cache_store = :dalli_store, {:compress => true}"
      gsub_file 'config/environments/production.rb',
        /# config.assets.precompile \+= %w\( search.js \)$/,
        "config.assets.precompile += %w( mobile.js mobile.css print.css )"
    end
    rake("db:migrate", :env => environment)
    rake("enju_leaf:setup", :env => environment)
    rake("enju_circulation:setup", :env => environment)
    rake("enju_subject:setup", :env => environment)
    rake("assets:precompile") if environment == 'production'
    rake("db:seed", :env => environment)
    if ENV['OS'] == 'Windows_NT'
      rake("sunspot:solr:run", :env => environment)
    else
      rake("sunspot:solr:start", :env => environment)
      rake("enju_leaf:create_initial_index", :env => environment)
      rake("sunspot:solr:stop", :env => environment)
    end
  end
end<commit_msg>updated generator<commit_after>class EnjuLeaf::QuickInstallGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def quick_install
    environment = ENV['ENJU_ENV'] || 'development'
    if !ENV['SKIP_CONFIG']
      rake("db:migrate", :env => environment)
      generate("enju_circulation:setup")
      generate("enju_subject:setup")
      gsub_file 'config/schedule.rb', /^set :environment, :development$/,
        "set :environment, :#{environment}"
      gsub_file 'config/environments/production.rb',
        /config.serve_static_assets = false$/,
        "config.serve_static_assets = true"
      gsub_file 'config/environments/production.rb',
        /# config.cache_store = :mem_cache_store$/,
        "config.cache_store = :dalli_store, {:compress => true}"
      gsub_file 'config/environments/production.rb',
        /# config.assets.precompile \+= %w\( search.js \)$/,
        "config.assets.precompile += %w( mobile.js mobile.css print.css )"
    end
    rake("db:migrate", :env => environment)
    rake("enju_leaf:setup", :env => environment)
    rake("enju_circulation:setup", :env => environment)
    rake("enju_subject:setup", :env => environment)
    rake("assets:precompile") if environment == 'production'
    rake("db:seed", :env => environment)
    if ENV['OS'] == 'Windows_NT'
      rake("sunspot:solr:run", :env => environment)
    else
      rake("sunspot:solr:start", :env => environment)
      sleep 5
      rake("enju_leaf:create_initial_index", :env => environment)
      rake("sunspot:solr:stop", :env => environment)
    end
  end
end
{'fraction_non_alphanumeric': 0.15601503759398497, 'fraction_numerical': 0.0003132832080200501, 'mean_word_length': 3.779940119760479, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '532433', 'n_tokens_mistral': 1035, 'n_tokens_neox': 993, 'n_words': 180}