[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Commonly agreed command line options gem?

LAMBEAU Bernard

1/12/2009 2:35:00 PM

Hi,

- Is there a commonly agreed gem for parsing command line options of a
script (ARGV) ?
- If no, does anyone know a good one ?

In all cases (as I'm relatively new to Ruby), what heuristic do you
use to select the gems you need? There actually a lot of gems
available and selecting the good one (still maintained, well tested,
famous ruby developers maybe (?), ...) is pretty hard to me.

Thanks
blambeau

3 Answers

Jesús Gabriel y Galán

1/12/2009 3:23:00 PM

0

On Mon, Jan 12, 2009 at 3:35 PM, LAMBEAU Bernard <blambeau@gmail.com> wrote:
> Hi,
>
> - Is there a commonly agreed gem for parsing command line options of a
> script (ARGV) ?
> - If no, does anyone know a good one ?
>
> In all cases (as I'm relatively new to Ruby), what heuristic do you
> use to select the gems you need? There actually a lot of gems
> available and selecting the good one (still maintained, well tested,
> famous ruby developers maybe (?), ...) is pretty hard to me.
>

OptionParser is in ruby core:

http://www.ruby-doc.org/core/classes/OptionP...

I am very happy with Ara Howard's "main" gem, though.
It's very easy to use.

Jesus.

Jarmo Pertman

1/13/2009 10:06:00 PM

0

I am used GetoptLong class in stdlib:
http://www.ruby-doc.org/stdlib/libdoc/getoptlong/rdoc/...

Just look at that self-explanatory example and You're ready to go.

Regards,
Jarmo

--
Posted via http://www.ruby-....

Sebastian W.

1/14/2009 10:32:00 PM

0

LAMBEAU Bernard wrote:
> Hi,
>
> - Is there a commonly agreed gem for parsing command line options of a
> script (ARGV) ?
> - If no, does anyone know a good one ?
>
> In all cases (as I'm relatively new to Ruby), what heuristic do you
> use to select the gems you need? There actually a lot of gems
> available and selecting the good one (still maintained, well tested,
> famous ruby developers maybe (?), ...) is pretty hard to me.
>
> Thanks
> blambeau

My absolute favorite is "trollop". It is mega-mega awesome.
--
Posted via http://www.ruby-....