senny / sablon

Ruby Document Template Processor based on docx templates and Mail Merge fields.
MIT License
443 stars 126 forks source link

Drop Ruby 2.2 and move to GitHub Actions #191

Closed tagliala closed 2 months ago

tagliala commented 7 months ago
tagliala commented 7 months ago

Require GitHub actions to be enabled for this repo

Working run: https://github.com/tagliala/sablon/actions/runs/7740005756

tagliala commented 2 months ago

Rebased. There are failures against Ruby 3.4.0-dev because of OpenStruct (I guess)

senny commented 2 months ago

Hi @tagliala

Sorry for the huge delay on my part. Thanks for the effort to bring back CI. I'll get to this shortly 💛

tagliala commented 2 months ago

Thanks, no worries, I'm also removing OpenStruct

tagliala commented 2 months ago

Done, two separate commits, if you prefer to make two different PRs

https://github.com/tagliala/sablon/actions/runs/9676026596

senny commented 2 months ago

@tagliala I think I would prefer to keep the simplicity from OpenStruct, can we declare ostruct as a development dependency instead of removing?

tagliala commented 2 months ago

can we declare ostruct as a development dependency instead of removing?

I've tried, but Ruby 2.2 complains (because the vendored gem contains a safe navigation operator).

I think I can do that the same. Will try and let you know

tagliala commented 2 months ago

Done. I don't know a better way to do this, IIRC gemspec does not allow conditional gem requirements

senny commented 2 months ago

You could try with add_development_dependency

senny commented 2 months ago

Or is the issue that you only want to declare it for certain Ruby versions? It should probably work with past Ruby Versions as well if we declare it. Or did you encounter problems doing so?

tagliala commented 2 months ago

Or did you encounter problems doing so?

You can see the problem here: https://github.com/tagliala/sablon/actions/runs/9676486643/job/26696133567?pr=1

There is a safe navigation operator in ostruct 0.1.0 which is being incorrectly bundled by 2.2

I don't know if this can be fixed and released as 0.1.1

Otherwise if you want we can drop support for 2.2 in a separate PR

senny commented 2 months ago

Thanks for the details. I think it's safe to drop 2.2. That version has been EOL for a while.

tagliala commented 2 months ago

Done.

All green here: https://github.com/tagliala/sablon/actions/runs/9676603604

senny commented 2 months ago

awesome! Very glad to have CI back. Thank you so much for your work and patience 💛