ManageIQ / optimist

Optimist is a commandline option parser for Ruby that just gets out of your way.
https://manageiq.org/optimist/
MIT License
249 stars 36 forks source link

[Documentation] trollop to optimist guide / FAQ? #141

Closed rubyFeedback closed 10 months ago

rubyFeedback commented 10 months ago

I inherited another project that requires trollop. I am willing to move to optimist, but I would love to have some guidelines as to what to do in order to move. The code base is foreign to me, including the style - very alien, so I'd like to have some document that can help me in the process of porting things.

For instance:

opts = Trollop.with_standard_exception_handling(trollop_parser) {
trollop_parser.parse(i)

Can such method names be just used as a 1:1 replacement? If not what else can be used? Could some document be added (can be short and concise, just a tiny helper tool) and then linked to it from the main README perhaps?

kbrock commented 10 months ago

Hello @rubyFeedback

Depending upon the version of trollop that you use, it should be a search and replace.

Fryguy commented 10 months ago

Agreed with @kbrock - It should be a simple find Trollop replace with Optimist