<commit_before>require 'timeout'
require 'json'

namespace :js do

  desc 'run testem as you develop, can use `rake js:dev <ember app name> <browser>`'
  task :dev do
    app = ARGV[1]
    browsers = ARGV[2] || 'Firefox,Chrome,Safari'
    if app
      ENV['JS_SPEC_MATCHER'] = matcher_for_ember_app app
      unless File.exists?("app/coffeescripts/ember/#{app}")
        puts "no app found at app/coffeescripts/ember/#{app}"
        exit
      end
    end
    Rake::Task['js:generate_runner'].invoke
    exec("karma start --browsers #{browsers}")
  end

  def matcher_for_ember_app app_name
    "**/#{app_name}/**/*.spec.js"<commit_msg>switch to using the karma binary in node_modules/.bin<commit_after>require 'timeout'
require 'json'

namespace :js do

  desc 'run testem as you develop, can use `rake js:dev <ember app name> <browser>`'
  task :dev do
    app = ARGV[1]
    browsers = ARGV[2] || 'Firefox,Chrome,Safari'
    if app
      ENV['JS_SPEC_MATCHER'] = matcher_for_ember_app app
      unless File.exists?("app/coffeescripts/ember/#{app}")
        puts "no app found at app/coffeescripts/ember/#{app}"
        exit
      end
    end
    Rake::Task['js:generate_runner'].invoke
    exec("node_modules/.bin/karma start --browsers #{browsers}")
  end

  def matcher_for_ember_app app_name
    "**/#{app_name}/**/*.spec.js"
{'fraction_non_alphanumeric': 0.13609022556390976, 'fraction_numerical': 0.0030075187969924814, 'mean_word_length': 3.363934426229508, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5240887', 'n_tokens_mistral': 487, 'n_tokens_neox': 480, 'n_words': 116}