[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PATCH for gem2deb: gem2tgz will pick the newest gemfile instead of the first one

On 02/28/2012 03:18 PM, Antonio Terceiro wrote:
Cédric Boutillier escreveu isso aí:
On Mon, Feb 27, 2012 at 05:18:34PM +0100, Matijs van Zuijlen wrote:

I would definitely check the actual version of the gem rather than
the mtime. There are all kinds of reasons an earlier version might
have a later mtime accidentally.

Thanks for your feedback. Here is thus a second attempt, with the use of

A simpler solution that does not require Gem::Version is to glob before and
after fetching:

before = Dir::glob("#{gemfile}-*.gem")
run("gem fetch #{gemfile}")
after = Dir::glob("#{gemfile}-*.gem")
gemfile = (after - before).first

Then, running `gem2tgz <basename>` twice would result in a failure.

Reply to: