Conversation
Owner
|
Hi @fxn thanks for submitting this. Happy to help get this merged this in, seems like there might be an unrelated 2.7 error and then just needs linting via standard. |
Owner
|
I merged in a PR that drops Ruby 2.7 support, so if you rebase or merge latest development, it'll "fix" the unit test that is failing in 2.7 |
Contributor
Author
|
Thanks @drwl! Branch updated and standard is green now. |
Owner
|
Just fyi, I released 4.16.0 and it should contain this change. |
Contributor
Author
|
@drwl that's awesome, thank you! |
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.
Hi!
This PR proposes passing
.annotaterb.ymlthrough ERB, as Rails does withconfig/database.ymlor fixtures, for instance.Real use case is the ability to compute
model_dirdynamically. As you know, inannotatethe configuration can be expressed in Ruby, and therefore it can be as dynamic as you need to. But if you migrate toannotaterb, that is lost.I wrote this patch on behalf of a client of mine (Gusto), whose main application has more than two hundred model dirs. They are now hard-coded in
.annotaterb.yml, but you need to maintain that list, verify consistency in CI, etc. On the other hand, if you could compute the list in the config file itself, you could forget about it (as it was the case withannotate).I have created a test suite for
load_config, and documentation is also updated (README and migration guide). The variableyaml_codeis named after the parameter in the signature of the called method.The CHANGELOG seems more ad-hoc, maybe you prefer to modify this one? Please just tell me if you'd like me to do it anyway :).