summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGabor Javorszky <g.javorszky@f5.com>2024-09-16 11:28:18 +0100
committerAndrew Clayton <a.clayton@nginx.com>2024-09-17 01:53:07 +0100
commit0dcd3a91995d5ad0a9d27347bba22d1e8eae08b1 (patch)
tree2643d298713c26a8fd0b2419ba651fa780f32fcd
parentcc863e1526f869a9c6c7f3372f69301bba56f846 (diff)
downloadunit-0dcd3a91995d5ad0a9d27347bba22d1e8eae08b1.tar.gz
unit-0dcd3a91995d5ad0a9d27347bba22d1e8eae08b1.tar.bz2
tools/unitctl: rename UNIT -> Unit
The correct capitalisation of the name of the software is Unit, not all caps. Signed-off-by: Gabor Javorszky <g.javorszky@f5.com> [ A bunch more s/UNIT/Unit/ - Andrew ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r--tools/unitctl/GNUmakefile4
-rw-r--r--tools/unitctl/man/unitctl.12
-rw-r--r--tools/unitctl/pkg/brew/unitctl.rb2
-rw-r--r--tools/unitctl/pkg/brew/unitctl.rb.template2
-rw-r--r--tools/unitctl/unit-client-rs/src/unit_client.rs4
-rw-r--r--tools/unitctl/unitctl/Cargo.toml6
-rw-r--r--tools/unitctl/unitctl/src/cmd/edit.rs8
-rw-r--r--tools/unitctl/unitctl/src/unitctl.rs2
8 files changed, 15 insertions, 15 deletions
diff --git a/tools/unitctl/GNUmakefile b/tools/unitctl/GNUmakefile
index 9992a322..3ae8e34c 100644
--- a/tools/unitctl/GNUmakefile
+++ b/tools/unitctl/GNUmakefile
@@ -110,11 +110,11 @@ manpage: target/man/$(OUTPUT_BINARY).1.gz ## Builds man page
.openapi_cache:
$Q mkdir -p $@
-## Generate (or regenerate) UNIT API access code via a OpenAPI spec
+## Generate (or regenerate) Unit API access code via a OpenAPI spec
.PHONY: openapi-generate
openapi-generate: .openapi_cache
$Q if [ ! -f "$(CURDIR)/unit-openapi/src/models/mod.rs" ]; then
- echo "$(M) generating UNIT API access code via a OpenAPI spec"
+ echo "$(M) generating Unit API access code via a OpenAPI spec"
OPENAPI_GENERATOR_VERSION="$(OPENAPI_GENERATOR_VERSION)" \
OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR="$(CURDIR)/.openapi_cache" \
$(CURDIR)/build/openapi-generator-cli.sh \
diff --git a/tools/unitctl/man/unitctl.1 b/tools/unitctl/man/unitctl.1
index 1bd725c6..0d775b6f 100644
--- a/tools/unitctl/man/unitctl.1
+++ b/tools/unitctl/man/unitctl.1
@@ -2,7 +2,7 @@
.\"
.TH UNITCTL "1" "2022-12-29" "%%VERSION%%" "unitctl"
.SH NAME
-unitctl \- NGINX UNIT Control Utility
+unitctl \- NGINX Unit Control Utility
.SH SYNOPSIS
unitctl [\fI\,FLAGS\/\fR] [\fI\,OPTIONS\/\fR] [\fI\,FILE\/\fR]...
.SH DESCRIPTION
diff --git a/tools/unitctl/pkg/brew/unitctl.rb b/tools/unitctl/pkg/brew/unitctl.rb
index 771f2806..05d17d3f 100644
--- a/tools/unitctl/pkg/brew/unitctl.rb
+++ b/tools/unitctl/pkg/brew/unitctl.rb
@@ -1,5 +1,5 @@
class Unitctl < Formula
- desc "CLI interface to the NGINX UNIT Control API"
+ desc "CLI interface to the NGINX Unit Control API"
homepage "https://github.com/nginxinc/unit-rust-sdk"
version "0.3.0"
package_name = "unitctl"
diff --git a/tools/unitctl/pkg/brew/unitctl.rb.template b/tools/unitctl/pkg/brew/unitctl.rb.template
index db6991f6..f690abe2 100644
--- a/tools/unitctl/pkg/brew/unitctl.rb.template
+++ b/tools/unitctl/pkg/brew/unitctl.rb.template
@@ -1,5 +1,5 @@
class Unitctl < Formula
- desc "CLI interface to the NGINX UNIT Control API"
+ desc "CLI interface to the NGINX Unit Control API"
homepage "https://github.com/nginxinc/unit-rust-sdk"
version "$VERSION"
package_name = "$PACKAGE_NAME"
diff --git a/tools/unitctl/unit-client-rs/src/unit_client.rs b/tools/unitctl/unit-client-rs/src/unit_client.rs
index b3f07308..3d09e67a 100644
--- a/tools/unitctl/unit-client-rs/src/unit_client.rs
+++ b/tools/unitctl/unit-client-rs/src/unit_client.rs
@@ -21,7 +21,7 @@ use unit_openapi::apis::{
};
use unit_openapi::models::{ConfigApplication, ConfigListener, Status};
-const USER_AGENT: &str = concat!("UNIT CLI/", env!("CARGO_PKG_VERSION"), "/rust");
+const USER_AGENT: &str = concat!("Unit CLI/", env!("CARGO_PKG_VERSION"), "/rust");
custom_error! {pub UnitClientError
OpenAPIError { source: OpenAPIError } = "OpenAPI error",
@@ -201,7 +201,7 @@ impl UnitClient {
}
}
- /// Sends a request to UNIT and deserializes the JSON response body into the value of type `RESPONSE`.
+ /// Sends a request to Unit and deserializes the JSON response body into the value of type `RESPONSE`.
pub async fn send_request_and_deserialize_response<RESPONSE: for<'de> serde::Deserialize<'de>>(
&self,
mut request: Request<Body>,
diff --git a/tools/unitctl/unitctl/Cargo.toml b/tools/unitctl/unitctl/Cargo.toml
index 8d83b424..80110d51 100644
--- a/tools/unitctl/unitctl/Cargo.toml
+++ b/tools/unitctl/unitctl/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "unitctl"
-description = "CLI interface to the NGINX UNIT Control API"
+description = "CLI interface to the NGINX Unit Control API"
version = "0.4.0-beta"
authors = ["Elijah Zupancic"]
edition = "2021"
@@ -38,7 +38,7 @@ tar = "0.4.41"
copyright = "2022, F5"
license-file = ["../LICENSE.txt", "0"]
extended-description = """\
-A utility for controlling NGINX UNIT."""
+A utility for controlling NGINX Unit."""
section = "utility"
priority = "optional"
assets = [
@@ -48,7 +48,7 @@ assets = [
[package.metadata.generate-rpm]
summary = """\
-A utility for controlling NGINX UNIT."""
+A utility for controlling NGINX Unit."""
section = "utility"
priority = "optional"
assets = [
diff --git a/tools/unitctl/unitctl/src/cmd/edit.rs b/tools/unitctl/unitctl/src/cmd/edit.rs
index 34c1e7a3..6679d4a9 100644
--- a/tools/unitctl/unitctl/src/cmd/edit.rs
+++ b/tools/unitctl/unitctl/src/cmd/edit.rs
@@ -41,7 +41,7 @@ pub(crate) async fn cmd(cli: &UnitCtl, output_format: OutputFormat) -> Result<()
.tempfile()
.map_err(|e| UnitctlError::IoError { source: e })?;
- // Pretty format JSON received from UNIT and write to the temporary file
+ // Pretty format JSON received from Unit and write to the temporary file
serde_json::to_writer_pretty(temp_file.as_file_mut(), &current_config)
.map_err(|e| UnitctlError::SerializationError { message: e.to_string() })?;
@@ -53,15 +53,15 @@ pub(crate) async fn cmd(cli: &UnitCtl, output_format: OutputFormat) -> Result<()
open_editor(temp_file_path)?;
let after_edit_mod_time = temp_file_path.metadata().ok().map(|m| m.modified().ok());
- // Check if file was modified before sending to UNIT
+ // Check if file was modified before sending to Unit
if let (Some(before), Some(after)) = (before_edit_mod_time, after_edit_mod_time) {
if before == after {
- eprintln!("File was not modified - no changes will be sent to UNIT");
+ eprintln!("File was not modified - no changes will be sent to Unit");
return Ok(());
}
};
- // Send edited file to UNIT to overwrite current configuration
+ // Send edited file to Unit to overwrite current configuration
send_and_validate_config_deserialize_response(&client, "PUT", "/config", Some(&inputfile))
.await
.and_then(|status| output_format.write_to_stdout(&status))
diff --git a/tools/unitctl/unitctl/src/unitctl.rs b/tools/unitctl/unitctl/src/unitctl.rs
index d01d0356..a4c13648 100644
--- a/tools/unitctl/unitctl/src/unitctl.rs
+++ b/tools/unitctl/unitctl/src/unitctl.rs
@@ -129,7 +129,7 @@ pub(crate) enum Commands {
#[command(about = "List all configured Unit applications")]
Apps(ApplicationArgs),
- #[command(about = "Export the current configuration of UNIT")]
+ #[command(about = "Export the current configuration of Unit")]
Export {
#[arg(required = true, short = 'f', help = "tarball filename to save configuration to")]
filename: String,