diff --git a/README.md b/README.md index 4b85905d..17b45236 100644 --- a/README.md +++ b/README.md @@ -76,17 +76,17 @@ 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. - `update`: Update a repository in a namespace. - `delete`|`rm`: Delete a repository from a namespace. -- `resync`: Resynchronise a package in a repository. -- `status`: Get the synchronisation status for a package. +- `resync`: Resynchronize a package in a repository. +- `status`: Get the synchronization status for a package. - `tags`: Manage the tags for a package in a repository. - `add`: Add tags to a package in a repository. - `clear`: Clear all existing (non-immutable) tags from a package in a repository. diff --git a/cloudsmith_cli/cli/commands/policy/license.py b/cloudsmith_cli/cli/commands/policy/license.py index 6096f938..d7c8e39a 100644 --- a/cloudsmith_cli/cli/commands/policy/license.py +++ b/cloudsmith_cli/cli/commands/policy/license.py @@ -91,7 +91,7 @@ def ls(ctx, opts, owner, page, page_size): 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 39216d17..0c0b51a4 100644 --- a/cloudsmith_cli/cli/commands/policy/vulnerability.py +++ b/cloudsmith_cli/cli/commands/policy/vulnerability.py @@ -80,7 +80,7 @@ def ls(ctx, opts, owner, page, page_size): 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 c5e74125..b65ff223 100644 --- a/cloudsmith_cli/cli/commands/push.py +++ b/cloudsmith_cli/cli/commands/push.py @@ -189,7 +189,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 attempts -= 1 click.echo() @@ -209,7 +209,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 ): @@ -255,14 +255,14 @@ 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", ) 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"), @@ -431,7 +431,7 @@ def upload_files_and_create_package( if no_wait_for_sync: return - # 5. (optionally) Wait for the package to synchronise + # 5. (optionally) Wait for the package to synchronize wait_for_package_sync( ctx=ctx, opts=opts, 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 b11b448e..3957427b 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 ed9cbc81..a2907f7f 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 53aa7b03..4122f1bc 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 759c34f0..3bcffada 100644 --- a/cloudsmith_cli/cli/commands/upstream.py +++ b/cloudsmith_cli/cli/commands/upstream.py @@ -187,7 +187,7 @@ def func(ctx, opts, owner_repo, page, page_size): 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. @@ -254,7 +254,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. @@ -333,7 +333,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. @@ -418,7 +418,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 a8b41173..892e80c9 100644 --- a/cloudsmith_cli/cli/decorators.py +++ b/cloudsmith_cli/cli/decorators.py @@ -32,7 +32,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", @@ -50,9 +50,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 d879b197..7da8fd8e 100644 --- a/cloudsmith_cli/cli/tests/commands/test_repos.py +++ b/cloudsmith_cli/cli/tests/commands/test_repos.py @@ -61,14 +61,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"] )