summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
AgeCommit message (Collapse)Author
8 days[ruby/rubygems] Bundler: validate more options for add sub-commandTakuya Noguchi
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com> https://github.com/ruby/rubygems/commit/6ca2e28680
2025-12-16[ruby/rubygems] Tweak the Bundler's "X gems now installed message":Edouard CHIN
- Fix https://github.com/ruby/rubygems/pull/9188 - This message is a bit misleading because it always outputs one extra specs, which is Bundler itself. This is now fixed when the message is about to be output. https://github.com/ruby/rubygems/commit/70b4e19506
2025-12-16[ruby/rubygems] Allow bundle pristine to work for git gems in the same repo:Edouard CHIN
- Fix https://github.com/ruby/rubygems/pull/9186 - ### Problem Running `bundle pristine` in a Gemfile where there is many git gem pointing to the same repository will result in a error "Another git process seems to be running in this repository". ### Context This error is a regression since https://github.com/ruby/rubygems/commit/a555fd6ccd17 where `bundle pristine` now runs in parallel which could lead to running simultaneous git operations in the same repository. ### Solution When Bundler pristine a git gem it does a `git reset --hard` without specifying a path. This means the whole repository will be reset. In this case, we can leverage that by just pristining one gem per unique git sources. This is also more efficient. https://github.com/ruby/rubygems/commit/710ba514a8
2025-11-25[ruby/rubygems] Support bundle install --lockfile optionJeremy Evans
This allows for specifying the lockfile to read and write. It mirrors the --gemfile option, and has higher priority than the lockfile method in the Gemfile. It also mirrors the bundle lock --lockfile option. When the --lockfile option is used, it is applied twice. First, before the Gemfile is read, to specify the lockfile to operate on, and again after the Gemfile is read, so that if the Gemfile has a lockfile method that overrides the defintion's lockfile, the --lockfile option still has higher precedence. https://github.com/ruby/rubygems/commit/17acdd4a89
2025-11-20[ruby/rubygems] Add support for bundle install --no-lockJeremy Evans
This allows for the same behavior as including `lockfile false` in the Gemfile. This allows you to get the behavior without modifying the Gemfile, which is useful if you do not control the Gemfile. This is similar to the --no-lock option already supported by `gem install -g Gemfile`. https://github.com/ruby/rubygems/commit/6c94623881 Co-authored-by: Colby Swandale <996377+colby-swandale@users.noreply.github.com>
2025-11-19[ruby/rubygems] Add `--ext=go` to `bundle gem`Go Sueyoshi
(https://github.com/ruby/rubygems/pull/8183) * Add new gem templates * Add `--ext=go` in `bundle gem` * Add setup-go to .github/workflows/main.yml * Embed go version in go.mod * Use go in bundler CI * Add example method to template * Install Go in .circleci/config.yml * Install Go in .gitlab-ci.yml * Allow hard tabs in go template * Run `rake update_manifest` * Fix test * Move go_gem to gemspec Respect to 9b0ec80 * nits: :golf: * includes valid module name in go.mod * generate header file * Run `go mod tidy` to create `go.sum` * Check if `go.sum` is generated only when Go is installed To avoid test failure in environments where Go is not installed * Run CI * Workaround for hung up c.f. https://github.com/rubygems/rubygems/actions/runs/11639408044/job/32415545422 * Write man for --ext=go * Re-generate man with `./bin/rake man:build` * pinning :pushpin: * Update with `./bin/rake man:build` * nits: Extract to method * nits: Use `sys_exec` instead of `system` * Clean go module cache after test Workaround following error ``` 1) bundle gem gem naming with underscore --ext parameter set with go includes go_gem extension in extconf.rb Failure/Error: FileUtils.rm_r(dir) Errno::EACCES: Permission denied @ apply2files - /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go # ./spec/support/helpers.rb:37:in `block in reset!' # ./spec/support/helpers.rb:21:in `each' # ./spec/support/helpers.rb:21:in `reset!' # ./spec/spec_helper.rb:130:in `block (2 levels) in <top (required)>' # /home/runner/work/rubygems/rubygems/lib/rubygems.rb:303:in `load' # /home/runner/work/rubygems/rubygems/lib/rubygems.rb:303:in `activate_and_load_bin_path' ``` Files installed with `go get` have permissions set to 444 ref. https://github.com/golang/go/issues/35615 ``` $ ls -l /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go -r--r--r-- 1 runner runner 42320 Nov 15 06:38 /home/runner/work/rubygems/rubygems/bundler/tmp/2.2/home/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/decode_test.go ``` So they cannot be deleted by `FileUtils.rm_r`. Therefore, this is necessary to execute `go clean -modcache` separately from `FileUtils.rm_r` to circumvent it. * Remove needless changes ref. https://github.com/ruby/rubygems/pull/8183#discussion_r2532902051 * ci: setup-go is needless * Don't run go command in `bundle gem` ref. https://github.com/ruby/rubygems/pull/8183#discussion_r2532765470 * Revert unrelated date changes --------- https://github.com/ruby/rubygems/commit/260d7d60b3 Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
2025-11-18[ruby/rubygems] bin/rubocop -aHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/fee8dd2f08
2025-11-18[ruby/rubygems] fix testsAustin Pray
https://github.com/ruby/rubygems/commit/1dc669a0ab
2025-11-18[ruby/rubygems] Progressively enhance if DidYouMean is availableAustin Pray
https://github.com/ruby/rubygems/commit/a02353fb96
2025-11-18[ruby/rubygems] RubocopAustin Pray
https://github.com/ruby/rubygems/commit/a6bc30a827
2025-11-18[ruby/rubygems] use DidYouMean::SpellChecker for gem suggestionsAustin Pray
replaces Bundler::SimilarityDetector with DidYouMean::SpellChecker https://github.com/ruby/rubygems/commit/959bea1506
2025-11-07[ruby/rubygems] Use Dir.pwd instead of Pathname.pwdHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/6c161b253d
2025-11-07[ruby/rubygems] Removed unnecessary loading of pathnameHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/6e965b7872
2025-10-28[ruby/rubygems] Update new gem CoC and promptdysonreturns
Prompt wording "prefer safe, respectful, productive, and collaborative spaces" is copied verbatim from Ruby Community Conduct Guideline. https://github.com/ruby/rubygems/commit/6cdf5f6d8a
2025-10-24[ruby/rubygems] Forcely activate irb if that isn't available when running ↵Hiroshi SHIBATA
with bundle console https://github.com/ruby/rubygems/commit/42e22fd367
2025-10-20[ruby/rubygems] Now ruby/rubygems is the canonical repository urlHiroshi SHIBATA
https://github.com/ruby/rubygems/commit/c637007e91
2025-10-15[rubygems/rubygems] Replaced Bundler::SharedHelpers.major_deprecation to ↵Hiroshi SHIBATA
feature_removed! or feature_deprecated! https://github.com/rubygems/rubygems/commit/b1b963b34a Co-authored-by: David Rodríguez <2887858+deivid-rodriguez@users.noreply.github.com>
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] 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-26[rubygems/rubygems] add loading support on Windowssodacris
https://github.com/rubygems/rubygems/commit/04574ba59a
2025-09-19[rubygems/rubygems] Make `bundle show --outdated` raise an errorDavid Rodríguez
https://github.com/rubygems/rubygems/commit/3bbbf4a4e5
2025-09-19[rubygems/rubygems] Move error handling to right behind the optionDavid Rodríguez
This is where error handling happens in all the other options, so it's where we'll look when we completely remove error handling for these removed CLI flags in the next major. https://github.com/rubygems/rubygems/commit/40d660c607
2025-09-19[rubygems/rubygems] Make `--local-git` flag to `bundle plugin install` raise ↵David Rodríguez
an error https://github.com/rubygems/rubygems/commit/8bfe317e6d
2025-09-17[rubygems/rubygems] Move `bundle install --binstubs` deprecation to cli.rbDavid Rodríguez
For consistency with the other deprecations. https://github.com/rubygems/rubygems/commit/28e300cee1
2025-09-16[rubygems/rubygems] Completely remove multisources supportDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8f9d6c54a1
2025-09-16[rubygems/rubygems] Complete rubocop flags and settings removalDavid Rodríguez
If the CLI flags are used, we abort early as usual. As per the settings, I decided to ignore them. We've been migrating them automatically to the new name for a long time and we don't yet have a standard way to deprecate and remove settings (we should probably use the existing setting validators). So I think it's fine for now to do what we normally do (ignore the setting). https://github.com/rubygems/rubygems/commit/8311de6e69
2025-09-16[rubygems/rubygems] Fix `--no-rubocop` deprecation messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/2c16b0e11e
2025-09-16[rubygems/rubygems] Fix `rubocop` config removal messageDavid Rodríguez
In Bundler 4, configuration will no longer be updated. https://github.com/rubygems/rubygems/commit/33a4718d7a
2025-09-11[rubygems/rubygems] Complete remembered options removalDavid Rodríguez
https://github.com/rubygems/rubygems/commit/573ffad3ea
2025-09-03[rubygems/rubygems] Fix `bundle cache` failing in frozen mode if ↵David Rodríguez
vendor/cache is empty https://github.com/rubygems/rubygems/commit/36c5af9156
2025-09-03[rubygems/rubygems] Fix `bundle lock` regression when using `update` and ↵Edouard CHIN
`lockfile` flags: - Ref #8917 - ### Problem Prior to Bundler 2.5.6, running `bundle lock --update foo --lockfile Gemfile_bumped.lock` would update only the foo gem and write the lockfile to the `Gemfile_bumped.lock`. In Bundler 2.5.6 and above running the same command, updates absolutely all gems. This change is related to #7047 ### Solution We decided to expose the `write_lock` method rather than going through a complex deprecation cycle of the `lock` method. This commit applies the same business logic as prios to 2.5.6 where, we build the definition using the existing lockfile, make changes to the definition and dump it into the desired lockfile. https://github.com/rubygems/rubygems/commit/c88f00c41d
2025-09-03Completely remove `bundle viz` commandDavid Rodríguez
2025-09-03Completely remove `bundle inject` commandDavid Rodríguez
2025-08-18[rubygems/rubygems] Fix `bundle show --verbose` and recommend it as an ↵David Rodríguez
alternative to `bundle show --outdated` https://github.com/rubygems/rubygems/commit/7cad1e4947
2025-08-18[rubygems/rubygems] Introduce `bundle list --format=json`Schneems
The `bundle list` command is a convenient way for human to know what gems and versions are available. By introducing a `--format=json` option, we can provide the same information to machines in a stable format that is robust to UI additions or modifications. It indirectly supports `Gemfile.lock` modifications by discouraging external tools from attempting to parse that format. This addition allows for the scripting of installation tools, such as buildpacks, that wish to branch logic based on gem versions. For example: ```ruby require "json" command = "bundle list --format=json" output = `#{command}` raise "Command `#{command}` errored: #{output}" unless $?.success? railties = JSON.parse(output).find {|gem| gem["name"] == railties } if railties && Gem::Version.new(railties["version"]) >= Gem::Version.new("7") puts "Using Rails greater than 7!" end ``` The top level is an object with a single key, "gems", this structure allows us to add other information in the future (should we desire) without having to change the json schema. https://github.com/rubygems/rubygems/commit/9e081b0689
2025-07-30[rubygems/rubygems] Remove out of date TODODavid Rodríguez
After digging into git history a bit, I figure this was about unifying `bundle cache` and `bundle package`, which already happened a while ago. So remove this TODO since it's now misleading. https://github.com/rubygems/rubygems/commit/5a0b06b84d
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-17Cancel `--force` deprecation in favor of `--redownload`David Rodríguez
I realized `--redownload` is not a good name, because it does not necessarily redownloads gems. It only forces reinstallation even if gem is already installed. So I believe `--force` is actually a better name and the introduction of `--force` was a misunderstanding of what the `--force` flag did at the time. Let's cancel the deprecation of `--force`. For now the `--redownload` alias is left around until we decide what to do with it.
2025-07-09[rubygems/rubygems] Update gemspec based on provided github username when existsSweta Sanghavi
* Conditionally set changelog_url if gh username passed and enabled * conditionally set homepage, source code uri, homepage uri when gh username passed in * update documentation to say username will also be used for gemspec file https://github.com/rubygems/rubygems/commit/1c1ada593b
2025-07-09[rubygems/rubygems] Add blank line after every questionDavid Rodríguez
To try make output a bit less messy. https://github.com/rubygems/rubygems/commit/92c8bc6769
2025-07-09[rubygems/rubygems] Use shorter questions as prompts in `bundle gem`David Rodríguez
If we use long explanations as prompts, sometimes the prompt gets printed twice due to a (I think) reline/readline bug. https://github.com/rubygems/rubygems/commit/987e0dfa90
2025-07-09[rubygems/rubygems] Reword MIT explanation to make sense after reorderingDavid Rodríguez
Previous wording assumed explanation was displayed after the question, not before. https://github.com/rubygems/rubygems/commit/04eb3430ba
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 `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-06-30[rubygems/rubygems] Added --bundle option for triggering bundle install ↵Hiroshi SHIBATA
automatically after bundle gem https://github.com/rubygems/rubygems/commit/59ac0db26b
2025-06-19Skip to Bundler 4 directlyDavid Rodríguez
2025-06-19[rubygems/rubygems] Fix grammar in `bundle config` deprecation messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d23b3d61ac
2025-06-11[rubygems/rubygems] Validate dependencies when doing bundle installRandy Stauner
https://github.com/rubygems/rubygems/commit/b0983f392f
2025-06-06Move most of Bundler::GemHelpers to Gem::PlatformSamuel Giddins
This will help centralize wheel platform selection logic eventually Signed-off-by: Samuel Giddins <segiddins@segiddins.me>
2025-06-03[rubygems/rubygems] Only ignore `.gitignore` when generating gems with gitTangRufus
https://github.com/rubygems/rubygems/commit/aec5a7887d