<commit_before>namespace :doc do
  task :generate_js do
    patient_coffee = File.read(Rails.root + 'lib/patient.coffee')
    patient_api = CoffeeScript.compile(patient_coffee, bare: true)
    File.open(Rails.root + 'tmp/patient.js', 'w+') do |js_file|
      js_file.write patient_api
    end
  end
  
end<commit_msg>Adding a rake task to run JSDoc<commit_after>namespace :doc do
  task :generate_js do
    patient_coffee = File.read(Rails.root + 'lib/patient.coffee')
    patient_api = CoffeeScript.compile(patient_coffee, bare: true)
    File.open(Rails.root + 'tmp/patient.js', 'w+') do |js_file|
      js_file.write patient_api
    end
  end
  
  task :js => :generate_js do
    system 'java -jar ./doc/jsdoc-toolkit/jsrun.jar ./doc/jsdoc-toolkit/app/run.js -t=doc/jsdoc-toolkit/templates/jsdoc -a tmp/patient.js -d=doc/patient-api'
  end
end
{'fraction_non_alphanumeric': 0.12647754137115838, 'fraction_numerical': 0.0, 'mean_word_length': 3.5783783783783782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2084673', 'n_tokens_mistral': 320, 'n_tokens_neox': 312, 'n_words': 65}