Skip to content

Commit

Permalink
Rename directories inside resources (#271)
Browse files Browse the repository at this point in the history
* Rename directories inside resources

* Fix tests

* More renaming
  • Loading branch information
shatakshiiii authored Jul 31, 2024
1 parent d619e57 commit 1c78dea
Show file tree
Hide file tree
Showing 102 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stuff we don't want prettier to ever to look into
tests/fixtures/collection/testorg/testcol/roles/
tests/fixtures/collection/testorg/testcol/.github/workflows/tests.yml
tests/fixtures/project/ansible_project/collections/ansible_collections/project_org/project_repo/roles/run/README.md
tests/fixtures/project/ansible_project/.github/workflows/tests.yml
tests/fixtures/project/ansible_project/collections/ansible_collections/weather/demo/roles/run/README.md
tests/fixtures/project/playbook_project/collections/ansible_collections/project_org/project_repo/roles/run/README.md
tests/fixtures/project/playbook_project/.github/workflows/tests.yml
tests/fixtures/project/playbook_project/collections/ansible_collections/weather/demo/roles/run/README.md
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ lines-between-types = 1 # Separate import/from with 1 line

[tool.ruff.lint.per-file-ignores]
"_version.py" = ["SIM108"]
"src/ansible_creator/resources/new_collection/tests/**" = ["SLF001", "S101", "S602", "T201"]
"src/ansible_creator/resources/new_collection/tests/unit/__init__.py" = ["D104"]
"src/ansible_creator/resources/collection_project/tests/**" = ["SLF001", "S101", "S602", "T201"]
"src/ansible_creator/resources/collection_project/tests/unit/__init__.py" = ["D104"]
"tests/**" = ["SLF001", "S101", "S602", "T201"]

[tool.ruff.lint.pydocstyle]
Expand Down
4 changes: 2 additions & 2 deletions src/ansible_creator/resources/common/gitignore/__meta__.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
new_collection:
collection_project:
additions:
template: False
value: ""

ansible_project:
playbook_project:
additions:
template: True
value: |
Expand Down
8 changes: 4 additions & 4 deletions src/ansible_creator/subcommands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def _scaffold_collection(self) -> None:
creator_version=self._creator_version,
)
copier = Copier(
resources=["new_collection", *self.common_resources],
resource_id="new_collection",
resources=["collection_project", *self.common_resources],
resource_id="collection_project",
dest=self._init_path,
output=self.output,
templar=self._templar,
Expand All @@ -144,8 +144,8 @@ def _scaffold_playbook(self: Init) -> None:
)

copier = Copier(
resources=["ansible_project", *self.common_resources],
resource_id="ansible_project",
resources=["playbook_project", *self.common_resources],
resource_id="playbook_project",
dest=self._init_path,
output=self.output,
templar=self._templar,
Expand Down
2 changes: 1 addition & 1 deletion tests/units/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_run_success_ansible_project(
# recursively assert files created
cmp = dircmp(
str(tmp_path / "new_project"),
str(FIXTURES_DIR / "project" / "ansible_project"),
str(FIXTURES_DIR / "project" / "playbook_project"),
)
diff = has_differences(dcmp=cmp, errors=[])
assert diff == [], diff
Expand Down

0 comments on commit 1c78dea

Please sign in to comment.