<commit_before>package com.softwaremill.codebrag.service.config

import org.joda.time._
import scala.concurrent.duration._

trait CodebragConfig extends ConfigWithDefault with CodebragStatsConfig {

  lazy val localGitStoragePath: String = rootConfig.getString("codebrag.local-git-storage-path")
  lazy val debugServicesLogin: String = rootConfig.getString("codebrag.debug-services-login")
  lazy val debugServicesPassword: String = rootConfig.getString("codebrag.debug-services-password")
  lazy val demo: Boolean = getBoolean("codebrag.demo", default = false)
  lazy val applicationUrl: String = rootConfig.getString("codebrag.application-url")

  lazy val invitationExpiryTime: ReadablePeriod = Period.millis(getMilliseconds("codebrag.invitation-expiry-time", 24.hours.toMillis).toInt)

  lazy val userNotifications: Boolean = getBoolean("codebrag.user-email-notifications.enabled", default = true)

  lazy val notificationsCheckInterval = getMilliseconds("codebrag.user-email-notifications.check-interval", 15.minutes.toMillis).millis

  lazy val userOfflinePeriod = Period.millis(getMilliseconds("codebrag.user-email-notifications.user-offline-after", 5.minutes.toMillis).toInt)

  // Config properties for daily summary send outs
  // Not included in docs and in config template as we prefer not to expose them
  // By default daily summaries are sent at 6am every day
  lazy val dailyDigestSendHour = getInt("codebrag.user-email-notifications.daily-digest-hour", 6)
  lazy val dailyDigestSendMinute = getInt("codebrag.user-email-notifications.daily-digest-minute", 0)
  lazy val dailyDigestSendInterval = Period.millis(getMilliseconds("codebrag.user-email-notifications.daily-digest-interval", 24.hours.toMillis).toInt)
}

trait CodebragStatsConfig extends ConfigWithDefault {

  lazy val sendStats = getBoolean("codebrag.send-anon-usage-data", true)
  lazy val statsSendHour = getInt("codebrag.stats-send-hour", 3)
  lazy val statsSendMinute = getInt("codebrag.stats-send-minute", 0)
  lazy val statsSendInterval = getMilliseconds("codebrag.stats-send-interval", 24.hours.toMillis).millis
  lazy val statsServerUrl = getString("codebrag.stats-server-url", "https://stats.codebrag.com:3000")
}<commit_msg>Change default stats port to 6666<commit_after>package com.softwaremill.codebrag.service.config

import org.joda.time._
import scala.concurrent.duration._

trait CodebragConfig extends ConfigWithDefault with CodebragStatsConfig {

  lazy val localGitStoragePath: String = rootConfig.getString("codebrag.local-git-storage-path")
  lazy val debugServicesLogin: String = rootConfig.getString("codebrag.debug-services-login")
  lazy val debugServicesPassword: String = rootConfig.getString("codebrag.debug-services-password")
  lazy val demo: Boolean = getBoolean("codebrag.demo", default = false)
  lazy val applicationUrl: String = rootConfig.getString("codebrag.application-url")

  lazy val invitationExpiryTime: ReadablePeriod = Period.millis(getMilliseconds("codebrag.invitation-expiry-time", 24.hours.toMillis).toInt)

  lazy val userNotifications: Boolean = getBoolean("codebrag.user-email-notifications.enabled", default = true)

  lazy val notificationsCheckInterval = getMilliseconds("codebrag.user-email-notifications.check-interval", 15.minutes.toMillis).millis

  lazy val userOfflinePeriod = Period.millis(getMilliseconds("codebrag.user-email-notifications.user-offline-after", 5.minutes.toMillis).toInt)

  // Config properties for daily summary send outs
  // Not included in docs and in config template as we prefer not to expose them
  // By default daily summaries are sent at 6am every day
  lazy val dailyDigestSendHour = getInt("codebrag.user-email-notifications.daily-digest-hour", 6)
  lazy val dailyDigestSendMinute = getInt("codebrag.user-email-notifications.daily-digest-minute", 0)
  lazy val dailyDigestSendInterval = Period.millis(getMilliseconds("codebrag.user-email-notifications.daily-digest-interval", 24.hours.toMillis).toInt)
}

trait CodebragStatsConfig extends ConfigWithDefault {

  lazy val sendStats = getBoolean("codebrag.send-anon-usage-data", true)
  lazy val statsSendHour = getInt("codebrag.stats-send-hour", 3)
  lazy val statsSendMinute = getInt("codebrag.stats-send-minute", 0)
  lazy val statsSendInterval = getMilliseconds("codebrag.stats-send-interval", 24.hours.toMillis).millis
  lazy val statsServerUrl = getString("codebrag.stats-server-url", "https://stats.codebrag.com:6666")
}
{'fraction_non_alphanumeric': 0.10396039603960396, 'fraction_numerical': 0.009000900090009001, 'mean_word_length': 5.8808049535603715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6444946', 'n_tokens_mistral': 1380, 'n_tokens_neox': 1343, 'n_words': 281}