Adds option to YAML load of database.yml so that Psych doesn't complain.#10
Adds option to YAML load of database.yml so that Psych doesn't complain.#10infews wants to merge 2 commits intotestdouble:mainfrom infews:main
Conversation
| end | ||
|
|
||
| def database_yaml | ||
| YAMLLoader.load_file(database_yaml_full_path) |
There was a problem hiding this comment.
🤔 I thought my changes in that file fixed this issue - but perhaps I missed something.
YAMLLoader is just wrapping YAML, and forcing aliases in the event of it needing to.
https://github.com/testdouble/test_data/blob/main/lib/test_data/yaml_loader.rb#L3-L5
The YAMLLoader.load_file method doesn't take a second argument.
It's still not working on your end?
There was a problem hiding this comment.
No. Which is why I added the flag.
There was a problem hiding this comment.
Sorry if what I said was a little confusing.
Where you added that flag -> that method doesn't take in a second argument. YAMLLoader is a wrapper around YAML, that attempts to take care of the alias problem.
Were you using the most recent gem release? That doesn't have the YAMLLoader changes in it.
I'm assuming that the maintainer isn't going to cut a new release until full 7.1 support is available (it's a work in progress at the moment).
There was a problem hiding this comment.
Def using the gem release.
I've dropped this gem for now b/c I'm using SQLite and doing a full extraction for an alternate DB adapter is beyond what I have time for right now. Will look again later. Thanks!
I ran install against a Rails 7.1 app and got this stack trace:
I'm not sure why this wouldn't happen always, but FWIW, this is my database.yml
This change to
config.rbgot what looks like the right lines are inserted into mydatabase.yml