From 5d4b3958da86216455e7366d4c8ffd56f954b987 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 27 Oct 2016 20:46:20 -0400 Subject: [PATCH] Use a partial instead --- website/helpers/command_helpers.rb | 15 --------------- .../source/docs/commands/_general_options.html.md | 8 ++++++++ .../source/docs/commands/agent-info.html.md.erb | 2 +- .../source/docs/commands/alloc-status.html.md.erb | 2 +- .../docs/commands/client-config.html.md.erb | 2 +- .../source/docs/commands/eval-status.html.md.erb | 2 +- website/source/docs/commands/fs.html.md.erb | 2 +- .../commands/{init.html.md => init.html.md.erb} | 0 website/source/docs/commands/inspect.html.md.erb | 2 +- website/source/docs/commands/logs.html.md.erb | 2 +- .../source/docs/commands/node-drain.html.md.erb | 2 +- .../source/docs/commands/node-status.html.md.erb | 2 +- website/source/docs/commands/plan.html.md.erb | 2 +- website/source/docs/commands/run.html.md.erb | 2 +- .../docs/commands/server-force-leave.html.md.erb | 2 +- .../source/docs/commands/server-join.html.md.erb | 2 +- .../docs/commands/server-members.html.md.erb | 2 +- website/source/docs/commands/status.html.md.erb | 2 +- website/source/docs/commands/stop.html.md.erb | 2 +- 19 files changed, 24 insertions(+), 31 deletions(-) delete mode 100644 website/helpers/command_helpers.rb create mode 100644 website/source/docs/commands/_general_options.html.md rename website/source/docs/commands/{init.html.md => init.html.md.erb} (100%) diff --git a/website/helpers/command_helpers.rb b/website/helpers/command_helpers.rb deleted file mode 100644 index 451fe50c6..000000000 --- a/website/helpers/command_helpers.rb +++ /dev/null @@ -1,15 +0,0 @@ -module CommandHelpers - # Returns the markdown text for the general options usage. - def general_options_usage() - <`: The address of the Nomad server. Overrides the `NOMAD_ADDR` - environment variable if set. Defaults to `http://127.0.0.1:4646`. - -* `-region=`: The region of the Nomad server to forward commands to. - Overrides the `NOMAD_REGION` environment variable if set. Defaults to the - Agent's local region. - -* `-no-color`: Disables colored command output. -EOF - end -end diff --git a/website/source/docs/commands/_general_options.html.md b/website/source/docs/commands/_general_options.html.md new file mode 100644 index 000000000..45c7fff88 --- /dev/null +++ b/website/source/docs/commands/_general_options.html.md @@ -0,0 +1,8 @@ +- `-address=`: The address of the Nomad server. Overrides the `NOMAD_ADDR` + environment variable if set. Defaults to `http://127.0.0.1:4646`. + +- `-region=`: The region of the Nomad server to forward commands to. + Overrides the `NOMAD_REGION` environment variable if set. Defaults to the + Agent's local region. + +- `-no-color`: Disables colored command output. diff --git a/website/source/docs/commands/agent-info.html.md.erb b/website/source/docs/commands/agent-info.html.md.erb index ceb7f3448..d4eef9353 100644 --- a/website/source/docs/commands/agent-info.html.md.erb +++ b/website/source/docs/commands/agent-info.html.md.erb @@ -20,7 +20,7 @@ nomad agent-info [options] ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Output diff --git a/website/source/docs/commands/alloc-status.html.md.erb b/website/source/docs/commands/alloc-status.html.md.erb index 66707e990..46eb7e091 100644 --- a/website/source/docs/commands/alloc-status.html.md.erb +++ b/website/source/docs/commands/alloc-status.html.md.erb @@ -25,7 +25,7 @@ allocations and information will be displayed. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Alloc Status Options diff --git a/website/source/docs/commands/client-config.html.md.erb b/website/source/docs/commands/client-config.html.md.erb index 0a70461b4..b72f2b296 100644 --- a/website/source/docs/commands/client-config.html.md.erb +++ b/website/source/docs/commands/client-config.html.md.erb @@ -23,7 +23,7 @@ description below for specific usage information and requirements. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Client Config Options diff --git a/website/source/docs/commands/eval-status.html.md.erb b/website/source/docs/commands/eval-status.html.md.erb index 05a8c23b1..713ba331f 100644 --- a/website/source/docs/commands/eval-status.html.md.erb +++ b/website/source/docs/commands/eval-status.html.md.erb @@ -40,7 +40,7 @@ indicated by exit code 1. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Eval Status Options diff --git a/website/source/docs/commands/fs.html.md.erb b/website/source/docs/commands/fs.html.md.erb index 4e96237ca..a28fa404a 100644 --- a/website/source/docs/commands/fs.html.md.erb +++ b/website/source/docs/commands/fs.html.md.erb @@ -33,7 +33,7 @@ defaults to `/` of the allocation directory. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Fs Options diff --git a/website/source/docs/commands/init.html.md b/website/source/docs/commands/init.html.md.erb similarity index 100% rename from website/source/docs/commands/init.html.md rename to website/source/docs/commands/init.html.md.erb diff --git a/website/source/docs/commands/inspect.html.md.erb b/website/source/docs/commands/inspect.html.md.erb index e29974001..3517416db 100644 --- a/website/source/docs/commands/inspect.html.md.erb +++ b/website/source/docs/commands/inspect.html.md.erb @@ -23,7 +23,7 @@ version of a job Nomad is running. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Inspect Options diff --git a/website/source/docs/commands/logs.html.md.erb b/website/source/docs/commands/logs.html.md.erb index 8c4de0191..68aa7cade 100644 --- a/website/source/docs/commands/logs.html.md.erb +++ b/website/source/docs/commands/logs.html.md.erb @@ -23,7 +23,7 @@ the given job will be chosen. # ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Logs Options diff --git a/website/source/docs/commands/node-drain.html.md.erb b/website/source/docs/commands/node-drain.html.md.erb index 64096e55b..443967ff6 100644 --- a/website/source/docs/commands/node-drain.html.md.erb +++ b/website/source/docs/commands/node-drain.html.md.erb @@ -31,7 +31,7 @@ operation is desired. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Node Drain Options diff --git a/website/source/docs/commands/node-status.html.md.erb b/website/source/docs/commands/node-status.html.md.erb index d55628359..b52e19317 100644 --- a/website/source/docs/commands/node-status.html.md.erb +++ b/website/source/docs/commands/node-status.html.md.erb @@ -30,7 +30,7 @@ information will be displayed. If running the command on a Nomad Client, the ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Node Status Options diff --git a/website/source/docs/commands/plan.html.md.erb b/website/source/docs/commands/plan.html.md.erb index aefb79aaf..c00fd94c9 100644 --- a/website/source/docs/commands/plan.html.md.erb +++ b/website/source/docs/commands/plan.html.md.erb @@ -53,7 +53,7 @@ Plan will return one of the following exit codes: ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Plan Options diff --git a/website/source/docs/commands/run.html.md.erb b/website/source/docs/commands/run.html.md.erb index 789cbc4b4..a72cade59 100644 --- a/website/source/docs/commands/run.html.md.erb +++ b/website/source/docs/commands/run.html.md.erb @@ -45,7 +45,7 @@ precedence, going from highest to lowest: the `-vault-token` flag, the ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Run Options diff --git a/website/source/docs/commands/server-force-leave.html.md.erb b/website/source/docs/commands/server-force-leave.html.md.erb index 5000923a4..fb46cd267 100644 --- a/website/source/docs/commands/server-force-leave.html.md.erb +++ b/website/source/docs/commands/server-force-leave.html.md.erb @@ -24,7 +24,7 @@ to enter the "left" state. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Examples diff --git a/website/source/docs/commands/server-join.html.md.erb b/website/source/docs/commands/server-join.html.md.erb index d0faf1aa3..03bf90c40 100644 --- a/website/source/docs/commands/server-join.html.md.erb +++ b/website/source/docs/commands/server-join.html.md.erb @@ -26,7 +26,7 @@ be 1. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Examples diff --git a/website/source/docs/commands/server-members.html.md.erb b/website/source/docs/commands/server-members.html.md.erb index d5fe869ab..04454b69a 100644 --- a/website/source/docs/commands/server-members.html.md.erb +++ b/website/source/docs/commands/server-members.html.md.erb @@ -23,7 +23,7 @@ nomad server-members [options] ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Server Members Options diff --git a/website/source/docs/commands/status.html.md.erb b/website/source/docs/commands/status.html.md.erb index f1c69235f..80e3e046d 100644 --- a/website/source/docs/commands/status.html.md.erb +++ b/website/source/docs/commands/status.html.md.erb @@ -26,7 +26,7 @@ the most useful status fields for each. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Status Options diff --git a/website/source/docs/commands/stop.html.md.erb b/website/source/docs/commands/stop.html.md.erb index 641cb636f..372993b7e 100644 --- a/website/source/docs/commands/stop.html.md.erb +++ b/website/source/docs/commands/stop.html.md.erb @@ -29,7 +29,7 @@ reached a terminal state. It is safe to exit the monitor early using ctrl+c. ## General Options -<%= general_options_usage %> +<%= partial "docs/commands/_general_options" %> ## Stop Options