<commit_before>/* jshint node: true */

module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'flowerpot',
    environment: environment,
    contentSecurityPolicy: { 'connect-src': "'self' https://auth.firebase.com wss://*.firebaseio.com" },
    firebase: {
      apiKey: process.env.FIREBASE_API_KEY,
      authDomain:  process.env.FIREBASE_APP_NAME + ".firebaseapp.com",
      databaseURL: "https://" + process.env.FIREBASE_APP_NAME + ".firebaseio.com",
      storageBucket:  process.env.FIREBASE_APP_NAME + ".appspot.com",
    },
    torii: {
      sessionServiceName: 'session'
    },
    baseURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      }
    },

    APP: {},

    featureFlags: {
      'show-index': true,
      'use-firebase': false,
      // Here you can pass flags/options to your application instance
      // when it is created
    }
  };

  if (environment === 'development') {
    // ENV.APP.LOG_RESOLVER = true;
    // ENV.APP.LOG_ACTIVE_GENERATION = true;
    // ENV.APP.LOG_TRANSITIONS = true;
    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
    // ENV.APP.LOG_VIEW_LOOKUPS = true;
  }

  if (environment === 'test') {
    // Testem prefers this...
    ENV.baseURL = '/';
    ENV.locationType = 'none';

    // keep test console output quieter
    ENV.APP.LOG_ACTIVE_GENERATION = false;
    ENV.APP.LOG_VIEW_LOOKUPS = false;

    ENV.APP.rootElement = '#ember-testing';
    ENV.featureFlags['show-index'] = false;
    ENV.featureFlags['use-firebase'] = false;
  }

  if (environment === 'production') {
    ENV.featureFlags['show-index'] = true;
    ENV.featureFlags['use-firebase'] = true;
  }

  return ENV;
};<commit_msg>only set up firebase if the feature flag is enabled<commit_after>/* jshint node: true */

module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'flowerpot',
    environment: environment,
    contentSecurityPolicy: { 'connect-src': "'self' https://auth.firebase.com wss://*.firebaseio.com" },
    torii: {
      sessionServiceName: 'session'
    },
    baseURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      }
    },

    APP: {},

    featureFlags: {
      'show-index': true,
      'use-firebase': false,
      // Here you can pass flags/options to your application instance
      // when it is created
    }
  };

  if (environment === 'development') {
    // ENV.APP.LOG_RESOLVER = true;
    // ENV.APP.LOG_ACTIVE_GENERATION = true;
    // ENV.APP.LOG_TRANSITIONS = true;
    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
    // ENV.APP.LOG_VIEW_LOOKUPS = true;
  }

  if (environment === 'test') {
    // Testem prefers this...
    ENV.baseURL = '/';
    ENV.locationType = 'none';

    // keep test console output quieter
    ENV.APP.LOG_ACTIVE_GENERATION = false;
    ENV.APP.LOG_VIEW_LOOKUPS = false;

    ENV.APP.rootElement = '#ember-testing';
    ENV.featureFlags['show-index'] = false;
    ENV.featureFlags['use-firebase'] = false;
  }

  if (environment === 'production') {
    ENV.featureFlags['show-index'] = true;
    ENV.featureFlags['use-firebase'] = true;
  }

  if (ENV.featureFlags['use-firebase']) {
    ENV.firebase = {
      apiKey: process.env.FIREBASE_API_KEY,
      authDomain:  process.env.FIREBASE_APP_NAME + ".firebaseapp.com",
      databaseURL: "https://" + process.env.FIREBASE_APP_NAME + ".firebaseio.com",
      storageBucket:  process.env.FIREBASE_APP_NAME + ".appspot.com",
    };
  }

  return ENV;
};
{'fraction_non_alphanumeric': 0.14759848893685915, 'fraction_numerical': 0.0, 'mean_word_length': 2.6594274432379073, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '75615', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1238, 'n_words': 245}