warbler icon indicating copy to clipboard operation
warbler copied to clipboard

config.gem_excludes not working for bundle/git gems

Open jyeung opened this issue 10 years ago • 1 comments

I was trying to use the gem_excludes config to exclude a directory from a bundler git gem, but it didn't seem to be having any effect.

Looking into this, it seems to be an issue with this line in traits/bundler.rb:

next if exclude_gems && config.gem_excludes && config.gem_excludes.any? {|rx| f =~ rx }

For gems that are not excluded (exclude_gems == false), this seems to nullify the gem_excludes flag.

Tried to fix this logic locally and it's now excluding the matching directories as expected. I can submit a pull request for this but just want to verify first that this is the expected behavior of the gem_excludes config.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22407042-config-gem_excludes-not-working-for-bundle-git-gems?utm_campaign=plugin&utm_content=tracker%2F136961&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F136961&utm_medium=issues&utm_source=github).

jyeung avatar Jun 18 '15 19:06 jyeung

if that line has a side effect of "nil-ing" the configured gem_excludes than its a bug (thus shoot up a PR) ... please try to explain what's going on in more detail (not apparent why that happens - although it might be from the referenced commit)

kares avatar Jun 28 '15 16:06 kares