summaryrefslogtreecommitdiff
path: root/spec/bundler
AgeCommit message (Collapse)Author
2024-09-20[rubygems/rubygems] Fix RubyGems warnings about minimum required RubyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8f262f3a47
2024-09-20[rubygems/rubygems] Don't try to install locked bundler when `--local` is passedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/907d46964d
2024-09-17[rubygems/rubygems] Fix spelling, it's "cannot" rather than "can not"David Rodríguez
https://github.com/rubygems/rubygems/commit/3434f094a2
2024-09-17[rubygems/rubygems] Bump rubies in CI to 3.3.5David Rodríguez
A spec needed changes because now loading the default `json` prints a warning about `ostruct` getting loaded although it will be removed in the future. Use a different default gem to test this. https://github.com/rubygems/rubygems/commit/7415a66906 Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
2024-09-17[rubygems/rubygems] Fix `--local` hitting the network when default gems are ↵David Rodríguez
included https://github.com/rubygems/rubygems/commit/b9a2d4d539
2024-09-17[rubygems/rubygems] Improve specDavid Rodríguez
The behavior it's testing is independent from the bundle path being used. https://github.com/rubygems/rubygems/commit/9a4b32ec82
2024-09-17[rubygems/rubygems] Fix spec to setup a default gem correctlyDavid Rodríguez
Looking at the description is something that used to be done a long time ago. https://github.com/rubygems/rubygems/commit/9c226f52a6
2024-09-16Complete specDavid Rodríguez
Co-authored-by: Vít Ondruch <vondruch@redhat.com>
2024-09-16[rubygems/rubygems] Remove temporary `.lock` files left around by gem installerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/edbb2e3475
2024-09-13[rubygems/rubygems] Remove redundant arguments passed to `bundle` helperDavid Rodríguez
They are used by default. https://github.com/rubygems/rubygems/commit/0b7f7d879f
2024-09-13[rubygems/rubygems] Remove `BUNDLER_IGNORE_DEFAULT_GEM`David Rodríguez
As long as we use a high enough test version, the default version of Bundler should never get in the middle. https://github.com/rubygems/rubygems/commit/d63f0818aa
2024-09-13[rubygems/rubygems] Make sure test does not load system version of BundlerDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d850ea1d95
2024-09-11[rubygems/rubygems] Uncomment and possibly fix spec on JRubyDavid Rodríguez
This was commented out almost 10 years ago, but I think it passes now! https://github.com/rubygems/rubygems/commit/4a6b1aba3c
2024-09-11[rubygems/rubygems] Fix `bundle exec rake install` failing when local gem ↵David Rodríguez
has extensions and `gemspec` DSL is being used In a `bundle exec` context, the local specification will actually be part of the known specifications, so RubyGems will assume it has already been installed, which is not actually true. This will cause `RequestSet` to rebuild extensions for a gem that's not actually installed, causing errors. The fix is to make sure detection of installed activation requests considers not only that there's a known spec with the same full name as the one being installed, but also that this spec is installed in the same gem_home were pretend to install the new gem. https://github.com/rubygems/rubygems/commit/a8ef1286a6
2024-09-11[rubygems/rubygems] Only raise DSLError during Gemfile parsing when it's ↵David Rodríguez
actually useful DSLError prints the specific line in a Gemfile where the error was raised. That's helpful when the error was explicitly raised by the Gemfile DSL or, in the case it's implicitly raised, when the offending code lives right in the Gemfile. If it's an internal error, or something buried dowm in user code called from the Gemfile, `DSLError` is not helpful since it hides the actual culprit. This commit tries to only raise `DSLError` in the cases mentioned above and otherwise let the original error be raised. https://github.com/rubygems/rubygems/commit/b30ff5a682
2024-09-11[rubygems/rubygems] Make an exe file executable when generating new gemsYuji Yaginuma
Currently, an exe file isn't executable when generating new gems because it doesn't have the correct permission. This PR sets the correct permission same as files under the `bin`. https://github.com/rubygems/rubygems/commit/6509bf128a
2024-09-10[rubygems/rubygems] Mark to exclude examples at ruby/ruby repositoryHiroshi SHIBATA
`make test-bundler` on ruby/ruby don't have installed gemspec. So, `require "psych"` didn't activate psych as default gems on ruby repo. https://github.com/rubygems/rubygems/commit/f8ca514cbb
2024-09-10[rubygems/rubygems] Added example for bundler/inline conflictHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/6b1e8a14bd
2024-09-09[rubygems/rubygems] Don't include hook templates in cached git sourceDaniel Colson
With a default git setup, each cloned repo in the cache will end up with ~60K of sample git hooks. These files all end in `.sample`, and they are disabled by default. Deleting them should be a no-op, and makes the cache a bit smaller. https://github.com/rubygems/rubygems/commit/d2149999cd
2024-09-04[rubygems/rubygems] Load gemspecs in the context of its parent also when ↵David Rodríguez
using local overrides https://github.com/rubygems/rubygems/commit/0a6c1c53ce
2024-09-02[rubygems/rubygems] Don't try to remove previous install folder if it's emptyDavid Rodríguez
Ruby ships with empty directories for default gems. If Ruby installations has unsafe world-writable permissions, we will complain when about to install a gem that happens to be also a default gem, because we'll start by removing the previous install folder and that's supposed to be insecure due to too loose permissions. However, if the folder is empty, we don't actually need to remove anything, so we can skip the whole thing, avoiding the errors. https://github.com/rubygems/rubygems/commit/2f3cd8ac4e
2024-09-02[rubygems/rubygems] Improve insecure gem overwrite messageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7c71dac22e
2024-09-02[rubygems/rubygems] Make ruby-core check not depend on ENVDavid Rodríguez
I found it useful to be able to use `GEM_COMMAND` outside of a ruby-core env, so I made the ruby-core env detection not depend on it. https://github.com/rubygems/rubygems/commit/6cb389c290
2024-08-30[rubygems/rubygems] Emit progress to stderr when `--parseable` is passed to ↵Matt Brictson
`bundle outdated` Before, `bundle outdated --parseable` (or `--porcelain`) caused output to be completely silenced during definition resolution, so nothing was printed at all until the table of outdated gems was printed. With this change, `--parseable`/`--porcelain` now prints progress to stderr during resolution. E.g.: ``` Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... ``` This provides a better user experience, especially when `outdated --parseable` takes several seconds or more. The report of outdated gems is still printed to stdout, and the exit status codes are unchanged, so the fundamental contract with other tools consuming the `outdated --parseable` result should not be affected. https://github.com/rubygems/rubygems/commit/7d4bb43570
2024-08-30[rubygems/rubygems] Don't blow up when explicit version is removed from some ↵David Rodríguez
git sources `version` is actually an attribute of the dependency, not of the git source. Sometimes it's passed to the git source to be able to fake a gemspec in case there's no gemspec in the source, but it should not be used for source comparison. https://github.com/rubygems/rubygems/commit/d936fbd78e
2024-08-30[rubygems/rubygems] Fix grammar in one spec descriptionDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a1046466c9
2024-08-29[rubygems/rubygems] Reject unknown platforms when running `bundle lock ↵David Rodríguez
--add-platform` https://github.com/rubygems/rubygems/commit/1f93a2bdc5
2024-08-26[rubygems/rubygems] Emit progress to stderr when `--print` is passed to ↵Matt Brictson
`bundle lock` `bundle lock --print --update` can take a long time to fetch sources and resolve the lock file. Before, `--print` caused output to be completely silenced, so nothing was printed at all until the resolved lock file is finally emitted to stdout. With this change, `--print` now prints progress to stderr. E.g.: ``` Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... ``` This provides a better user experience, especially when `lock --print --update` takes several seconds or more. The lock file is still printed to stdout, so tools consuming the lock file on stdout will not be affected. https://github.com/rubygems/rubygems/commit/6719baa700
2024-08-26[rubygems/rubygems] Fix newline=false being ignored by Shell#warnMatt Brictson
https://github.com/rubygems/rubygems/commit/e021ff33a8
2024-08-26bundle install with git repo needs to be run under the git environmentHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/11458
2024-08-23[rubygems/rubygems] Don't break if extra calls to File.writable? happenKJ Tsanaktsidis
In https://bugs.ruby-lang.org/issues/20693, I'd like to have Dir.tmpdir call `File.writable?` instead of `Stat#writable?`. However, that causes this test to break in bundler because it's using RSpec to stub `File.writable?`. We can fix this by allowing the real `File.writable?` to be called for all files except the directory we're trying to stub. https://github.com/rubygems/rubygems/commit/0fa6657293
2024-08-23[rubygems/rubygems] Fix error message when Bundler refuses to install due to ↵David Rodríguez
frozen being set without a lockfile https://github.com/rubygems/rubygems/commit/0857d62ca6
2024-08-22[rubygems/rubygems] Fix `--prefer-local` flagDavid Rodríguez
The original implementation of this flag was too naive and all it did was restricting gems to locally installed versions if there are any local versions installed. However, it should be much smarter. For example: * It should fallback to remote versions if locally installed version don't satisfy the requirements. * It should pick locally installed versions even for subdependencies not yet discovered. This commit fixes both issues by using a smarter approach similar to how we resolve prereleases: * First resolve optimistically using only locally installed gems. * If any conflicts are found, scan those conflicts, allow remote versions for the specific gems that run into conflicts, and re-resolve. https://github.com/rubygems/rubygems/commit/607a3bf479 Co-authored-by: Gourav Khunger <gouravkhunger18@gmail.com>
2024-08-21[rubygems/rubygems] Restore support for passing relative paths to `:git`David Rodríguez
The `file://` protocol does not really work with relative paths and it's not necessary anyways. So restore support for that by not using `file://`. https://github.com/rubygems/rubygems/commit/16a68998ce
2024-08-21[rubygems/rubygems] Add missing flag passed to `git fetch`David Rodríguez
Doesn't really change the test outcome, but I noticed it was missing. https://github.com/rubygems/rubygems/commit/ea4f9d5209
2024-08-21[rubygems/rubygems] Add better error when trying to develop RubyGems with an ↵David Rodríguez
unsupported Ruby version https://github.com/rubygems/rubygems/commit/9d41c4088a
2024-08-21[rubygems/rubygems] Regeneration previous git application caches that didn't ↵David Rodríguez
include bare repos https://github.com/rubygems/rubygems/commit/417319ecb1
2024-08-05[rubygems/rubygems] Don't remove existing platform gems when PLATFORMS ↵David Rodríguez
section is badly indented https://github.com/rubygems/rubygems/commit/ec099ebf1e
2024-08-05[rubygems/rubygems] Fix locked source not getting respected when `bundle ↵David Rodríguez
update <specific_gem>` is run https://github.com/rubygems/rubygems/commit/eec6830c04
2024-08-05[rubygems/rubygems] Extract a `build_repo3` helperDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d8cf4aa0cd
2024-08-05Fix truffleruby removing gems from lockfileDavid Rodríguez
When resolving on truffleruby, and multiple platforms are included in the lockfile, Bundler will not respect existing platforms, but always force ruby variants. That means removal of existing version specific variants, introducing lockfile churn between implementations. To prevent this, we introduce the distinction between `Dependency#force_ruby_platform`, only settable via Gemfile, and `Dependency#default_force_ruby_platform`, which is always true on truffleruby for certain dependency names. This way, when resolving lockfile gems for other platforms on truffleruby, we keep platform specific variants in the lockfile. However, that introduces the problem that if only platform specific variants are locked in the lockfile, Bundler won't be able to materialize on truffleruby because the generic variant will be missing. To fix this additional problem, we make sure the generic "ruby" platform is always added when resolving on truffleruby.
2024-07-31[rubygems/rubygems] Remove some `file_uri_for` callsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/3570ba20ed
2024-07-30[rubygems/rubygems] Print a better debug message when lockfile does not ↵David Rodríguez
include the current platform https://github.com/rubygems/rubygems/commit/afb7a6d754
2024-07-30[rubygems/rubygems] The `simulate_platform` helper can take a stringDavid Rodríguez
https://github.com/rubygems/rubygems/commit/680bafac1a
2024-07-30[rubygems/rubygems] Allow smoother breaking changes in test envDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0fc3feae19
2024-07-26[rubygems/rubygems] Make all tests still pass when switching from ↵David Rodríguez
truffleruby to cruby https://github.com/rubygems/rubygems/commit/4f3d9fa3bf
2024-07-26[rubygems/rubygems] Make test env resilient to ruby version changesDavid Rodríguez
We use pre-existence of `rake_path` to decide whether we need to regenerate dummy test gems in `tmp`. When changing rubies, the previous implementation will believe that the correct `rake_path` exists and avoids regenerating dummy gems, given an error like the following when specs are run: ``` (...) Could not find rubygems-generate_index lib directory in /path/to/rubygems/bundler/tmp/1/gems/base/ruby/3.2.0 # ./spec/support/builders.rb:253:in `block in update_repo' # ./spec/support/helpers.rb:337:in `block in with_gem_path_as' # ./spec/support/helpers.rb:351:in `without_env_side_effects' # ./spec/support/helpers.rb:332:in `with_gem_path_as' # ./spec/support/builders.rb:251:in `update_repo' # ./spec/support/builders.rb:228:in `build_repo' # ./spec/support/builders.rb:197:in `build_repo4' # ./spec/commands/lock_spec.rb:103:in `block (2 levels) in <top (required)>' (...) ``` To fix this, fix the part of the path that depends on the implementation and the Ruby version so that we don't give false positives. https://github.com/rubygems/rubygems/commit/fafacfa210
2024-07-26[rubygems/rubygems] Fix bundle check exit code when git gem is missingJerome Dalbert
Make `bundle check` exit with code 1 when gem git source is not yet checked out. https://github.com/rubygems/rubygems/commit/93162bf5af
2024-07-25[rubygems/rubygems] bundle-gem learns to find Gemfile template correctlyJason Karns
Removes the symlink for gems.rb.tt and instead uses the singular template file. Only the destination filename for the gemfile reads from the `init_gems_rb` setting. https://github.com/rubygems/rubygems/commit/43ce0e1666
2024-07-24Fix test failure of e7610582ad8fd05655221b183257ed358c903ac8Nobuyoshi Nakada