package com.gitlab.artismarti.tinbo.config

import com.gitlab.artismarti.tinbo.TiNBo
import java.io.IOException

/**
 * @author artur
 */
object Defaults {

	const val TIME_NAME = "Data"
	const val TASKS_NAME = "Tasks"
	const val NOTES_NAME = "Notes"
	const val FINANCE_NAME = "Finance"
	const val MAIN_CATEGORY_NAME = "Main"
	const val INFO_NOTIFICATION_TIME = 30L

}

object ConfigDefaults {

	const val NOTES = "notes"
	const val TASKS = "tasks"
	const val TIMERS = "timers"
	const val FINANCE = "finance"
	const val LAST_USED = "last-used"
	const val NOTIFICATIONS = "notifications"
	const val TIME_INTERVAL = "interval"
	const val MAIN_CATEGORY_NAME = "category-name"
	const val DEFAULTS = "defaults"
	const val CURRENCY = "currency"

}

val CATEGORY_NAME_DEFAULT = try {
	TiNBo.config.getCategoryName()
} catch (e: IOException) {
	Defaults.MAIN_CATEGORY_NAME
}
package com.gitlab.artismarti.tinbo.config

import com.gitlab.artismarti.tinbo.TiNBo
import java.nio.file.NoSuchFileException

/**
 * @author artur
 */
object Defaults {

	const val TIME_NAME = "Data"
	const val TASKS_NAME = "Tasks"
	const val NOTES_NAME = "Notes"
	const val FINANCE_NAME = "Finance"
	const val MAIN_CATEGORY_NAME = "Main"
	const val INFO_NOTIFICATION_TIME = 30L

}

object ConfigDefaults {

	const val NOTES = "notes"
	const val TASKS = "tasks"
	const val TIMERS = "timers"
	const val FINANCE = "finance"
	const val LAST_USED = "last-used"
	const val NOTIFICATIONS = "notifications"
	const val TIME_INTERVAL = "interval"
	const val MAIN_CATEGORY_NAME = "category-name"
	const val DEFAULTS = "defaults"
	const val CURRENCY = "currency"

}

val CATEGORY_NAME_DEFAULT = CATEGORY_NAME_DEFAULT()
fun CATEGORY_NAME_DEFAULT(): String {
	return try {
		TiNBo.config.getCategoryName()
	} catch (e: NoSuchFileException) {
		Defaults.MAIN_CATEGORY_NAME
	}
}
Test no such file exception on jenkins - 1
Test no such file exception on jenkins - 1

arturbosch/TiNBo,arturbosch/TiNBo,arturbosch/TiNBo