<commit_before>'use strict'

files =
  src: './src/**/*.coffee'
  test: './test/**/*.coffee'

module.exports = (grunt) ->
  grunt.loadNpmTasks 'grunt-coffeelint'
  grunt.loadNpmTasks 'grunt-contrib-coffee'
  grunt.loadNpmTasks 'grunt-contrib-clean'
  grunt.loadNpmTasks 'grunt-mocha-cli'
  grunt.loadNpmTasks 'grunt-contrib-watch'

  grunt.initConfig
    clean: ['./lib/']

    coffee:
      compile:
        options:
          bare: true
          sourceMap: true
        expand: true
        cwd: './src/'
        src: '**/*.coffee'
        dest: './lib/'
        ext: '.js'

    coffeelint:
      options:
        configFile: 'coffeelint.json'
      src:
        files:
          src: [files.src]
      test:
        files:
          src: [files.test]

    mochacli:
      options:
        reporter: 'spec'
        flags: ['--harmony']
        compilers: ['coffee:coffee-script/register']
        env:
          NODE_ENV: 'test'
          NODE_TLS_REJECT_UNAUTHORIZED: 0
        grep: grunt.option 'mochaGrep' || null
        debug: grunt.option 'debugTests' || false
        bail: grunt.option 'bail' || false
      all:
        files.test

    watch:
      src:
        files: files.src
        tasks: ['build']

  grunt.registerTask 'build', ['clean', 'coffee']
  grunt.registerTask 'lint', ['coffeelint']
  grunt.registerTask 'test', ['coffeelint:src', 'build', 'mochacli']<commit_msg>ohm-242: increased mocha timeout when tests are run on travis<commit_after>'use strict'

files =
  src: './src/**/*.coffee'
  test: './test/**/*.coffee'

module.exports = (grunt) ->
  grunt.loadNpmTasks 'grunt-coffeelint'
  grunt.loadNpmTasks 'grunt-contrib-coffee'
  grunt.loadNpmTasks 'grunt-contrib-clean'
  grunt.loadNpmTasks 'grunt-mocha-cli'
  grunt.loadNpmTasks 'grunt-contrib-watch'

  # increase mocha timeout if these tests are being run on TRAVIS
  mochaTimeout = 2000
  if process.env.Travis
    mochaTimeout = 3000

  grunt.initConfig
    clean: ['./lib/']

    coffee:
      compile:
        options:
          bare: true
          sourceMap: true
        expand: true
        cwd: './src/'
        src: '**/*.coffee'
        dest: './lib/'
        ext: '.js'

    coffeelint:
      options:
        configFile: 'coffeelint.json'
      src:
        files:
          src: [files.src]
      test:
        files:
          src: [files.test]

    mochacli:
      options:
        reporter: 'spec'
        flags: ['--harmony']
        compilers: ['coffee:coffee-script/register']
        env:
          NODE_ENV: 'test'
          NODE_TLS_REJECT_UNAUTHORIZED: 0
        grep: grunt.option 'mochaGrep' || null
        debug: grunt.option 'debugTests' || false
        bail: grunt.option 'bail' || false
        timeout: mochaTimeout
      all:
        files.test

    watch:
      src:
        files: files.src
        tasks: ['build']

  grunt.registerTask 'build', ['clean', 'coffee']
  grunt.registerTask 'lint', ['coffeelint']
  grunt.registerTask 'test', ['coffeelint:src', 'build', 'mochacli']
{'fraction_non_alphanumeric': 0.13804601533844615, 'fraction_numerical': 0.004334778259419807, 'mean_word_length': 2.0864197530864197, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4391741', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1034, 'n_words': 219}