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

Filter versions while testing #286

Merged
merged 5 commits into from
Sep 30, 2024
Merged

Filter versions while testing #286

merged 5 commits into from
Sep 30, 2024

Conversation

KaanOzkan
Copy link
Contributor

@KaanOzkan KaanOzkan commented Sep 27, 2024

Preliminary support for testing annotations with versions.

In a future improvement we should test all versions and not just one used in CI which should be the latest version: #287

@KaanOzkan KaanOzkan force-pushed the ko/filter-version-in-test branch from cf6565b to 04ae129 Compare September 27, 2024 19:49
@KaanOzkan KaanOzkan changed the title Ko/filter version in test Filter versions while testing Sep 27, 2024
@KaanOzkan KaanOzkan force-pushed the ko/filter-version-in-test branch 3 times, most recently from 538b616 to 0ad1695 Compare September 27, 2024 20:14
@KaanOzkan KaanOzkan marked this pull request as ready for review September 27, 2024 20:32
@KaanOzkan KaanOzkan requested a review from a team as a code owner September 27, 2024 20:32
@KaanOzkan KaanOzkan force-pushed the ko/filter-version-in-test branch from f9e8b05 to f12cd6c Compare September 30, 2024 14:12
@KaanOzkan KaanOzkan force-pushed the ko/filter-version-in-test branch from f12cd6c to f0e3028 Compare September 30, 2024 15:21
Copy link
Contributor

@Morriar Morriar left a comment

Choose a reason for hiding this comment

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

Thanks!


private

sig { params(gem_name: String, annotations_file: String).returns(String) }
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this should go in the parent class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Runtime doesn't need it at the moment but yeah it's not specific to static. I'll move it.


sig { params(gem_name: String, annotations_file: String).returns(String) }
def filter_versions_from_annotation(gem_name, annotations_file)
gem_version = ::Gem::Version.new(gem_version_from_gemfile_lock(gem_name))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe the upstream gem_version_from_gemfile_lock should return a Version instance rather than a string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that aligns better with the name. I can add a to_s to the usages in Spoom that expects a string. I'll unblock rbi-central with the current change and bump spoom in another PR after it's implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants