<commit_before>/* jshint node: true */
'use strict';

var fs = require('fs');
var path = require('path');
var merge = require('lodash-node/modern/object/merge');
var template = require('lodash-node/modern/string/template');

module.exports = {
  name: 'ember-cli-rollbar',
  contentFor: function(type, config) {
    var environment = this.app.env;
    config = config.rollbar || {};
    var includeScript = environment !== 'development' || config.enabled;
    if (type === 'head' && includeScript) {
      var rollbarConfig = merge({
        enabled: environment !== 'development',
        captureUncaught: true,
        payload: {
          environment: environment
        }
      }, config);
      var snippetPath = path.join(__dirname, 'addon', 'rollbar-snippet.html');
      var snippetContent = fs.readFileSync(snippetPath, 'utf-8');<commit_msg>Disable rollbar for test env<commit_after>/* jshint node: true */
'use strict';

var fs = require('fs');
var path = require('path');
var merge = require('lodash-node/modern/object/merge');
var template = require('lodash-node/modern/string/template');

module.exports = {
  name: 'ember-cli-rollbar',
  contentFor: function(type, config) {
    var environment = this.app.env;
    config = config.rollbar || {};
    var isProductionEnv = ['development', 'test'].indexOf(environment) === -1;
    var includeScript = isProductionEnv || config.enabled;
    if (type === 'head' && includeScript) {
      var rollbarConfig = merge({
        enabled: isProductionEnv,
        captureUncaught: true,
        payload: {
          environment: environment
        }
      }, config);
      var snippetPath = path.join(__dirname, 'addon', 'rollbar-snippet.html');
      var snippetContent = fs.readFileSync(snippetPath, 'utf-8');
{'fraction_non_alphanumeric': 0.1504524886877828, 'fraction_numerical': 0.0016968325791855204, 'mean_word_length': 3.4225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6353980', 'n_tokens_mistral': 532, 'n_tokens_neox': 513, 'n_words': 124}