kales-cli / kales.cli.task / KalesContextualTask

KalesContextualTask

abstract class KalesContextualTask : KalesTask

Defines a Kales task that is supposed to run from an existing Kales application root directory, defined by applicationRootDir, eg.: "~/projects/foo"

Constructors

<init>

KalesContextualTask(applicationRootDir: File)

Defines a Kales task that is supposed to run from an existing Kales application root directory, defined by applicationRootDir, eg.: "~/projects/foo"

Properties

appDirectory

val appDirectory: File

returns the directory where the code for package "com.example.foo.app" is found

applicationRootDir

val applicationRootDir: File

appPackageName

val appPackageName: String?

returns "com.example.foo"

dbMigrateDir

val dbMigrateDir: File

Returns the path to the migrations directory

resourcesDir

val resourcesDir: File

Functions

rawWriteTo

fun FileSpec.rawWriteTo(destination: Path): Unit

Writes this FileSpec to the provided file Path

readDatabaseConfig

fun readDatabaseConfig(): KalesDatabaseConfig

Returns a KalesDatabaseConfig representing the current project's database.yml file

Inherited Functions

run

abstract fun run(): Unit

Inheritors

DbCreateTask

class DbCreateTask : KalesContextualTask

DbMigrateTask

class DbMigrateTask : KalesContextualTask

GenerateControllerTask

class GenerateControllerTask : KalesContextualTask

Generates a controller class

GenerateMigrationTask

class GenerateMigrationTask : KalesContextualTask

GenerateModelTask

class GenerateModelTask : KalesContextualTask

GenerateViewTask

class GenerateViewTask : KalesContextualTask