ManageIQ / polisher

Polisher is a Ruby module and set of utilities aimed to assisting the post-publishing packaging process for Ruby gems and applications.
MIT License
14 stars 14 forks source link

Fix #24: add --format option to gem_dep_checker, accept xml/json #56

Closed movitto closed 10 years ago

cfme-bot commented 10 years ago

~~Checked commit https://github.com/ManageIQ/polisher/commit/4229defc3fae0ee58090bb42f9db5fb107b0f0bf with rubocop 1 file checked, 3 offenses detected~~

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 4229defc3fae0ee58090bb42f9db5fb107b0f0bf on dep_checker_formatting into e9ca307cd38c50cd142c2f0305d7214f196140f6 on master.

cfme-bot commented 10 years ago

~~Checked commit https://github.com/ManageIQ/polisher/commit/e2b7f95706fba37a949a33779d7b58e778943c10 with rubocop 1 file checked, 15 offenses detected~~

movitto commented 10 years ago

Updated to address previous rubocop feedback, not quite sure why its complaining about the hash alignment, looks aligned to me.

cfme-bot commented 10 years ago

Checked commit https://github.com/ManageIQ/polisher/commit/fdd4f7f7b41905743d06e7737872db0cfa88e8f8 with rubocop 1 file checked, 0 offenses detected

Everything looks good. :+1:

Fryguy commented 10 years ago

General question, but it seems you are building both XML and JSON by hand. Is there a gem that can do this for you? For example, I know the json gem gives you .to_json, and I think nokogiri or something else might give you .to_xml. If not, there are many builder things that will build it for you, just as JBuilder and Nokogiri::XML::Builder . Perhaps there's a gem that does both and then you just emit what you want.

movitto commented 10 years ago

@Fryguy will look into this, though a little trickier than described. The output gets constructed & printed out on the fly as the gemfile & dependencies are evaluated (recursively). This is so the user doesn't have to wait until all gems are extracted and looked up against all targets before receiving results.

Not sure how feasible it is to process / output the data on the fly w/ those 3rd party libraries as suggested but will look into it. Or perhaps in the 'xml' / 'json' / other machine-readable output case we can skip this and just collect the data ahead of time / generate it all at once

jrafanie commented 10 years ago

@movitto Let's open an issue with @Fryguy's concerns about building xml/json by hand. I think we can build hashes as you go through each item of work so we can present that information when it completes.

I think we can merge this for now, but come back to that issue if we need to add more output in the future as then it's probably the time to find a better way of doing it... Thoughts?