diff --git a/README.md b/README.md index c586b108..9daa471e 100644 --- a/README.md +++ b/README.md @@ -85,10 +85,10 @@ The CLI currently supports the following commands (and sub-commands): - `vagrant`: Push (upload) a new Vagrant package upstream. - `quarantine`|`block`: Manage quarantined packages in a repository. - `add`: Add a package to quarantine. - - `remove`|`rm`|`restore`: Add a package to quarantine. -- `quota`: Quota limits and history for a organisation. - - `limits`: Display the Quota (bandwidth & storage usage/limits) for a specific organisation. - - `history`: Display the Quota History (upload, download, and storage usage/limits) for a specific organisation. + - `remove`|`rm`|`restore`: Remove a package from quarantine. +- `quota`: Quota limits and history for a organization. + - `limits`: Display the Quota (bandwidth & storage usage/limits) for a specific organization. + - `history`: Display the Quota History (upload, download, and storage usage/limits) for a specific organization. - `repositories`|`repos`: Manage repositories. - `create`|`new`: Create a new repository in a namespace. - `get`|`list`|`ls`: List repositories for a user, in a namespace or get details for a specific repository. diff --git a/cloudsmith_cli/cli/commands/policy/license.py b/cloudsmith_cli/cli/commands/policy/license.py index 3e1063eb..b949263f 100644 --- a/cloudsmith_cli/cli/commands/policy/license.py +++ b/cloudsmith_cli/cli/commands/policy/license.py @@ -87,7 +87,7 @@ def ls(ctx, opts, owner, page, page_size, page_all): List license policies. This requires appropriate permissions for the owner (a member of the - organisation and a valid API key). + organization and a valid API key). - OWNER: Specify the OWNER namespace (i.e. org) diff --git a/cloudsmith_cli/cli/commands/policy/vulnerability.py b/cloudsmith_cli/cli/commands/policy/vulnerability.py index ff72b676..25b4b241 100644 --- a/cloudsmith_cli/cli/commands/policy/vulnerability.py +++ b/cloudsmith_cli/cli/commands/policy/vulnerability.py @@ -77,7 +77,7 @@ def ls(ctx, opts, owner, page, page_size, page_all): List vulnerability policies. This requires appropriate permissions for the owner (a member of the - organisation and a valid API key). + organization and a valid API key). - OWNER: Specify the OWNER namespace (i.e. org) diff --git a/cloudsmith_cli/cli/commands/push.py b/cloudsmith_cli/cli/commands/push.py index ab107211..ba66d5e3 100644 --- a/cloudsmith_cli/cli/commands/push.py +++ b/cloudsmith_cli/cli/commands/push.py @@ -648,7 +648,7 @@ def create_package(ctx, opts, owner, repo, package_type, skip_errors, **kwargs): def wait_for_package_sync( ctx, opts, owner, repo, slug, wait_interval, skip_errors, attempts=3 ): - """Wait for a package to synchronise (or fail).""" + """Wait for a package to synchronize (or fail).""" # pylint: disable=too-many-locals use_stderr = utils.should_use_stderr(opts) @@ -670,7 +670,7 @@ def display_status(current): ) start = datetime.now() - context_msg = "Failed to synchronise file!" + context_msg = "Failed to synchronize file!" with handle_api_exceptions( ctx, opts=opts, context_msg=context_msg, reraise_on_error=skip_errors ): @@ -733,7 +733,7 @@ def display_status(current): if ok: click.secho( - "Package synchronised successfully in %(seconds)s second(s)!" + "Package synchronized successfully in %(seconds)s second(s)!" % {"seconds": click.style(str(seconds), bold=True)}, fg="green", err=use_stderr, @@ -741,7 +741,7 @@ def display_status(current): return click.secho( - "Package failed to synchronise in %(seconds)s during stage: %(stage)s" + "Package failed to synchronize in %(seconds)s during stage: %(stage)s" % { "seconds": click.style(str(seconds), bold=True), "stage": click.style(stage_str or "Unknown", fg="yellow"), diff --git a/cloudsmith_cli/cli/commands/quota/command.py b/cloudsmith_cli/cli/commands/quota/command.py index 60fde227..d6e4fffc 100644 --- a/cloudsmith_cli/cli/commands/quota/command.py +++ b/cloudsmith_cli/cli/commands/quota/command.py @@ -14,7 +14,7 @@ @click.pass_context def quota(ctx, opts): # pylink: disable=unused-argument """ - Display Quota limits and history for an organisation. + Display Quota limits and history for an organization. See the help for subcommands for more information on each. """ diff --git a/cloudsmith_cli/cli/commands/quota/history.py b/cloudsmith_cli/cli/commands/quota/history.py index b465b539..ed857cfb 100644 --- a/cloudsmith_cli/cli/commands/quota/history.py +++ b/cloudsmith_cli/cli/commands/quota/history.py @@ -92,7 +92,7 @@ def usage(ctx, opts, owner, oss): Retrieve Quota history for namespace. This requires appropriate permissions for the owner (a member of the - organisation and a valid API key). + organization and a valid API key). - OWNER: Specify the OWNER namespace (i.e. org) diff --git a/cloudsmith_cli/cli/commands/quota/quota.py b/cloudsmith_cli/cli/commands/quota/quota.py index 94ddb215..6535c2a5 100644 --- a/cloudsmith_cli/cli/commands/quota/quota.py +++ b/cloudsmith_cli/cli/commands/quota/quota.py @@ -77,7 +77,7 @@ def usage(ctx, opts, owner, oss): Retrieve Quota limits. This requires appropriate permissions for the owner (a member of the - organisation and a valid API key). + organization and a valid API key). - OWNER: Specify the OWNER namespace (i.e. org) diff --git a/cloudsmith_cli/cli/commands/status.py b/cloudsmith_cli/cli/commands/status.py index b86a9e20..98ad89c0 100644 --- a/cloudsmith_cli/cli/commands/status.py +++ b/cloudsmith_cli/cli/commands/status.py @@ -22,7 +22,7 @@ @click.pass_context def status(ctx, opts, owner_repo_package): """ - Get the synchronisation status for a package. + Get the synchronization status for a package. - OWNER/REPO/PACKAGE: Specify the OWNER namespace (i.e. user or org), the REPO name where the package is stored, and the PACKAGE name (slug) of the diff --git a/cloudsmith_cli/cli/commands/upstream.py b/cloudsmith_cli/cli/commands/upstream.py index d6252613..5e73ae8a 100644 --- a/cloudsmith_cli/cli/commands/upstream.py +++ b/cloudsmith_cli/cli/commands/upstream.py @@ -204,7 +204,7 @@ def func(ctx, opts, owner_repo, page, page_size, page_all): func.__doc__ = f""" List {upstream_fmt} upstreams for a repository. - This requires appropriate permissions for the owner (a member of the organisation, repository privileges and a valid API key). + This requires appropriate permissions for the owner (a member of the organization, repository privileges and a valid API key). - OWNER/REPO: Specify the OWNER namespace (organization) and REPO (repository) to target a specific Cloudsmith repository. @@ -273,7 +273,7 @@ def func(ctx, opts, owner_repo, upstream_config_file): func.__doc__ = f""" Create a {upstream_fmt} upstream for a repository. - This requires appropriate permissions for the owner (a member of the organisation, repository privileges and a valid API key). + This requires appropriate permissions for the owner (a member of the organization, repository privileges and a valid API key). - OWNER/REPO: Specify the OWNER namespace (organization) and REPO (repository) to target a specific Cloudsmith repository. @@ -354,7 +354,7 @@ def func(ctx, opts, owner_repo_slug_perm, upstream_config_file): func.__doc__ = f""" Update a {upstream_fmt} upstream for a repository. - This requires appropriate permissions for the owner (a member of the organisation, repository privileges and a valid API key). + This requires appropriate permissions for the owner (a member of the organization, repository privileges and a valid API key). - OWNER/REPO/SLUG_PERM: Specify the OWNER namespace (organization), REPO (repository) and SLUG_PERM (upstream) to target a specific upstream belonging to a repo. @@ -441,7 +441,7 @@ def func(ctx, opts, owner_repo_slug_perm, yes): func.__doc__ = f""" Delete a {upstream_fmt} upstream for a repository. - This requires appropriate permissions for the owner (a member of the organisation, repository privileges and a valid API key). + This requires appropriate permissions for the owner (a member of the organization, repository privileges and a valid API key). - OWNER/REPO/SLUG_PERM: Specify the OWNER namespace (organization), REPO (repository) and SLUG_PERM (upstream) to target a specific upstream belonging to a repo. diff --git a/cloudsmith_cli/cli/decorators.py b/cloudsmith_cli/cli/decorators.py index ecefa3c1..1eca1433 100644 --- a/cloudsmith_cli/cli/decorators.py +++ b/cloudsmith_cli/cli/decorators.py @@ -47,7 +47,7 @@ def common_package_action_options(f): "--no-wait-for-sync", default=False, is_flag=True, - help="Don't wait for package synchronisation to complete before exiting.", + help="Don't wait for package synchronization to complete before exiting.", ) @click.option( "-I", @@ -65,9 +65,9 @@ def common_package_action_options(f): "--sync-attempts", default=3, type=int, - help="Number of times to attempt package synchronisation. If the " + help="Number of times to attempt package synchronization. If the " "package fails the first time, the client will attempt to " - "automatically resynchronise it.", + "automatically resynchronize it.", ) @click.pass_context @functools.wraps(f) diff --git a/cloudsmith_cli/cli/tests/commands/test_repos.py b/cloudsmith_cli/cli/tests/commands/test_repos.py index 3f6c990b..7dad2696 100644 --- a/cloudsmith_cli/cli/tests/commands/test_repos.py +++ b/cloudsmith_cli/cli/tests/commands/test_repos.py @@ -62,14 +62,14 @@ def parse_table(output): return dict(zip(column_headers, row_values)) -def assert_output_is_equal_to_repo_config(output, organisation, repo_config_file_path): +def assert_output_is_equal_to_repo_config(output, organization, repo_config_file_path): output_table = parse_table(output) repo_config = json.loads(repo_config_file_path.read_text()) assert output_table["Name"] == repo_config["name"] assert output_table["Type"] == repo_config["repository_type_str"] assert ( output_table["Owner / Repository (Identifier)"] - == organisation + "/" + repo_config["slug"] + == organization + "/" + repo_config["slug"] )