Skip to content

Conversation

@marksiemers
Copy link

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.

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.
Copy link
Author

@marksiemers marksiemers left a comment

Choose a reason for hiding this comment

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

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"
Copy link
Author

Choose a reason for hiding this comment

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

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])
Copy link
Author

@marksiemers marksiemers Jan 9, 2022

Choose a reason for hiding this comment

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

This version: YAML.safe_load(yaml, [Symbol]) was deprecated by Psych, then removed in version 4.

See commit here: ruby/psych@0767227#diff-659eac8589abc82c9a0ab3699e4e4be4774d9c09c6c9934af5d9dae0d264439cR322

@marksiemers
Copy link
Author

@pluff or @jaimerson - Any chance this could be reviewed?

@mculp
Copy link

mculp commented Dec 17, 2022

👀

@kml kml changed the title [#123] Update to Psych 4.0.x Update to Psych 4.0.x Jan 17, 2023
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)
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.

3 participants