Skip to content

Commit 1c78dea

Browse files
authored
Rename directories inside resources (#271)
* Rename directories inside resources * Fix tests * More renaming
1 parent d619e57 commit 1c78dea

File tree

102 files changed

+12
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+12
-12
lines changed

.prettierignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stuff we don't want prettier to ever to look into
22
tests/fixtures/collection/testorg/testcol/roles/
33
tests/fixtures/collection/testorg/testcol/.github/workflows/tests.yml
4-
tests/fixtures/project/ansible_project/collections/ansible_collections/project_org/project_repo/roles/run/README.md
5-
tests/fixtures/project/ansible_project/.github/workflows/tests.yml
6-
tests/fixtures/project/ansible_project/collections/ansible_collections/weather/demo/roles/run/README.md
4+
tests/fixtures/project/playbook_project/collections/ansible_collections/project_org/project_repo/roles/run/README.md
5+
tests/fixtures/project/playbook_project/.github/workflows/tests.yml
6+
tests/fixtures/project/playbook_project/collections/ansible_collections/weather/demo/roles/run/README.md

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ lines-between-types = 1 # Separate import/from with 1 line
351351

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

358358
[tool.ruff.lint.pydocstyle]

src/ansible_creator/resources/common/gitignore/__meta__.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
new_collection:
1+
collection_project:
22
additions:
33
template: False
44
value: ""
55

6-
ansible_project:
6+
playbook_project:
77
additions:
88
template: True
99
value: |

src/ansible_creator/subcommands/init.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ def _scaffold_collection(self) -> None:
119119
creator_version=self._creator_version,
120120
)
121121
copier = Copier(
122-
resources=["new_collection", *self.common_resources],
123-
resource_id="new_collection",
122+
resources=["collection_project", *self.common_resources],
123+
resource_id="collection_project",
124124
dest=self._init_path,
125125
output=self.output,
126126
templar=self._templar,
@@ -144,8 +144,8 @@ def _scaffold_playbook(self: Init) -> None:
144144
)
145145

146146
copier = Copier(
147-
resources=["ansible_project", *self.common_resources],
148-
resource_id="ansible_project",
147+
resources=["playbook_project", *self.common_resources],
148+
resource_id="playbook_project",
149149
dest=self._init_path,
150150
output=self.output,
151151
templar=self._templar,

tests/units/test_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_run_success_ansible_project(
167167
# recursively assert files created
168168
cmp = dircmp(
169169
str(tmp_path / "new_project"),
170-
str(FIXTURES_DIR / "project" / "ansible_project"),
170+
str(FIXTURES_DIR / "project" / "playbook_project"),
171171
)
172172
diff = has_differences(dcmp=cmp, errors=[])
173173
assert diff == [], diff

0 commit comments

Comments
 (0)