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

[close #943] Use Bundler env vars for config #1039

Merged
merged 2 commits into from
Aug 18, 2020

Commits on Aug 13, 2020

  1. [close #943] Use Bundler env vars for config

    Starting with Bundler 2.x deprecation warnings started appearing noting that flags will no longer persist config when running `bundle install`:
    
    ```
           Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
           [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag
           [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag
           [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development:test'`, and stop using this flag
           [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs`
    ```
    
    This is generally a confusing part of running bundler locally where someone on a team might try running `--bundle_without` once and then be confused at future behavior.
    
    To support persisting values, we can use the bundler env vars that start with `BUNDLE_`. These will be set at:
    
    - Build time
      - exported for other buildpacks
    - Runtime
    
    In addition, they're being shown in the `bundle install` output so if a developer gets a failure on Heroku they can copy and paste the command to test locally.
    schneems committed Aug 13, 2020
    Configuration menu
    Copy the full SHA
    bd30fff View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2020

  1. Comment on BUNDLE_DEPLOYMENT

    The code makes it difficult to see what the conditions where this would be empty are. This comment makes that condition more clear.
    schneems committed Aug 18, 2020
    Configuration menu
    Copy the full SHA
    bc04270 View commit details
    Browse the repository at this point in the history