Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the config loader Bundler-aware #7983

Merged
merged 1 commit into from May 27, 2020
Merged

Commits on May 25, 2020

  1. Make the config loader Bundler-aware

    Before this change, when inheriting a configuration from a gem, rubocop:
    
    1. would fail to find it, if the gem specified in the Gemfile has a `path` or `git` option (because rubygems is unaware of those gems)
    2. would always load the config of the latest installed version of a gem, regardless of the version specified in the Gemfile
    
    This commit changes that, so if executed in the context of Bundler (`defined?(Bundler)`) it will first try to get the gem path via Bundler, and fallback to the previous `Gem::Specification` path when not found.
    
    This solves the two mentioned issues while maintaining the possibility to run rubocop in a globally installed context, i.e. without Bundler.
    CvX committed May 25, 2020
    Configuration menu
    Copy the full SHA
    d59d187 View commit details
    Browse the repository at this point in the history