From 98bd82c647e87e9f0a6bae5703b7d8631977517e Mon Sep 17 00:00:00 2001 From: Joel Vega Date: Mon, 13 Nov 2023 11:42:44 -0400 Subject: [PATCH] fix(refactor): Change "service-groups" to "groups" (#86) Changed "service-groups" to "groups" and update documentation Solving issue SPEC: Rename spec service-groups to groups #60 --- .containers-sugar.yaml | 2 +- README.md | 2 +- containers_sugar/sugar.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.containers-sugar.yaml b/.containers-sugar.yaml index 30c4e17..1a962bc 100644 --- a/.containers-sugar.yaml +++ b/.containers-sugar.yaml @@ -4,7 +4,7 @@ env-file: .env defaults: group: {{ env.KXGR_GROUP }} project-name: sugar-{{ env.KXGR_PROJECT_NAME }} -service-groups: +groups: - name: group1 project-name: project1 # optional compose-path: tests/containers/group1/compose.yaml diff --git a/README.md b/README.md index dc688f6..148a0b0 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ version: 1.0 compose-app: docker-compose default: group: {{ env.ENV }} -service-groups: +groups: - name: group1 project-name: project1 compose-path: containers/tests/group1/compose.yaml diff --git a/containers_sugar/sugar.py b/containers_sugar/sugar.py index 2b23bac..4dcf5db 100644 --- a/containers_sugar/sugar.py +++ b/containers_sugar/sugar.py @@ -117,7 +117,7 @@ def _check_config_file(self): return Path(self.config_file).exists() def _filter_service_group(self): - groups = self.config['service-groups'] + groups = self.config['groups'] if not self.args.get('service_group'): default_group = self.defaults.get('group') @@ -279,7 +279,7 @@ def _verify_args(self): ) def _verify_config(self): - if not len(self.config['service-groups']): + if not len(self.config['groups']): KxgrLogs.raise_error( 'No service groups found.', KxgrErrorType.KXGR_INVALID_CONFIGURATION,