<commit_before>import passport from 'passport';
import { Strategy as GoogleStrategy }  from 'passport-google-oauth20';

let googleClientID = process.env.GOOGLE_CLIENT_ID;
let googleClientSecret = process.env.GOOGLE_CLIENT_SECRET;

if (!process.env.TRAVIS) {
  googleClientID = require('../keys/googleAuth').googleKeys.CLIENT_ID;
  googleClientSecret = require('../keys/googleAuth').googleKeys.CLIENT_SECRET;
}

import { postgresConnection as cn } from './helpers';
const pgp = require('pg-promise')();

const db = pgp(cn);

export const checkAuth = (req, res, next) => {
  if (req.session.passport ? req.session.passport.user : false) {<commit_msg>change auth.js to check if deploying on heroku<commit_after>import passport from 'passport';
import { Strategy as GoogleStrategy }  from 'passport-google-oauth20';

let googleClientID = process.env.GOOGLE_CLIENT_ID;
let googleClientSecret = process.env.GOOGLE_CLIENT_SECRET;

if (!process.env.TRAVIS && !process.env.HEROKU) {
  googleClientID = require('../keys/googleAuth').googleKeys.CLIENT_ID;
  googleClientSecret = require('../keys/googleAuth').googleKeys.CLIENT_SECRET;
}

import { postgresConnection as cn } from './helpers';
const pgp = require('pg-promise')();

const db = pgp(cn);

export const checkAuth = (req, res, next) => {
  if (req.session.passport ? req.session.passport.user : false) {
{'fraction_non_alphanumeric': 0.13757396449704143, 'fraction_numerical': 0.0029585798816568047, 'mean_word_length': 5.293023255813954, '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': '3999144', 'n_tokens_mistral': 447, 'n_tokens_neox': 445, 'n_words': 96}