Add support for running routines via command line

This commit is contained in:
garrettmills
2020-08-13 20:28:23 -05:00
parent afb35ebad8
commit f5b84b530c
33 changed files with 396 additions and 5 deletions

View File

@@ -34,6 +34,10 @@ class DirectoryState extends State {
check_message() {
return this.failure_message()
}
display() {
return `Ensure that the directory ${this._config.path} exists...`
}
}
module.exports = exports = DirectoryState

View File

@@ -54,6 +54,10 @@ class DownloadState extends State {
check_message() {
return this.failure_message()
}
display() {
return `Ensure that the file ${this._config.path} is downloaded from ${this._config.source}...`
}
}
module.exports = exports = DownloadState

View File

@@ -39,6 +39,10 @@ class FileState extends State {
check_message() {
return this.failure_message()
}
display() {
return `Ensure that the file ${this._config.path} exists...`
}
}
module.exports = exports = FileState

View File

@@ -46,6 +46,10 @@ class OwnerState extends State {
check_message() {
return this.failure_message()
}
display() {
return `Set filesystem owner of resource ${this._config.path}...`
}
}
module.exports = exports = OwnerState

View File

@@ -63,6 +63,10 @@ class PackState extends State {
check_message() {
return this.failure_message()
}
display() {
return `Archive the contents of ${this._config.path} to ${this._config.destination}...`
}
}
module.exports = exports = PackState

View File

@@ -42,6 +42,10 @@ class PermissionState extends State {
check_message() {
return this.failure_message()
}
display() {
return `Set filesystem permissions of resource ${this._config.path}...`
}
}
module.exports = exports = PermissionState

View File

@@ -66,6 +66,10 @@ class UnpackState extends State {
check_message() {
return this.failure_message()
}
display() {
return `Un-archive the contents of ${this._config.path} to ${this._config.destination}...`
}
}
module.exports = exports = UnpackState