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

Ruby 2.5 compatibility #12

Closed
wants to merge 1 commit into from

Conversation

pablobm
Copy link

@pablobm pablobm commented Jul 26, 2021

The recent change at #11 unfortunately broke this library for Ruby 2.5 and prior. We had some momentary CI issues over at Administrate (eg: thoughtbot/administrate#2023) due to this, showing the following error:

Failure/Error: YAML.safe_load(string, permitted_classes: allowlist_classes)

ArgumentError:
  unknown keyword: permitted_classes
# ./lib/front_matter_parser/loader/yaml.rb:22:in `call'
# ./lib/front_matter_parser/parser.rb:67:in `call'

Having said that... Ruby 2.5 is now End-of-Life, so perhaps you don't wish to support it any more and prefer to close this PR.

But! :-) although we at Administrate may drop Ruby 2.5 soon, we haven't done it just yet. Other libraries that may depend on this gem may be in a similar situation, so perhaps this you'd consider this change as a stopgap measure while everyone adapts.

Either decision would probably be correct!

@waiting-for-dev
Copy link
Owner

Hi @pablobm, thanks for your contribution!

Having said that... Ruby 2.5 is now End-of-Life

Yeah, it was my reasoning. Supporting the same versions that Ruby does is probably the most sensible approach when balancing maintainability and backward-compatibility support.

On top of that, besides a renaming, this library has been stable since 2018, with no new features added. At this point, I'm neither planning to add anything new, as I think it does what it is supposed to do and nothing more. For these reasons, it's reasonably safe to fix your dependency to 1.0.0 as a temporary workaround until you deprecate 2.5.

Having said that, I won't have any problem if, at some point, it becomes a blocker for your project. So, I'm going to close it for now, but if at some point you do need it to be merged, please, ping me!

@pablobm
Copy link
Author

pablobm commented Jul 29, 2021

Sounds good! Thank you for your thoughts.

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.

2 participants