summaryrefslogtreecommitdiff
path: root/spec/bundler
AgeCommit message (Collapse)Author
2021-09-22[rubygems/rubygems] Fix possible malicious website to example.comfiveNinePlusR
example.com is the canonical stand in for domain examples and will never have a backing website. via https://www.rfc-editor.org/rfc/rfc2606.html https://github.com/rubygems/rubygems/commit/26622c81c2
2021-09-17[rubygems/rubygems] Trigger install command by default on removeJose Galisteo
Closes https://github.com/rubygems/rubygems/issues/4889 https://github.com/rubygems/rubygems/commit/2b1754479c
2021-08-31[rubygems/rubygems] Remove `syck` traces from `bundler`David Rodríguez
Same reason as in the previous commit. https://github.com/rubygems/rubygems/commit/f00a6c8516 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix `bundle plugin install` misdetection of installed ↵David Rodríguez
versions https://github.com/rubygems/rubygems/commit/9c88db949d Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Normalize setting `GEM_PATH`David Rodríguez
https://github.com/rubygems/rubygems/commit/4188ebd568 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Make plugin installation idempotentDavid Rodríguez
The error had not be caught be specs because `bundle install` was returning a zero exit code when plugin installation errors happened. So I fixed that issue too. https://github.com/rubygems/rubygems/commit/90cde87856 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Correctly redact credentials when using x-oauth-basicMatt Larraz
https://github.com/rubygems/rubygems/commit/290b6ab078 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix `bundle check` showing duplicated gemsDavid Rodríguez
If the lockfile contains multiple platforms, `bundle check` would show duplicated missing gems. https://github.com/rubygems/rubygems/commit/6ac5931783 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Restore working `bundle check` behaviourDavid Rodríguez
As part of a recent bug fix where bundler was accidentally hitting the network when not supposed to, I made some refactoring, and the commit I'm reverting here (https://github.com/rubygems/rubygems/commit/d74830d00bb541883377992f56818620a78930b0) was some cleanup that those refactorings allowed according to "past me". That was completely wrong, `bundle check` should never consider cached gems, only installed gems, so the code that was removed was necessary. https://github.com/rubygems/rubygems/commit/5483e98305 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix some failing Bundler tests with old Git.Jun Aruga
Use the `git branch --list` rather than the `git branch -l` for better compatibility. Because the `git branch -l` is used to create a new branch in Git version < 2.20.0. https://github.com/rubygems/rubygems/commit/eac5be7d06 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Respect `BUNDLE_USER_HOME` for global config locationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/58fc31442f Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Disable `RUBYGEMS_GEMDEPS` for bundler spec runDavid Rodríguez
Running `bundler` specs using `bundler` is not supported. https://github.com/rubygems/rubygems/commit/cc97b6773d Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove `RUBYGEMS_GEMDEPS` warningDavid Rodríguez
When setting the `RUBYGEMS_GEMDEPS` environment variable to allow skipping `bundle exec`, `bundler` will print a warning about potential incompatibility. Initially the `RUBYGEMS_GEMDEPS` variable used a completely different (re)implementation of `bundler` functionality. That implementation was not battle tested and could potentially differ in behaviour from what `bundler` does. That's why print a warning. However, these days, all `rubygems` does when `RUBYGEMS_GEMDEPS` is set is to require `bundler/setup`, so there's no risk of any incompatibility, since that's just plain `bundler`. https://github.com/rubygems/rubygems/commit/bbddc27016 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Expect the right permissions on WindowsDavid Rodríguez
Given Windows doesn't have executable bit. https://github.com/rubygems/rubygems/commit/35dc3fa845 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix git repo initialization on a path with spacesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/a2d6e10192 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Simplify overkill usage of shared examplesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/36a00144b9 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Deprecate `bundle exec --no-keep-file-descriptors`David Rodríguez
https://github.com/rubygems/rubygems/commit/591466d512 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Exclude gemspec file itself from gemNobuyoshi Nakada
The processed YML data is included as metadata, the source gemspec file is unused and just confusing. https://github.com/rubygems/rubygems/commit/f444478eac Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] typos in UI messages: fix a couple missing spaces ↵Tim Sutton
between sentence breaks https://github.com/rubygems/rubygems/commit/5cdda53382 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] The `--local` flag to `bundle install` shouldn't hit the ↵David Rodríguez
network If the cache was missing, `bundler` would try to re-fetch it. With the `--local` flag, it should just look at installed gems. https://github.com/rubygems/rubygems/commit/630d29c69e Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Requiring `bundler/setup` shouldn't try to hit the networkDavid Rodríguez
https://github.com/rubygems/rubygems/commit/06f5efce02 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Improve "gem not found in source" errorsDavid Rodríguez
When printing sources inside these error messages, it's useful to only consider the current state of the source. For example, when requiring `bundler/setup`, the source shouldn't be configured to be able to hit the network, so the error message should only mention "locally installed gems" to make that more clear. https://github.com/rubygems/rubygems/commit/30eb14f853 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove redundant part of error messageDavid Rodríguez
It doesn't really add much, in my opinion. We want to be helpful, but also concise when possible. https://github.com/rubygems/rubygems/commit/9d56009cf7 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix standalone generated script to deal with path sourcesDavid Rodríguez
In the case of path sources, the path the source is pointing to should be added directly to the `$LOAD_PATH` without any modifications. https://github.com/rubygems/rubygems/commit/d3bba936f0 Co-authored-by: Daniel Niknam <mhmd.niknam@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary `ruby_version` local variableDavid Rodríguez
Under some case, this variable might not end up being used, in which case running the script would print unused variable warnings. https://github.com/rubygems/rubygems/commit/bf96030362 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary `ruby_engine` local variableDavid Rodríguez
Under some case, this variable might not end up being used, in which case running the script would print unused variable warnings. https://github.com/rubygems/rubygems/commit/a2d6392ada Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary `path` local variableDavid Rodríguez
We can use `__dir__` directly. https://github.com/rubygems/rubygems/commit/0e6083ca94 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Respect `BUNDLE_USER_CONFIG` if setDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f28ab141af Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Fix standalone install of default gemsDavid Rodríguez
Rubygems source replacement was broken. https://github.com/rubygems/rubygems/commit/3549c122f6 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] This spec can pass now on ruby 3David Rodríguez
TSort was released as a library so we can install it, and also other gems that are loaded by the spec. Also, Ruby on Windows apparently loads fiddle 1.0.6, so we need to also install that to make that not fail. https://github.com/rubygems/rubygems/commit/2b8dcab99e Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary test repositoryDavid Rodríguez
These gems are built and installed to system directly as default gems. There's no need to also build a remote repo. https://github.com/rubygems/rubygems/commit/ad9dad4c22 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Give a `bundle install` hint when `bundle list` failsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/98f5087e34 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Remove unnecessary escape sequencesDavid Rodríguez
Bundler formatters already take care of this. https://github.com/rubygems/rubygems/commit/c24415fdd5 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-08-31[rubygems/rubygems] Show all missing gems when using a bundle before ↵David Rodríguez
installing it Not only the first one that's missing. This also allows us to simplify things. https://github.com/rubygems/rubygems/commit/69718a9509 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-07-27[rubygems/rubygems] Remove the warning for not defining a gem server sourceDaniel Niknam
Bundler has deprecated gemfiles without a global source and this feature is now obsolete. `Bundler::Definition#has_rubygems_remotes?` is removed because it's not used anymore. https://github.com/rubygems/rubygems/commit/d29dd2cb7b
2021-07-27[rubygems/rubygems] Refactor Bundler::Dsl#check_rubygems_source_safety to ↵Daniel Niknam
improve readability `check_rubygems_source_safety` is responsible for: 1. if there are multiple global sources - for bundle 3.x raise an error - for bundle 2.x print a warning 2. print a warning if there is no explicit global source The second responsibility was added recently and now the logic could be extracted to improve readability. Conditions are still live in the `check_rubygems_source_safety` method since we don't want to call both functions always and that would help us achieve that. https://github.com/rubygems/rubygems/commit/f3d7e946ee
2021-07-27[rubygems/rubygems] Deprecate Gemfile without an explicit global sourceDaniel Niknam
Raise a warning when parsing a Gemfile and it doesn't have a global source. Gemfiles like this, specially now that rubygems sources are are no longer merged into a single source for security, are very confusing because they generate a different lockfile depending on the gems you have locally installed. This is because bundler always use an implicit global source that defaults to locally installed gems. https://github.com/rubygems/rubygems/commit/b7523ad21c
2021-07-27[rubygems/rubygems] Explicitly define a global source for testsDaniel Niknam
This is in preparation for deprecating source-less gemfiles. https://github.com/rubygems/rubygems/commit/d6493fa3e2
2021-07-27[rubygems/rubygems] Implement Bundler::SourceList#implicit_global_source?Daniel Niknam
This method is created to tell whether any global source exist in the object or not and it will be used by `Bundler:Dsl` to print a warning if no global source has been defined in the Gemfile. https://github.com/rubygems/rubygems/commit/422fec4438
2021-07-27[rubygems/rubygems] Implement Bundler::Source::Rubygems#no_remotes?Daniel Niknam
This method is created to tell whether any remote exist in the object or not and it will be used by `Bundler:SourceList` to tell if a global source has been defined implicitly or not. https://github.com/rubygems/rubygems/commit/47e3ff0e47
2021-07-27[rubygems/rubygems] The `--quiet` should still display warningsDavid Rodríguez
The is the previous intentional behaviour until https://github.com/rubygems/bundler/commit/ca0676cb1c638e0b9747ea8c18f28adf82cc01de. In my opinion, that previous behaviour was better and should be restored, because we want our users to always see warnings and fix them. And the original issue that motivated the change is fixable by other means, namely through `BUNDLE_SILENCE_ROOT_WARNING`, or through `BUNDLE_SILENCE_DEPRECATIONS` in general. Finally, the --quiet option is still documented as "only print errors and warnings". So this PR essentially reverts https://github.com/rubygems/bundler/commit/ca0676cb1c638e0b9747ea8c18f28adf82cc01de for the above reasons. https://github.com/rubygems/rubygems/commit/35f2254dfc
2021-07-27[rubygems/rubygems] Make `--quiet` spec independent on the specific warningDavid Rodríguez
We'll be removing the warning about no gem sources, so this spec will no longer test that warnings are hidden by `--quiet`. Test that in another way so that we don't lose the coverage when we drop the specific warning about no gem server sources. https://github.com/rubygems/rubygems/commit/cce4f86d28
2021-07-27[rubygems/rubygems] Remove `gem install` hint when installing a gem failsDavid Rodríguez
A fresh `gem install` might not reproduce the exact `bundle install` environment that originally caused the error. It also makes it harder for the user to troubleshoot the error since she needs to run a separate command. Instead, show the original error and backtrace directly. https://github.com/rubygems/rubygems/commit/49c2abfec6
2021-07-27[rubygems/rubygems] Fix bundler binstub version selectionDavid Rodríguez
To mimic built-in rubygems behaviour, only thing that should be approximated is the lockfile version. Other alternatives like `BUNDLER_VERSION` should be respected exactly. https://github.com/rubygems/rubygems/commit/dbd667d4bc
2021-07-27[rubygems/rubygems] Remove LoadError message in regards to requiring a ↵Daniel Niknam
relative file Ruby 1.9.2 removed "." from LOAD_PATH for robustness and security reasons. This code was introduced by https://github.com/rubygems/rubygems/commit/56fc830e19a573a5905eba7f4714ad1f21ed1927 commit to helping users understand the issue and had a guard condition to include the message for `RUBY_VERSION >= "1.9"`. However, the guard condition was removed as part of the "Ruby version leftover" cleanup by https://github.com/rubygems/rubygems/commit/8c9cf76e419fbd8ba83144d701b24ca388813b14 Ruby 1.9 development was ended a long time ago and this message is not useful anymore. https://github.com/rubygems/rubygems/commit/a23609b15a
2021-07-27[rubygems/rubygems] Fix interrupt handling in Bundler workersAndrew Haines
The existing interrupt handling using `SharedHelpers.trap` fails when the previous handler for a signal is not callable (for example, when it is the string "DEFAULT"). Instead, we now handle interrupts by aborting the process when worker threads are running, and restore the previous handler after worker threads are finished. Fixes #4764. https://github.com/rubygems/rubygems/commit/b9f455d487
2021-07-16[rubygems/rubygems] Fix `bundle plugin install --help` showing `bundle ↵David Rodríguez
install`'s help https://github.com/rubygems/rubygems/commit/b7b7d16aa8
2021-07-16[rubygems/rubygems] fix dangling empty hooksAndre Arko
it turns out that running `bundle plugin uninstall some-plugin` would remove that plugin from the list of hooks, but if the list of hooks for an event was now empty, we would serialize the empty array into yaml as an empty single bullet item. which would then get unserialized as a plugin with the name empty string. which we would then try to load and explode. 😬 https://github.com/rubygems/rubygems/commit/545ebba9a5
2021-07-16[rubygems/rubygems] test loading bad plugins with nil/empty namesAndre Arko
https://github.com/rubygems/rubygems/commit/e64b1f3497
2021-07-16[rubygems/rubygems] remove focusAndre Arko
https://github.com/rubygems/rubygems/commit/584a393812