[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

[ANN] Trollop 1.8.1 released

William Morgan

6/24/2008 11:05:00 PM

Trollop version 1.8.1 has been released! http://trollop.rub...

## DESCRIPTION

Trollop is a commandline option parser for Ruby that just gets out of your
way. One line of code per option is all you need to write. For that, you get
a nice automatically-generated help page, robust option parsing, command
subcompletion, and sensible defaults for everything you don't specify.

Look:

opts = Trollop::options do
opt :monkey, "Use monkey mode"
opt :goat, "Use goat mode", :default => true
opt :num_limbs, "Set number of limbs", :default => 4
end

That's it. And opts is a hash and you do whatever you want with it.
Trivial. You don't have to mix option processing code blocks with the
declarations. You don't have to make a class for every option (what is this,
Java?). You don't have to write more than 1 line of code per option.

Now, with subcommand support!

## RECENT CHANGES

== 1.8.1 / 2008-06-24

* Bugfix for short option autocreation
* More aggressive documentation

== 1.8 / 2008-06-16

* Sub-command support via Parser#stop_on
--
William <wmorgan-ruby-talk@masanjin.net>

3 Answers

William Morgan

6/25/2008 1:02:00 AM

0

Reformatted excerpts from wmorgan-ruby-talk's message of 2008-06-24:
> Trollop version 1.8.1 has been released! http://trollop.rub...

Aaaand obligatory blog post detailing subcommand usage:
http://all-thing.net/2008/06/ann-trollop-181-rel...
--
William <wmorgan-ruby-talk@masanjin.net>

Matt Mower

6/25/2008 8:06:00 AM

0

On Wed, Jun 25, 2008 at 12:05 AM, William Morgan
<wmorgan-ruby-talk@masanjin.net> wrote:
> Trollop version 1.8.1 has been released! http://trollop.rub...
>
> ## RECENT CHANGES
>
> * More aggressive documentation
>

Should we be afraid?

M.

--
Matt Mower :: http://matt...

Mikel Lindsaar

6/26/2008 7:12:00 AM

0

On Wed, Jun 25, 2008 at 6:06 PM, Matt Mower <matt.mower@gmail.com> wrote:
> On Wed, Jun 25, 2008 at 12:05 AM, William Morgan
> <wmorgan-ruby-talk@masanjin.net> wrote:
>> Trollop version 1.8.1 has been released! http://trollop.rub...
>> * More aggressive documentation

> Should we be afraid?

Nyah... from what I've heard it's just a bunch of trollop anyway...

--
http://lin...
Rails, RSpec, Puppet andLife blog....