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

module.exports = {
  name: 'ember-cli-bugsnag',

  contentFor: function(type, config) {
    var content = '';
    var bugsnagConfig;
    var envArray;

    if (type === 'head' && config.environment !== 'test') {
      if (!config.bugsnag) {
        console.warn('`config.bugsnag` is not defined, using environment variables instead.');

        var envApiKey = process.env['BUGSNAG_API_KEY'];
        var envReleases = process.env['BUGSNAG_NOTIFY_RELEASE'];

        if (!envApiKey || !envReleases) {
          console.error('Environment variables `BUGSNAG_API_KEY` and `BUGSNAG_NOTIFY_RELEASE` are not specfied. Bugsnag will not be injected.');

          return '';
        }

        bugsnagConfig = {
          apiKey: envApiKey,
          notifyReleaseStages: envReleases.split(',')
        };
      } else {
        bugsnagConfig = config.bugsnag;
      }

      envArray = bugsnagConfig.notifyReleaseStages ? bugsnagConfig.notifyReleaseStages : [];

      content = [
        '<script ',
        'src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js" ',
        'data-appversion="' + config.currentRevision + '" ',
        'data-apikey="' + bugsnagConfig.apiKey + '">',<commit_msg>force the cloudfront URL to use SSL to prevent // -> file:// mapping on cordova ember apps<commit_after>/* jshint node: true */
'use strict';

module.exports = {
  name: 'ember-cli-bugsnag',

  contentFor: function(type, config) {
    var content = '';
    var bugsnagConfig;
    var envArray;

    if (type === 'head' && config.environment !== 'test') {
      if (!config.bugsnag) {
        console.warn('`config.bugsnag` is not defined, using environment variables instead.');

        var envApiKey = process.env['BUGSNAG_API_KEY'];
        var envReleases = process.env['BUGSNAG_NOTIFY_RELEASE'];

        if (!envApiKey || !envReleases) {
          console.error('Environment variables `BUGSNAG_API_KEY` and `BUGSNAG_NOTIFY_RELEASE` are not specfied. Bugsnag will not be injected.');

          return '';
        }

        bugsnagConfig = {
          apiKey: envApiKey,
          notifyReleaseStages: envReleases.split(',')
        };
      } else {
        bugsnagConfig = config.bugsnag;
      }

      envArray = bugsnagConfig.notifyReleaseStages ? bugsnagConfig.notifyReleaseStages : [];

      content = [
        '<script ',
        'src="https://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js" ',
        'data-appversion="' + config.currentRevision + '" ',
        'data-apikey="' + bugsnagConfig.apiKey + '">',
{'fraction_non_alphanumeric': 0.1370182950564422, 'fraction_numerical': 0.003892565200467108, 'mean_word_length': 2.681948424068768, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 1, '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': '5538406', 'n_tokens_mistral': 824, 'n_tokens_neox': 809, 'n_words': 162}