<commit_before>fs = require('fs')
gulp = require('gulp')
replace = require('gulp-replace-task')
config = require('../config')

gulp.task 'replace', ->
  env =  'development'
  settings = JSON.parse(fs.readFileSync("./#{config.appDir}/config/environments/#{env}.json", 'utf8'))

  gulp.src("./#{config.appDir}/config/config.coffee")
    .pipe(replace(
      patterns: [
        {
          match: 'apiPath'
          replacement: settings.apiPath
        }
        {
          match: 'env'
          replacement: settings.env
        }
      ]
    ))
    .pipe(gulp.dest("./#{config.appDir}/scripts"))<commit_msg>[Fix] gulp replace<commit_after>fs = require('fs')
gulp = require('gulp')
replace = require('gulp-replace-task')
config = require('../config')

gulp.task 'replace', ->
  env = 'development'
  settings = JSON.parse(fs.readFileSync("./#{config.appDir}/config/environments/#{env}.json", 'utf8'))

  gulp.src("./#{config.appDir}/config/config.coffee")
    .pipe(replace(
      patterns: [
        {
          match: 'apiPath'
          replacement: settings.apiPath
        }
        {
          match: 'env'
          replacement: env
        }
      ]
    ))
    .pipe(gulp.dest("./#{config.appDir}/scripts"))
{'fraction_non_alphanumeric': 0.18621821164889255, 'fraction_numerical': 0.0016406890894175555, 'mean_word_length': 2.436619718309859, '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': '890763', 'n_tokens_mistral': 401, 'n_tokens_neox': 406, 'n_words': 55}