buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin (JIRA)" <>
Subject [jira] Commented: (BUILDR-44) Project#packages selector improvement
Date Thu, 07 Feb 2008 19:13:08 GMT


Assaf Arkin commented on BUILDR-44:

Currently, if you want to get a specific package you can do:


That's a fairly common use case.  And if you have two of those you need, say JAR and WAR,
it's usually easier to call package twice than remember the selector syntax.  I'm not sure
there's a clear use case for adding this syntactic sugar.

> Project#packages selector improvement
> -------------------------------------
>                 Key: BUILDR-44
>                 URL:
>             Project: Buildr
>          Issue Type: Improvement
>          Components: Packaging
>    Affects Versions: 1.3
>            Reporter: Victor Hugo Borja
>            Priority: Minor
>             Fix For: 1.3
>         Attachments: 0001-Project-packages-can-now-take-a-selectors-argument.patch
> Currently, the Project#packages method returns all the packages defined for a project.
However it would be useful to provide a way to easily narrow returned packages without having
the user(mainly ruby newcomers)  to use the select ruby idiom
> { |p| p.type == :war }
> It would be nicer to have something like: 
>     project.packages(:type => :war)  # actually comparing :war with the type attribute
of each package
>     project.packages(JarTask)  # select all Jar kind packages
> For more advanced stuff, users may still need to provide a Proc/Method or select the
full packages array the ruby way.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message