<commit_before>namespace :spec do

  desc "run test with phantomjs"
  task :javascript => [:environment] do
    unless Rails.env.test?
      system('RAILS_ENV=test bundle exec rake spec:javascript')
      next
    end
    require 'jasmine_rails/runner'
    spec_filter = ENV['SPEC']
    reporters = ENV.fetch('REPORTERS', 'console')
    JasmineRails::Runner.run spec_filter, reporters
  end

  # alias
  task :javascripts => :javascript
end<commit_msg>refactor structure a bit<commit_after>namespace :spec do

  desc "run test with phantomjs"
  task :javascript => [:environment] do
    if Rails.env.test?
      require 'jasmine_rails/runner'
      spec_filter = ENV['SPEC']
      reporters = ENV.fetch('REPORTERS', 'console')
      JasmineRails::Runner.run spec_filter, reporters
    else
      system("RAILS_ENV=test bundle exec rake spec:javascript")
    end
  end

  # alias
  task :javascripts => :javascript
end
{'fraction_non_alphanumeric': 0.1025081788440567, 'fraction_numerical': 0.0, 'mean_word_length': 3.6363636363636362, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7371840', 'n_tokens_mistral': 299, 'n_tokens_neox': 284, 'n_words': 76}