Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert project file existence using patterns #2049

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Assert project file existence using patterns #2049

merged 1 commit into from
Oct 18, 2024

Conversation

KaanOzkan
Copy link
Contributor

Motivation

Came up in #2046

Implementation

Use the built in pattern support for Dir[]

Tests

@KaanOzkan KaanOzkan requested a review from a team as a code owner October 16, 2024 18:28
# Assert that `path` exists inside project.
# `Path` can include patterns such as `*`, useful for testing RBIs for real gems
sig { params(path: String).void }
def assert_project_file_exist_with_pattern(path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def assert_project_file_exist_with_pattern(path)
def assert_project_file_match_pattern(path)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or even shorter:

Suggested change
def assert_project_file_exist_with_pattern(path)
def assert_project_file_match(path)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Changed the name.

@KaanOzkan KaanOzkan merged commit a03cc32 into main Oct 18, 2024
28 of 29 checks passed
@KaanOzkan KaanOzkan deleted the ko/rbi-assert branch October 18, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants