Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Unpack gems into vendor exactly once

#2097

Some gems apparently are packed oddly, with (for example) all files set to read-only. (Hoe is one - thanks ssoroka!)

This causes problems, as the 2.2 gem unpack code will unpack dependencies more than once.

The attached patch is more careful with dependencies; it will only unpack each gem once. This should fix issues that some users have been having with gems:unpack:dependencies.

Reported by Matt Jones · February 27th, 2009 @ 11:31 PM

State: resolved
Milestone: none
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Steven Soroka
  2. Pratik
    Pratik
    • Assigned user set to Pratik

    February 28th, 2009 @ 10:38 AM

  3. Pratik
    Pratik

    Shouldn't we have tests for this ? Also, I think dependencies() should take an options hash instead of a boolean true/false.

    Thanks.

    February 28th, 2009 @ 03:47 PM

  4. Pratik
    Pratik
    • Milestone set to 2.x

    Removing 2.3 keyword. Please slap it back once we have a new patch.

    February 28th, 2009 @ 03:59 PM

  5. Matt Jones
    Matt Jones

    Working up a new patch, but I've got a question: A test for this is going to be hard to arrange. By design, gems already in vendor/gems aren't unpacked. So either there's going to be an external dependency, or a whole lot of mocking. Any ideas?

    I'm incorporating the options hash; so dependencies(true) => dependencies(:flatten => true).

    March 1st, 2009 @ 12:34 AM

  6. Matt Jones
    Matt Jones
    • Milestone cleared.

    I've attached a new patch. It cleans up the logic significantly by moving the decision to unpack into GemDependency#unpack_to, rather than scattered over the rake tasks.

    March 1st, 2009 @ 12:59 AM

  7. Repository
    Repository
    • State changed from new to resolved

    (from [a3ac1e1621506a6519b265ef6ec6abc70f6c8a27]) Display gem dependencies correctly and unpack exactly once [#2097 Unpack gems into vendor exactly once state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    March 1st, 2009 @ 11:59 AM