<commit_before>###
  Auto generated task by Gake
  Please visit http://gruntjs.com/ to learn more about how to work with grunt tasks
###
dot = require('dot')
fs = require('fs')
path = require('path')
moment = require('moment')

module.exports = (grunt) ->
  grunt.registerTask("migration:generateInternalTask", ->
    @requires("db:loadConfig")
    @requiresConfig("migration.config")
    grunt.fail.fatal("The --name parameter is required") unless grunt.option('name')

    config = grunt.config.get('migration.config')

    MigrationPath = require(path.join(config.migrationLibPath, "migration_path"))
    migrationFullname = MigrationPath.generateMigrationName(grunt.option('name'))
    migrationPath = path.join(config.migrationOutDir,"#{migrationFullname}.js")

    # This setting will make sure doT preserves the white spaces in the migration template file.
    dot.templateSettings.strip = false
    templates = dot.process(path: config.templatesPath)
    migrationContent = templates.migration(creationDate:  moment().format())

    fs.writeFileSync(migrationPath, migrationContent)
  )

  grunt.registerTask("migration:generate", "run database migrations", ['db:loadConfig', 'migration:generateInternalTask'])<commit_msg>ensuring db/migrations folder is created in the migration generate task<commit_after>###
  Auto generated task by Gake
  Please visit http://gruntjs.com/ to learn more about how to work with grunt tasks
###
dot = require('dot')
fs = require('fs')
path = require('path')
moment = require('moment')
mkdirp = require('mkdirp')

module.exports = (grunt) ->
  grunt.registerTask("migration:generateInternalTask", ->
    @requires("db:loadConfig")
    @requiresConfig("migration.config")
    grunt.fail.fatal("The --name parameter is required") unless grunt.option('name')

    config = grunt.config.get('migration.config')

    MigrationPath = require(path.join(config.migrationLibPath, "migration_path"))
    migrationFullname = MigrationPath.generateMigrationName(grunt.option('name'))
    migrationPath = path.join(config.migrationOutDir,"#{migrationFullname}.js")
    mkdirp.sync(config.migrationOutDir) # making sure the migrations outdir directory exists

    # This setting will make sure doT preserves the white spaces in the migration template file.
    dot.templateSettings.strip = false
    templates = dot.process(path: config.templatesPath)
    migrationContent = templates.migration(creationDate:  moment().format())

    fs.writeFileSync(migrationPath, migrationContent)
  )

  grunt.registerTask("migration:generate", "run database migrations", ['db:loadConfig', 'migration:generateInternalTask'])
{'fraction_non_alphanumeric': 0.12319939347990902, 'fraction_numerical': 0.0, 'mean_word_length': 5.3590361445783135, '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': '4117729', 'n_tokens_mistral': 751, 'n_tokens_neox': 739, 'n_words': 176}