summaryrefslogtreecommitdiff
path: root/lib/bundler/settings.rb
AgeCommit message (Collapse)Author
2026-04-08Merge RubyGems/Bundler 4.0.10Hiroshi SHIBATA
2026-04-08Merge RubyGems/Bundler 4.0.9Hiroshi SHIBATA
2025-11-20[ruby/rubygems] Add support for BUNDLE_LOCKFILE environment variableJeremy Evans
This specifies the lockfile location. This allows for easy support of different lockfiles per Ruby version or platform. https://github.com/ruby/rubygems/commit/b54d65bc0a Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Co-authored-by: Colby Swandale <996377+colby-swandale@users.noreply.github.com>
2025-11-19[ruby/rubygems] Warn users that `bundle` now display the help:Edouard CHIN
- In https://github.com/ruby/rubygems/commit/31d67ecc056fb5a9193bc66a6e69e21576a87702 we enforced the new behaviour where running `bundle` no longer installs gems but displays the help. Users now have a way to configure their preferred default command using the `BUNDLE_DEFAULT_CLI_COMMAND` flag. With the preview of Ruby 4.0 now being released, some people will start to see this new change. The problem is that the previous behaviour had existed for like an eternity and we didn't warn users about this change in advance. I'd like to provide a deprecation/warning cycle because this is confusing users already and this breaks various CI setup that now needs to be changed immediately. https://github.com/ruby/rubygems/commit/e415480ac5
2025-10-10[rubygems/rubygems] Make update_requires_all_flag to settingsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/631a55be91
2025-10-10[rubygems/rubygems] Make default_cli_command flag to settingsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/31d67ecc05
2025-10-10[rubygems/rubygems] Make global_gem_cache flag to settingsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/bfe15a4712 Co-authored-by: David Rodríguez <2887858+deivid-rodriguez@users.noreply.github.com>
2025-10-10[rubygems/rubygems] Replaced Bundler.feature_flag.plugins? to Bundler.settingsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/ced8ef3a12 Co-authored-by: David Rodríguez <2887858+deivid-rodriguez@users.noreply.github.com>
2025-09-19[rubygems/rubygems] Switch `cache_all` to be `true` by defaultDavid Rodríguez
And make it a standard setting. https://github.com/rubygems/rubygems/commit/17e356fa94
2025-09-19[rubygems/rubygems] Switch `lockfile_checksums` to be true by defaultDavid Rodríguez
https://github.com/rubygems/rubygems/commit/47c3dc19ee Co-authored-by: Jonathan Barquero <jonbarlo@hotmail.com>
2025-09-16[rubygems/rubygems] Remove `allow_offline_install` settingDavid Rodríguez
And let the feature always be enabled, so I'm not sure why we'd need this configurable. https://github.com/rubygems/rubygems/commit/5a27f0c1e3
2025-09-11[rubygems/rubygems] Complete remembered options removalDavid Rodríguez
https://github.com/rubygems/rubygems/commit/573ffad3ea
2025-07-28(Temporarily?) delay path changes and global cache changesDavid Rodríguez
There are several issues with these which I'm not sure I'll have time to address properly. I prefer to keep our default branch in a releasable state just in case. Once they are fixed, this can be reverted.
2025-07-07[rubygems/rubygems] Stop allowing calling `#gem` on random objectsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4b8570ae15
2025-07-07[rubygems/rubygems] Cancel `path_relative_to_cwd` changeDavid Rodríguez
It only affected the `--path` flag which is actually getting removed, so I don't think it makes sense to make such change. The current behavior is reasonable and I tried to codify it with a few more specs. https://github.com/rubygems/rubygems/commit/6f520eb146
2025-07-07[rubygems/rubygems] Remove `default_install_uses_path` settingDavid Rodríguez
The previous default can already be configured with `bundle config path.system true`. https://github.com/rubygems/rubygems/commit/cb483b79db
2025-07-07[rubygems/rubygems] Remove `auto_clean_without_path` settingDavid Rodríguez
There already different ways of toggling off this behavior, like setting `bundle config clean false`, or configuring Bundler to install to system gems with `bundle config path.system true`. https://github.com/rubygems/rubygems/commit/6daa09f60a
2025-07-02[rubygems/rubygems] Add a `verbose` setting to enable verbose output for all ↵David Rodríguez
commands https://github.com/rubygems/rubygems/commit/0aa1be946f
2025-07-02[rubygems/rubygems] Document the `simulate_version` settingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/1ffd83f6c2
2025-07-02[rubygems/rubygems] Remove `print_only_version_number` settingDavid Rodríguez
I don't think it makes sense to make this tiny behavior change configurable. If someone wants to parse version output, and we have a public setting, they are going to need to accommodate their regexps to both values of the setting. In addition to this, I plan to enhance version output with a note about "simulated version", and in that case, "print_only_version_number" would no longer hold, since what we print will be more than that anyways. So, I'd like to remove the setting and change the output in Bundler 4 with no way to opt out. https://github.com/rubygems/rubygems/commit/d84e9dcf09
2025-06-30[rubygems/rubygems] Use Bundler.settings[gem.bundle]Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b16511598e
2024-11-11[rubygems/rubygems] Add a `lockfile_checksums` configuration to include ↵David Rodríguez
checksums in fresh lockfiles https://github.com/rubygems/rubygems/commit/50b9ef8589
2024-10-23[rubygems/rubygems] Consistently use `:create` action when creating directoriesDavid Rodríguez
It gives better errors. https://github.com/rubygems/rubygems/commit/bedae080ef
2024-06-06[rubygems/rubygems] Avoid appending a final "/" when `fallback_timeout` is ↵David Rodríguez
used in config https://github.com/rubygems/rubygems/commit/a0af1baa2b
2024-06-06[rubygems/rubygems] Remove per uri options constantDavid Rodríguez
I don't think we should add more of these. https://github.com/rubygems/rubygems/commit/9eee9948cc
2024-06-06[rubygems/rubygems] Move Bundler settings specific logic to BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7d1e8be2ce
2024-06-06[rubygems/rubygems] Avoid `is_a?` check before using `normalize_uri`David Rodríguez
https://github.com/rubygems/rubygems/commit/31cb15d03f
2024-06-06[rubygems/rubygems] Remove unnecessary `.to_s`David Rodríguez
The `normalize_uri` method always gives back a String. https://github.com/rubygems/rubygems/commit/246953010c
2024-06-06[rubygems/rubygems] Truly ignore commented out settingsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/e31df2d6ef
2024-05-30[rubygems/rubygems] Don't let `bundle config` report a path without a ↵David Rodríguez
Gemfile as "local app" https://github.com/rubygems/rubygems/commit/6aa2ac337f
2024-04-18[rubygems/rubygems] Never write credentials to lockfilesDavid Rodriguez
https://github.com/rubygems/rubygems/commit/e8a363713e
2024-03-17[rubygems/rubygems] Ignore commented out keys in config fileDavid Rodriguez
https://github.com/rubygems/rubygems/commit/c4a8d2a930
2024-01-29[rubygems/rubygems] Use rubygems vendored uri from Bundler when availableDavid Rodríguez
https://github.com/rubygems/rubygems/commit/5d6a8f2fb4
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-11-27[rubygems/rubygems] Don't remember `--jobs` flagDavid Rodríguez
https://github.com/rubygems/rubygems/commit/9ab1136036
2023-11-13[rubygems/rubygems] Let RuboCop target Ruby 3.0David Rodríguez
https://github.com/rubygems/rubygems/commit/70243b1d72
2023-09-15[rubygems/rubygems] Stop allocating the same settings keys repeatedlySamuel Giddins
Running `bundle update --bundler` on a rails app locally: ``` ==> memprof.after.txt <== Total allocated: 301.90 kB (3794 objects) Total retained: 73.24 kB (698 objects) ==> memprof.before.txt <== Total allocated: 14.47 MB (196378 objects) Total retained: 25.93 kB (202 objects) ``` So for a slight increase in retained memory (all keys are now retained), we go from about 200k allocations in the settings file to under 4k https://github.com/rubygems/rubygems/commit/e64debb6ae
2023-08-30[rubygems/rubygems] Update bundler/lib/bundler/settings.rbJosh Nichols
https://github.com/rubygems/rubygems/commit/75ffa8ef76 Co-authored-by: Martin Emde <martinemde@users.noreply.github.com>
2023-08-30[rubygems/rubygems] (Further) Improve Bundler::Settings#[] performance and ↵Josh Nichols
memory usage I previously identified and improved this method over in https://github.com/rubygems/rubygems/pull/6884 but while reviewing another memory_profiler profile, I realized another gain we can eek out. This method keeps comes up in part because `configs` is allocating a new Hash every time. My last change took advantage of that by using `map!` on it. `configs` is called quite often, including in this `[]` method, so there's a benefit to memoizing it. Back in `[]`, logically we are trying to find the first Hash in `configs` that has a value for the given key. Currently, we end up `map` and `compact` to just get that value. Instead, we can use a loop over `configs`, and break when we find the value for the key. https://github.com/rubygems/rubygems/commit/b913cfc87b
2023-08-20[rubygems/rubygems] fix lintJosh Nichols
https://github.com/rubygems/rubygems/commit/75c0f27b7e
2023-08-20[rubygems/rubygems] use a one-linerJosh Nichols
https://github.com/rubygems/rubygems/commit/46745885e8
2023-08-20[rubygems/rubygems] handle removing `BUNDLE_`, since using start_with? would ↵Josh Nichols
still include that https://github.com/rubygems/rubygems/commit/235d9b38d8
2023-08-20[rubygems/rubygems] Don't rely on globals when not matching regexp for "local."Martin Emde
https://github.com/rubygems/rubygems/commit/e79ccdafd8
2023-08-20[rubygems/rubygems] Use ! methods once we have a new copy of the string. Use ↵Josh Nichols
.prepend to avoid allocating a new string. https://github.com/rubygems/rubygems/commit/2ac35a661f
2023-08-20[rubygems/rubygems] call key.to_s once instead of multiple times to save ↵Josh Nichols
when it's a symbol https://github.com/rubygems/rubygems/commit/535feb817c
2023-08-20[rubygems/rubygems] Use value.match? only on Strings, which avoids ↵Josh Nichols
allocating a matchdata, which is not used https://github.com/rubygems/rubygems/commit/cbf9ac93d7
2023-08-20[rubygems/rubygems] Use .to_s once in the beginning to save allocations if ↵Josh Nichols
it's a symbol. https://github.com/rubygems/rubygems/commit/f8167db8a2
2023-08-20[rubygems/rubygems] name is often a symbol, so only to_s once to avoid ↵Josh Nichols
allocating it multiple times https://github.com/rubygems/rubygems/commit/8eac49c429
2023-08-20[rubygems/rubygems] String#start_with? is faster than regex with beginning ↵Josh Nichols
boundaries https://github.com/rubygems/rubygems/commit/d7cde68034
2023-08-20[rubygems/rubygems] Use ! methods on the array, since it is brand new. The ↵Josh Nichols
individual keys are also new, so we can use ! methods on each individual one as well. https://github.com/rubygems/rubygems/commit/f2e912b9bb