ruby / gem_rbs_collection

A collection of RBS for gems.
MIT License
247 stars 101 forks source link

Update test script #502

Closed pocke closed 5 months ago

pocke commented 5 months ago

This PR updates the test scripts system to avoid arbitrary code execution on testing. It is not a security risk for now, but this change is necessary for the new PR merging system I'm constructing.

This PR also includes the following improvements.

How

Preivously, _scripts/test files in each gem had testing logic. This PR removed the script and moved the logic to bin/test script.

To avoid code execution, Ruby DSL files (Steepfile and Gemfile) are generated by bin/test script.

I also add metadata.yaml file to declare test dependencies. If the gem has dependencies only for the testing, the user needs to write the dependencies to _test/matadata.yaml file. This file is only for testing, so it does not affect the RBS user.

pocke commented 5 months ago

But, I feel that it would be good to provide guidelines on how to respond to existing PR authors.

@ksss

I'll take over existing PRs. I think I can merge most PRs. If I cannot merge a PR, I'll comment how to treat this change into the individual PR.

I have a suggestion for bin/test: how about putting help message out to help newcomers?

@ybiquitous

Thanks for your suggestion. It looks good! But I'd like to apply this change in another PR after this PR merges. The CI process for this PR is really heavy because the CI runs for all gems on this PR. I'll create a PR with your suggestion. Thanks.

ybiquitous commented 5 months ago

I'll create a PR with your suggestion. Thanks.

Never mind. Glad to hear! 👍🏼