refactor: standardize command naming

This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
This commit is contained in:
Jose Diaz-Gonzalez
2020-02-09 22:41:39 -05:00
parent deea791e58
commit 1cb586b2e7
134 changed files with 246 additions and 245 deletions

View File

@@ -6,7 +6,7 @@ set -eo pipefail
case "$1" in
help | nginx:help)
nginx_vhosts_help_cmd "$@"
cmd-nginx-vhosts-help "$@"
;;
*)

View File

@@ -217,7 +217,7 @@ nginx_vhosts_help_content_func() {
help_content
}
nginx_vhosts_help_cmd() {
cmd-nginx-vhosts-help() {
if [[ $1 == "nginx:help" ]]; then
echo -e 'Usage: dokku nginx[:COMMAND]'
echo ''

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
nginx_logs_cmd() {
cmd-nginx-logs() {
declare desc="display app nginx logs from command line"
local cmd="$1"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
nginx_logs "$@"
}
nginx_logs_cmd "$@"
cmd-nginx-logs "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
nginx_build_config_cmd() {
cmd-nginx-build-config() {
declare desc="build nginx config to proxy app containers from command line"
declare APP="$2"
local cmd="nginx:build-config"
@@ -19,4 +19,4 @@ nginx_build_config_cmd() {
fi
}
nginx_build_config_cmd "$@"
cmd-nginx-build-config "$@"

View File

@@ -3,4 +3,4 @@ set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions"
nginx_vhosts_help_cmd "nginx:help"
cmd-nginx-vhosts-help "nginx:help"

View File

@@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
nginx-set-cmd() {
cmd-nginx-set() {
declare desc="set or clear an nginx property for an app"
local cmd="nginx:set" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
@@ -26,4 +26,4 @@ nginx-set-cmd() {
fi
}
nginx-set-cmd "$@"
cmd-nginx-set "$@"

View File

@@ -3,7 +3,7 @@ set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
nginx_show_conf_cmd() {
cmd-nginx-show-conf() {
declare desc="display app nginx config"
declare cmd="nginx:show-conf" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
@@ -17,4 +17,4 @@ nginx_show_conf_cmd() {
cat "$DOKKU_ROOT/$APP/nginx.conf"
}
nginx_show_conf_cmd "$@"
cmd-nginx-show-conf "$@"

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
nginx_validate_cmd() {
cmd-nginx-validate() {
declare desc="validates and optionally cleans up invalid nginx configurations"
declare cmd="nginx:validate" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
validate_nginx "$@"
}
nginx_validate_cmd "$@"
cmd-nginx-validate "$@"