eco-rb / bundler-ecology

Bundler plugin to black-list unwanted gems
MIT License
8 stars 2 forks source link

Permit disallowed gems if they're already a dependency, but disallow any new gems that use it #11

Open Morozzzko opened 5 years ago

Morozzzko commented 5 years ago

Sorry for the long name, couldn't think about anything new.

So, here's my use-case:

  1. I want to remove a gem in an already-huge application. Let's say it's ActiveSupport.
  2. Some of my dependencies depend on it
  3. I can't just drop and refactor everything, so this gem must stay for a while
  4. Still, I would like to avoid installing new gems that depend on it

So, I'd love to have this feature.

I was thinking something like:

disallowed:
  - name: active_support
    exceptions:
      - active_xxx
      - some_other_gem

↑ I expect this snippet to work well if active_support is only a dependency of active_xxx or some_other_gem, and fail on any other gems

v-kolesnikov commented 5 years ago

Hm, interesting idea! Would love to look at a PR.