Skip to content

config.gem_excludes not working for bundle/git gems #331

Description

@jyeung

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions