-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: optionally output to json #87
Conversation
This code is still missing test cases. But I have tested it locally and it appears to work well. I will move this from a draft once I have added test cases. |
@macblazer I'd appreciate an opinion on this PR. Are you okay with mixing the JSON generation into the single bom_builder class or should there be two builders? Ideally, to do this would mean re-writing a good portion of the library to generate a model and then use serialization to output the XML or JSON. However, I do not have time to do this. |
I think this approach is acceptable for now. The time involved with refactoring into a model is one of the reasons the original feature request has been sitting for so long. The cyclonedx-ruby-gem project is also written in Ruby. If there were to be a common Ruby model library for the specification, both this CocoaPods analysis and the RubyGem analysis would benefit from it. |
Honestly, this code was mostly written using Cody. I've never written any Perl and this is the first Ruby I've touched. CHOP for the win ;) It might not take very long to convert over to a model based approach using tools like Cody. |
resolves CycloneDX#62 Signed-off-by: Jeremy Long <[email protected]>
Signed-off-by: Jeremy Long <[email protected]>
Signed-off-by: Jeremy Long <[email protected]>
Signed-off-by: Jeremy Long <[email protected]>
Signed-off-by: Jeremy Long <[email protected]>
Signed-off-by: Jeremy Long <[email protected]>
Signed-off-by: Jeremy Long <[email protected]>
Signed-off-by: Jeremy Long <[email protected]>
This PR is good to go now. If this is good enough for now - great. When I have more time I might come back to this and see about converting this to using a model and serialization. It would be good to see this merged and 2.0.0 released. |
@macblazer any chance this could get merged a new release created? There are several changes pending the next release: (also - I might suggest using squash-and merge to reduce the noise in the commit history of main) |
resolves #62