<commit_before>g = require "gulp"
plumber = require "gulp-plumber"
notify = require "gulp-notify"

linter = require "gulp-coffeelint"
compiler = require "gulp-coffee"

mocha = require "gulp-mocha"

g.task "gulp-syntax-check", ->
  g.src(
    "./gulpfile.coffee"
  ).pipe(
    plumber "errorHandler": notify.onError "<%= error.message %>"
  ).pipe(
    linter("./coffeelint.json")
  ).pipe(
    linter.reporter("coffeelint-stylish")
  ).pipe(
    linter.reporter("failOnWarning")
  )

g.task "unit_tests", ->
  g.src(
    "./tests/unit/specs/**/*.coffee"
  ).pipe(
    plumber "errorHandler": notify.onError "<%= error.message %>"
  ).pipe(
    linter("./coffeelint.json")
  ).pipe(
    linter.reporter("coffeelint-stylish")
  ).pipe(
    linter.reporter("failOnWarning")
  ).pipe(mocha("reporter": "dot"))

g.task "integration_tests", ["unit_tests"], ->
  g.src(
    "./tests/integration/specs/**/*.coffee"
  ).pipe(
    plumber "errorHandler": notify.onError "<%= error.message %>"
  ).pipe(
    linter("./coffeelint.json")
  ).pipe(
    linter.reporter("coffeelint-stylish")
  ).pipe(
    linter.reporter("failOnWarning")
  ).pipe(mocha("reporter": "dot"))

g.task "it.server", (done) ->
  karma = require "./src/plugin"
  g.src([
    "./tests/integration/data/sample.coffee"
    "./tests/integration/data/success_sample.coffee"
  ], "read": false).pipe(
    karma.server(
      "singleRun": false
      "frameworks": ["mocha", "chai"]
      "browsers": ["Firefox"]
      "preprocessors":
        "**/*.coffee": ["coffee"]
      "coffeePreprocessor":
        "options":
          "sourceMap": true
    )
  )
  done()

g.task "it.runner", ->
  karma = require "./src/plugin"
  g.src([
    "./tests/integration/data/sample.coffee"
    "./tests/integration/data/success_sample.coffee"
  ], "read": false).pipe(
    karma.runner(<commit_msg>Increased timeout<commit_after>g = require "gulp"
plumber = require "gulp-plumber"
notify = require "gulp-notify"

linter = require "gulp-coffeelint"
compiler = require "gulp-coffee"

mocha = require "gulp-mocha"

g.task "gulp-syntax-check", ->
  g.src(
    "./gulpfile.coffee"
  ).pipe(
    plumber "errorHandler": notify.onError "<%= error.message %>"
  ).pipe(
    linter("./coffeelint.json")
  ).pipe(
    linter.reporter("coffeelint-stylish")
  ).pipe(
    linter.reporter("failOnWarning")
  )

g.task "unit_tests", ->
  g.src(
    "./tests/unit/specs/**/*.coffee"
  ).pipe(
    plumber "errorHandler": notify.onError "<%= error.message %>"
  ).pipe(
    linter("./coffeelint.json")
  ).pipe(
    linter.reporter("coffeelint-stylish")
  ).pipe(
    linter.reporter("failOnWarning")
  ).pipe(mocha("reporter": "dot"))

g.task "integration_tests", ["unit_tests"], ->
  g.src(
    "./tests/integration/specs/**/*.coffee"
  ).pipe(
    plumber "errorHandler": notify.onError "<%= error.message %>"
  ).pipe(
    linter("./coffeelint.json")
  ).pipe(
    linter.reporter("coffeelint-stylish")
  ).pipe(
    linter.reporter("failOnWarning")
  ).pipe(
    mocha(
      "reporter": "dot"
      "timeout": 5000
    )
  )

g.task "it.server", (done) ->
  karma = require "./src/plugin"
  g.src([
    "./tests/integration/data/sample.coffee"
    "./tests/integration/data/success_sample.coffee"
  ], "read": false).pipe(
    karma.server(
      "singleRun": false
      "frameworks": ["mocha", "chai"]
      "browsers": ["Firefox"]
      "preprocessors":
        "**/*.coffee": ["coffee"]
      "coffeePreprocessor":
        "options":
          "sourceMap": true
    )
  )
  done()

g.task "it.runner", ->
  karma = require "./src/plugin"
  g.src([
    "./tests/integration/data/sample.coffee"
    "./tests/integration/data/success_sample.coffee"
  ], "read": false).pipe(
    karma.runner(
{'fraction_non_alphanumeric': 0.1989795918367347, 'fraction_numerical': 0.0010741138560687433, 'mean_word_length': 3.0313852813852815, 'pattern_counts': {'":': 31, '<': 9, '<?xml version=': 0, '>': 19, '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': '2044691', 'n_tokens_mistral': 1452, 'n_tokens_neox': 1400, 'n_words': 216}