ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.35k stars 900 forks source link

Add a block option to checkout_git_repository #23235

Closed agrare closed 1 month ago

agrare commented 1 month ago

Currently it is up to the caller to create the temporary directory, pass that to checkout_git_repository, and clean that directory up.

If a caller doesn't need to keep the directory around across method invocations they could pass a block in and let the checkout_git_repository method clean up the temp directory.

Ref: https://github.com/ManageIQ/manageiq-providers-embedded_terraform/pull/75#discussion_r1777076972

Follow-ups:

Fryguy commented 1 month ago

@agrare Would it be possible to add specs for this?

agrare commented 1 month ago

Yeah let me take a look at it

miq-bot commented 1 month ago

Checked commit https://github.com/agrare/manageiq/commit/f243d3aa8067c03d913e422054fda62e7c6ae7c8 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint 3 files checked, 0 offenses detected Everything looks fine. :cake: