Open
Conversation
Psych.safe_load changed it's method signature and requires keyword args for 'permitted_classes' Update the calls to Psych.safe_load and add it as an explicit gem dependency with a pessimistic lock on the version.
marksiemers
commented
Jan 9, 2022
Author
marksiemers
left a comment
There was a problem hiding this comment.
Thanks for providing this gem. We're looking to incorporate it with our pre-push git hooks, but need it to work with the latest versions of Psych and Ruby.
| spec.add_development_dependency 'rubocop-rspec' | ||
| spec.add_development_dependency 'simplecov' | ||
| spec.add_development_dependency 'sqlite3', "~> 1.3.13" | ||
| spec.add_development_dependency 'sqlite3', "~> 1.4.2" |
Author
There was a problem hiding this comment.
An earlier version of sqlite was not building on my Mac, this upgrade was to unblock me from running the setup and the tests.
| paths.map do |file| | ||
| metadata, *example_groups = file.read.split("---\n").reject(&:empty?).map do |yaml| | ||
| YAML.safe_load(yaml, [Symbol]) | ||
| YAML.safe_load(yaml, permitted_classes: [Symbol]) |
Author
There was a problem hiding this comment.
This version: YAML.safe_load(yaml, [Symbol]) was deprecated by Psych, then removed in version 4.
See commit here: ruby/psych@0767227#diff-659eac8589abc82c9a0ab3699e4e4be4774d9c09c6c9934af5d9dae0d264439cR322
Author
|
@pluff or @jaimerson - Any chance this could be reviewed? |
|
👀 |
The arguments were no longer accepted by the Git gem, updating to fix the method invocation to send a list of arguments (rather than two arguments with the second being an array)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Psych.safe_load changed it's method signature and requires
keyword args for 'permitted_classes'
Update the calls to Psych.safe_load and add it as an explicit
gem dependency with a pessimistic lock on the version.