Skip to content

Commit 0dcd3a9

Browse files
javorszkyac000
authored andcommitted
tools/unitctl: rename UNIT -> Unit
The correct capitalisation of the name of the software is Unit, not all caps. Signed-off-by: Gabor Javorszky <[email protected]> [ A bunch more s/UNIT/Unit/ - Andrew ] Signed-off-by: Andrew Clayton <[email protected]>
1 parent cc863e1 commit 0dcd3a9

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

tools/unitctl/GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ manpage: target/man/$(OUTPUT_BINARY).1.gz ## Builds man page
110110
.openapi_cache:
111111
$Q mkdir -p $@
112112

113-
## Generate (or regenerate) UNIT API access code via a OpenAPI spec
113+
## Generate (or regenerate) Unit API access code via a OpenAPI spec
114114
.PHONY: openapi-generate
115115
openapi-generate: .openapi_cache
116116
$Q if [ ! -f "$(CURDIR)/unit-openapi/src/models/mod.rs" ]; then
117-
echo "$(M) generating UNIT API access code via a OpenAPI spec"
117+
echo "$(M) generating Unit API access code via a OpenAPI spec"
118118
OPENAPI_GENERATOR_VERSION="$(OPENAPI_GENERATOR_VERSION)" \
119119
OPENAPI_GENERATOR_DOWNLOAD_CACHE_DIR="$(CURDIR)/.openapi_cache" \
120120
$(CURDIR)/build/openapi-generator-cli.sh \

tools/unitctl/man/unitctl.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.\"
33
.TH UNITCTL "1" "2022-12-29" "%%VERSION%%" "unitctl"
44
.SH NAME
5-
unitctl \- NGINX UNIT Control Utility
5+
unitctl \- NGINX Unit Control Utility
66
.SH SYNOPSIS
77
unitctl [\fI\,FLAGS\/\fR] [\fI\,OPTIONS\/\fR] [\fI\,FILE\/\fR]...
88
.SH DESCRIPTION

tools/unitctl/pkg/brew/unitctl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Unitctl < Formula
2-
desc "CLI interface to the NGINX UNIT Control API"
2+
desc "CLI interface to the NGINX Unit Control API"
33
homepage "https://github.com/nginxinc/unit-rust-sdk"
44
version "0.3.0"
55
package_name = "unitctl"

tools/unitctl/pkg/brew/unitctl.rb.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Unitctl < Formula
2-
desc "CLI interface to the NGINX UNIT Control API"
2+
desc "CLI interface to the NGINX Unit Control API"
33
homepage "https://github.com/nginxinc/unit-rust-sdk"
44
version "$VERSION"
55
package_name = "$PACKAGE_NAME"

tools/unitctl/unit-client-rs/src/unit_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use unit_openapi::apis::{
2121
};
2222
use unit_openapi::models::{ConfigApplication, ConfigListener, Status};
2323

24-
const USER_AGENT: &str = concat!("UNIT CLI/", env!("CARGO_PKG_VERSION"), "/rust");
24+
const USER_AGENT: &str = concat!("Unit CLI/", env!("CARGO_PKG_VERSION"), "/rust");
2525

2626
custom_error! {pub UnitClientError
2727
OpenAPIError { source: OpenAPIError } = "OpenAPI error",
@@ -201,7 +201,7 @@ impl UnitClient {
201201
}
202202
}
203203

204-
/// Sends a request to UNIT and deserializes the JSON response body into the value of type `RESPONSE`.
204+
/// Sends a request to Unit and deserializes the JSON response body into the value of type `RESPONSE`.
205205
pub async fn send_request_and_deserialize_response<RESPONSE: for<'de> serde::Deserialize<'de>>(
206206
&self,
207207
mut request: Request<Body>,

tools/unitctl/unitctl/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "unitctl"
3-
description = "CLI interface to the NGINX UNIT Control API"
3+
description = "CLI interface to the NGINX Unit Control API"
44
version = "0.4.0-beta"
55
authors = ["Elijah Zupancic"]
66
edition = "2021"
@@ -38,7 +38,7 @@ tar = "0.4.41"
3838
copyright = "2022, F5"
3939
license-file = ["../LICENSE.txt", "0"]
4040
extended-description = """\
41-
A utility for controlling NGINX UNIT."""
41+
A utility for controlling NGINX Unit."""
4242
section = "utility"
4343
priority = "optional"
4444
assets = [
@@ -48,7 +48,7 @@ assets = [
4848

4949
[package.metadata.generate-rpm]
5050
summary = """\
51-
A utility for controlling NGINX UNIT."""
51+
A utility for controlling NGINX Unit."""
5252
section = "utility"
5353
priority = "optional"
5454
assets = [

tools/unitctl/unitctl/src/cmd/edit.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub(crate) async fn cmd(cli: &UnitCtl, output_format: OutputFormat) -> Result<()
4141
.tempfile()
4242
.map_err(|e| UnitctlError::IoError { source: e })?;
4343

44-
// Pretty format JSON received from UNIT and write to the temporary file
44+
// Pretty format JSON received from Unit and write to the temporary file
4545
serde_json::to_writer_pretty(temp_file.as_file_mut(), &current_config)
4646
.map_err(|e| UnitctlError::SerializationError { message: e.to_string() })?;
4747

@@ -53,15 +53,15 @@ pub(crate) async fn cmd(cli: &UnitCtl, output_format: OutputFormat) -> Result<()
5353
open_editor(temp_file_path)?;
5454
let after_edit_mod_time = temp_file_path.metadata().ok().map(|m| m.modified().ok());
5555

56-
// Check if file was modified before sending to UNIT
56+
// Check if file was modified before sending to Unit
5757
if let (Some(before), Some(after)) = (before_edit_mod_time, after_edit_mod_time) {
5858
if before == after {
59-
eprintln!("File was not modified - no changes will be sent to UNIT");
59+
eprintln!("File was not modified - no changes will be sent to Unit");
6060
return Ok(());
6161
}
6262
};
6363

64-
// Send edited file to UNIT to overwrite current configuration
64+
// Send edited file to Unit to overwrite current configuration
6565
send_and_validate_config_deserialize_response(&client, "PUT", "/config", Some(&inputfile))
6666
.await
6767
.and_then(|status| output_format.write_to_stdout(&status))

tools/unitctl/unitctl/src/unitctl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub(crate) enum Commands {
129129
#[command(about = "List all configured Unit applications")]
130130
Apps(ApplicationArgs),
131131

132-
#[command(about = "Export the current configuration of UNIT")]
132+
#[command(about = "Export the current configuration of Unit")]
133133
Export {
134134
#[arg(required = true, short = 'f', help = "tarball filename to save configuration to")]
135135
filename: String,

0 commit comments

Comments
 (0)