David Rodríguez
51958bae66
[rubygems/rubygems] Prefer FileUtils.rm_r
to FileUtils.rm_rf
for specs
...
Because it does not swallow errors if it fails to remove the given
folders, making issues easier to debug.
0db12d7afc
2025-03-12 18:02:09 +09:00
David Rodríguez
f656d34f10
[rubygems/rubygems] Refactor specs to not try to remove folders that don't exist
...
This has the following benefits:
* Avoid duplicated work in some specs that first build a repo, and then
overwrite it with a completely different set of gems.
* Reduce RSpec nesting and improve readability.
* The change also made surfaces several specs that were incorrect since
they were unintentionally not testing the right thing.
ed430883e0
2025-03-12 18:02:09 +09:00
David Rodríguez
11c9e4f1ce
[rubygems/rubygems] Fix bundle outdated <GEM>
failing if gems not installed
...
694d5f444e
2024-12-26 18:09:15 +00:00
David Rodríguez
c071fedb32
[rubygems/rubygems] Fix bundle outdated
with --group
option
...
It was printing incorrect output and returning incorrect status.
96f5979c7d
2024-09-23 10:37:57 +00:00
Matt Brictson
830ff66e2c
[rubygems/rubygems] Emit progress to stderr when --parseable
is passed to 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.
7d4bb43570
2024-08-30 10:36:08 +00:00
David Rodríguez
dc804bd83c
[rubygems/rubygems] Extract a build_repo3
helper
...
d8cf4aa0cd
2024-08-05 17:27:11 +00:00
David Rodríguez
98c923ff4b
Synchronize Bundler & RubyGems ( #11071 )
2024-06-28 10:12:29 -04:00
David Rodríguez
2755cb1b2f
[rubygems/rubygems] Use modern hashes consistently
...
bb66253f2c
2023-12-07 22:29:33 +00:00
David Rodríguez
d5121992dc
[rubygems/rubygems] Remove unnecessary specific_local_platform
test helper
...
86b574824d
2023-03-17 18:50:55 +09:00
David Rodríguez
851b3aa7dd
[rubygems/rubygems] Fix bundle outdated --strict
...
It should be an alias of `--filter-strict`.
`--update-strict` is essentially a dummy option with no special behavior
associated and should be deprecated.
ec1e5d83c8
2022-08-03 16:33:53 +09:00
David Rodríguez
35c65e7ba6
[rubygems/rubygems] Fix conservative updates regardless of --strict
...
c9a1d69a8d
2022-08-03 16:33:52 +09:00
David Rodríguez
13305bf0c9
[rubygems/rubygems] Fix crash when running bundle outdated
in debug mode
...
Previously it would crash like this:
````
$ /Users/deivid/.asdf/installs/ruby/3.1.2/bin/ruby -I/Users/deivid/Code/rubygems/rubygems/bundler/spec -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/artifice/fail.rb -r/Users/deivid/Code/rubygems/rubygems/bundler/spec/support/hax.rb /Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle outdated --patch --strict --filter-patch
Running `bundle outdated --filter-patch --patch --strict` with bundler 2.4.0.dev
Found changes from the lockfile, re-resolving dependencies because bundler is unlocking Using a local server, bundler won't use the CompactIndex API
Fetching source index from file:///Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/remote4/
Resolving dependencies...
--- ERROR REPORT TEMPLATE -------------------------------------------------------
```
RuntimeError: LazySpecification has not been materialized yet (calling :loaded_from [])
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/lazy_specification.rb:147:in `method_missing'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:214:in `gem_column_for'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:174:in `block in print_gems_table'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:173:in `map'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:173:in `print_gems_table'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli/outdated.rb:123:in `run'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:420:in `outdated'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:31:in `dispatch'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/cli.rb:25:in `start'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:48:in `block in <top (required)>'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/gems/bundler-2.4.0.dev/exe/bundle:36:in `<top (required)>'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:25:in `load'
/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1/gems/system/bin/bundle:25:in `<main>'
```
````
23c46f3b57
2022-08-01 23:14:23 +09:00
David Rodríguez
5c13adb746
[rubygems/rubygems] Fix comment incorrectly copied from another spec
...
9be5eae9cf
2022-08-01 23:14:22 +09:00
Hiroshi SHIBATA
437a5ae9d6
Merge RubyGems and Bundler master
2022-07-13 14:11:55 +09:00
David Rodríguez
156079a85d
[rubygems/rubygems] Make --strict
flag of update
and outdated
commands consistent
...
Previously they had slightly different behavior when combined with
conservative updating flags.
The correct behavior is the `--update-strict` option, so `--script` now
does that, The `--update-strict` option is left there for now but I will
deprecate it later.
ab42046229
2022-03-06 22:17:00 +09:00
David Rodríguez
6e2240a2f9
Sync latest bundler & rubygems development version
2021-07-07 13:30:20 +09:00
David Rodríguez
5b0abba931
Sync bundler & rubygems
2021-05-11 11:29:41 +09:00
Hiroshi SHIBATA
ed149dbf46
Merge the master branch of Bundler
2021-04-15 15:36:15 +09:00
Hiroshi SHIBATA
2fa9f3c032
Prepare to release rubygems-3.2.1 and bundler-2.2.1
2020-12-15 10:54:09 +09:00
Hiroshi SHIBATA
d386a58f6f
Merge bundler-2.2.0.rc.2
2020-10-15 17:19:02 +09:00
David Rodríguez
2fafc08aa3
[rubygems/rubygems] Remove unneeded trailing conditions on exitstatus
...
27e0e4ecb6
2020-07-15 16:05:12 +09:00
David Rodríguez
16823d4a05
[rubygems/rubygems] Remove unnecessary assertions on exitstatus
...
Since our helpers now raise by default if the subcommand fails, these
will never actually fail and are not necessary.
6153b9321e
2020-07-15 16:05:12 +09:00
David Rodríguez
1436b5026c
[rubygems/rubygems] s/bundle!/bundle
...
746a4b3d74
2020-06-18 19:14:15 +09:00
David Rodríguez
61b6f53337
[rubygems/rubygems] Make helpers raise by default
...
ade0c441d5
2020-06-18 19:14:15 +09:00
David Rodríguez
1914c4e9b1
[rubygems/rubygems] Pass --deployment
flag directly
...
This spec is run only in bundler 2 mode, and it's testing the
`--deployment` flag specifically.
a5d91c68b6
2020-06-05 07:32:42 +09:00
Hiroshi SHIBATA
0e60b59d58
Update the bundler version with master branch
2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA
13f4f07f21
Merge bundler-2.1.4
2020-01-08 18:00:32 +09:00
Hiroshi SHIBATA
38002a8adb
Prepare to release bundler-2.1.0
2019-12-15 16:41:10 +09:00
Guillermo Guerrero
e33dd659d4
[bundler/bundler] Move duplicated code to before
blocks
...
69bee117fb
2019-08-03 09:29:59 +09:00
David Rodríguez
c3ddd47ce7
[bundler/bundler] Normalize file:// handling in specs
...
5946d62ad0
2019-08-03 09:29:55 +09:00
Hiroshi SHIBATA
8f37629519
Merge bundler master from upstream.
...
Pick from 8dd59e3ba97eb80a599f8149f31bf40773b69dc0
2019-06-09 12:44:10 +09:00
hsbt
68ddd4d300
Merge Bundler 2.1.0.pre.1 as developed version from upstream.
...
a53709556b
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 06:01:35 +00:00
hsbt
e97741e12a
Merge Bundler 2.0.1 from upstream.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 13:10:58 +00:00
hsbt
91533d9ab1
Downgrade Bundler 1.17.x from 2.0.0.
...
We have the platform issue on heroku:
* https://gist.github.com/schneems/26452540f6e2bbbcf2ea144f45f6b305
* https://github.com/heroku/heroku-buildpack-ruby/issues/833
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11 03:07:37 +00:00
hsbt
2fbbbba5bd
Merge upstream changes from 2-0-stable branch of bundler/bundler.
...
* It update bundler 2 mode to bundler 3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-04 01:14:48 +00:00
hsbt
59c8d50653
Added bundler as default gems. Revisit [Feature #12733 ]
...
* bin/*, lib/bundler/*, lib/bundler.rb, spec/bundler, man/*:
Merge from latest stable branch of bundler/bundler repository and
added workaround patches. I will backport them into upstream.
* common.mk, defs/gmake.mk: Added `test-bundler` task for test suite
of bundler.
* tool/sync_default_gems.rb: Added sync task for bundler.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-02 23:07:56 +00:00
hsbt
7825e8363d
Postponing the Bundler merge.
...
I faced a big issue about Bundler with ruby core.
I have no time to resolve it issue before 2.5 final release.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 23:08:05 +00:00
hsbt
be7b592912
Update bundled bundler to 1.16.0.
...
* lib/bundler, spec/bundler: Merge bundler-1.16.0.
* common.mk: rspec examples of bundler-1.16.0 needs require option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-01 23:29:38 +00:00
hsbt
8598f8c2dc
Merge bundler to standard libraries.
...
rubygems 2.7.x depends bundler-1.15.x. This is preparation for
rubygems and bundler migration.
* lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4
* spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches.
* https://github.com/bundler/bundler/pull/6007
* Exclude not working examples on ruby repository.
* Fake ruby interpriter instead of installed ruby.
* Makefile.in: Added test task named `test-bundler`. This task is only
working macOS/linux yet. I'm going to support Windows environment later.
* tool/sync_default_gems.rb: Added sync task for bundler.
[Feature #12733 ][ruby-core:77172]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-08 08:45:41 +00:00