Closed alsemyonov closed 5 years ago
Thanks for your contribution, it would be a great addition for this gem.
However, for better or worse, the gem's name is what it is, and I would not like to change it because of backward compatibility issues. Would you mind to refactor the PR in a way that current module naming is still used? For example, we could have two main classes FrontMatterParser::Parser
and FrontMatterParser::Writer
. We can discuss here the exact hierarchy beforehand, if you like.
I haven’t had changed your namespace, if you look at changes. I just provided two namespaces for other possible names. Anyone could just use any of them: your old one, universal one or specific new one :)
Telegraphed from my Fridge
10 нояб. 2018 г., в 10:45, Marc Busqué notifications@github.com написал(а):
Thanks for your contribution, it would be a great addition for this gem.
However, for better or worse, the gem's name is what it is, and I would not like to change it because of backward compatibility issues. Would you mind to refactor the PR in a way that current module naming is still used? For example, we could have two main classes FrontMatterParser::Parser and FrontMatterParser::Dumper. We can discuss here the exact hierarchy beforehand, if you like.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I see. As you say, it is backward compatible because requiring FrontMatterParser
acts just like before. However, I think the current implementation, even if very clever, is not a good idea for several reasons:
FrontMatterParser
module, which is weird).FrontMatterParser
module.I think it would be much simpler just to leave the FrontMatterParser
top namespace.
Great, thanks @alsemyonov . Let me some days to review the code and, if it is needed, start a code review to discuss with you the implementation details.
Ok, sure!
I have rewritten commit history without introducing unneeded namespaces.
Closing because the lack of feedback. But we can reopen it at any moment if you are still interested in this PR.
I have added a set of classes that provide abilities to write corresponding front matters to files. Also, I have introduced
FrontMatterWriter
andFrontMatter
namespaces, since now it not only parses but writes also, so I believe event the gem could be renamed after all.