Skip to content

Commit

Permalink
fix(refactor): Change "service-groups" to "groups" (#86)
Browse files Browse the repository at this point in the history
Changed "service-groups" to "groups" and update documentation
Solving issue SPEC: Rename spec service-groups to groups #60
  • Loading branch information
joel5vega committed Nov 13, 2023
1 parent 96cf533 commit 98bd82c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .containers-sugar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions containers_sugar/sugar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 98bd82c

Please sign in to comment.