David Rodríguez
8d29d1292b
[rubygems/rubygems] Improve errors a bit more
...
https://github.com/rubygems/rubygems/commit/f481e8f41a
2021-12-17 16:35:20 +09:00
David Rodríguez
1537471871
[rubygems/rubygems] Share gem not found logic with transitive dependencies too
...
https://github.com/rubygems/rubygems/commit/e4a1a9663d
2021-12-17 16:35:20 +09:00
David Rodríguez
79f72a4540
[rubygems/rubygems] Fix crash when no matching variants are found for the current platform
...
If we are resolving a dependency against a particular platform, and
there are no platform specific variants of the candidates that match
that platform, we should not consider those candidates.
https://github.com/rubygems/rubygems/commit/f6077fe27d
2021-12-17 16:35:18 +09:00
David Rodríguez
af4b4fd19b
[rubygems/rubygems] Improve resolver error messages
...
Use a more standard naming for gems.
https://github.com/rubygems/rubygems/commit/75121e83f1
2021-12-17 16:35:17 +09:00
Hiroshi SHIBATA
7e084ed707
Merge RubyGems and Bundler master
...
Merge from 793ad95ecb
2021-12-15 18:05:18 +09:00
Vyacheslav Alexeev
1a62a50c4f
[rubygems/rubygems] Add `github` and `ref` options to `bundle add`
...
https://github.com/rubygems/rubygems/commit/c3e54acab0
2021-12-11 00:13:25 +09:00
David Rodríguez
0e60bc118b
[rubygems/rubygems] Ignore dependencies not actually locked from frozen check
...
Only needed if there can be no explicit global source (bundler < 3).
https://github.com/rubygems/rubygems/commit/73923f4af5
2021-12-10 19:09:55 +09:00
David Rodríguez
f0ef9ffed1
[rubygems/rubygems] Cancel deprecation of custom git sources
...
https://github.com/rubygems/rubygems/commit/99cd6e0627
2021-12-08 07:59:34 +09:00
Simon Fish
1b12ebb94e
[rubygems/rubygems] Add require parameter to `bundle add``
...
Test and ensure "false" is handled
Don't use yield_self to operate on autorequire
Remove duplicate autorequire
Add banner to require option
Don't use json to break down require params
Pass linter
https://github.com/rubygems/rubygems/commit/a4f2f8ac17
2021-12-08 01:49:20 +09:00
David Rodríguez
26303c31f0
[rubygems/rubygems] Pass "--" to git commands to separate positional and optional args
...
To make sure git uri's specified in Gemfile are never misinterpreted as
optional arguments, potentially allowing for local code execution.
https://github.com/rubygems/rubygems/commit/90b1ed8b9f
2021-12-07 23:27:59 +09:00
David Rodríguez
526c9359ca
[rubygems/rubygems] Don't cleanup paths from gems already activated from `$LOAD_PATH`
...
This way, if some default gem has been required before bundler, and
rubygems has enhanced the `$LOAD_PATH` to use the latest version in the
system, further requires of that default gem after bundler has been
activated will use the same version and don't cause redefinition
warnings or worse problems derived from the fact of mixing up two
different versions. That, unless the gem is a `Gemfile` dependency. In
that case, we'll get a mismatch error anyways as we do now.
This fix doesn't mean that all default gems internally used by
bundler/rubygems are now supported inside `Gemfile`'s. That should be
handled case by case, but it will now bite people only when they try to
add the gem to their `Gemfile`, not before.
https://github.com/rubygems/rubygems/commit/7325530547
2021-12-07 01:53:39 +09:00
Jean Boussier
715a51a0d6
[rubygems/rubygems] Feature: accept pull request URLs as github source
...
Very often github source is used to temporarily use a modified gem
while a PR upstream is being reviewed.
So for instance https://github.com/ruby/bigdecimal/pull/211 will look like:
```ruby
gem "bigdecimal", github: "casperisfine/bigdecimal", branch: "git-gem" # https://github.com/ruby/bigdecimal/pull/200
```
It's annoying because you have to fiddle with the branch name, which is copied as `casperisfine:git-gem`, etc etc.
If I could simply use the PR URL like this:
```
gem "bigdecimal", github: "https://github.com/ruby/bigdecimal/pull/211 "
```
It would make a very common task for me so much simpler.
https://github.com/rubygems/rubygems/commit/517c527751
2021-12-06 20:27:29 +09:00
Josef Šimánek
25423f0918
[rubygems/rubygems] Add --version parameter to bundle info command.
...
https://github.com/rubygems/rubygems/commit/7d9fdd908d
2021-12-06 18:03:54 +09:00
David Rodríguez
c38c1d82b1
[rubygems/rubygems] Let original EACCES error be raised
...
This block of code already wraps file operations with
`SharedHelpers.filesystem_access`, which rescues and re-raises more
friendly errors. Also, I'm not fully sure creating a temporary directory
can end up raising an `Errno::EACCES` error from reading `tmpdir`
sources. Finally, this rescue block apparently leads to some false
positives when firewall is blocking the ruby executable on Windows, or
at least that's what we've got reported.
In any case, I think it's best to let the original error be raised.
https://github.com/rubygems/rubygems/commit/f7dbe54404
2021-12-04 05:18:11 +09:00
David Rodríguez
4c5e862434
[rubygems/rubygems] Improve source gemfile/lockfile equivalence checks
...
Since we no longer have multiple global sources, each top level dependency is
always pinned to a single source, so it makes little sense to talk about
adding or removing a source. Instead, source changes always mean to
change the source one or more dependencies are pinned to. This logic can
now be much simpler.
https://github.com/rubygems/rubygems/commit/f1d33fa0df
2021-12-03 20:00:51 +09:00
David Rodríguez
248fae0ec4
[rubygems/rubygems] Improve sources representation
...
We have two representations of a source. Once used for sorting, which
should not depend on the source's state, but solely on its static
information, like remotes. Another one used for error and informational
messages, which should properly inform about the exact state of the
source when the message is printed.
This commit makes the latter be the default implementation of `to_s`, so
that error and informational messages are more accurate by default.
https://github.com/rubygems/rubygems/commit/b5f2b88957
2021-12-03 20:00:50 +09:00
David Rodríguez
7d974cc56f
[rubygems/rubygems] Don't overwrite locked dependency sources too early
...
Otherwise we hide some useful message about dependency source changes.
https://github.com/rubygems/rubygems/commit/c926673c5b
2021-12-03 20:00:50 +09:00
David Rodríguez
aa87780f8f
[rubygems/rubygems] Fix incorrect order in changed sources message
...
https://github.com/rubygems/rubygems/commit/6f1b5f68de
2021-12-03 20:00:49 +09:00
David Rodríguez
cf88271331
[rubygems/rubygems] Fix gemspec source unlocking also for prereleases like 0.0.0.SNAPSHOT
...
The default prerelease requirement in rubygems doesn't actually match
things like "0.0.0.SNAPSHOT".
https://github.com/rubygems/rubygems/commit/711498b342
2021-12-02 18:10:31 +09:00
David Rodríguez
2a15b28a9e
[rubygems/rubygems] Fix materialization of locked 0 prereleases
...
Since the default requirement in rubygems is ">= 0", it was failing to
match 0 prereleases. Changing the default globally to be ">= 0.a"
instead is a major refactoring that's quite tricky to make backwards
compatible, so I'm special casing this where needed for now to fix the
regression.
https://github.com/rubygems/rubygems/commit/68fe37937c
2021-12-02 18:10:31 +09:00
Hiroshi SHIBATA
0b53a8895f
Merge rubygems master fd676ac464491afaa0baf5435cb11b3f86229cbd
2021-12-01 11:00:10 +09:00
Hiroshi SHIBATA
9f4bdeb403
Removed vcr files. They are needless for this repo
2021-12-01 09:53:07 +09:00
ooooooo-q
af59d35570
[rubygems/rubygems] Fix escape of filenames in `bundle doctor`
...
https://github.com/rubygems/rubygems/commit/3ede1435ea
2021-11-30 01:29:34 +09:00
David Rodríguez
59439446d9
[rubygems/rubygems] Fix missing locked specs when depended on other platform
...
https://github.com/rubygems/rubygems/commit/0396e899db
2021-11-27 05:31:54 +09:00
David Rodríguez
f3320f164f
[rubygems/rubygems] Fix `bundle info` sometimes claiming that bundler has been deleted
...
https://github.com/rubygems/rubygems/commit/fe1a31db31
2021-11-26 08:50:52 +09:00
David Rodríguez
aace9cb162
[rubygems/rubygems] Fix bad instance variable name
...
Recent changes made a warning while running specs show up for some
reason, and it revealed this error.
https://github.com/rubygems/rubygems/commit/bbf55de38e
2021-11-25 04:02:21 +09:00
David Rodríguez
b2b473707f
[rubygems/rubygems] Check not having load system features also for successful runs
...
https://github.com/rubygems/rubygems/commit/4807bd19a5
2021-11-25 04:02:21 +09:00
David Rodríguez
d49ee9e2c3
[rubygems/rubygems] These method should be returning a string
...
https://github.com/rubygems/rubygems/commit/dc391f4d87
2021-11-25 04:02:20 +09:00
David Rodríguez
d123919595
[rubygems/rubygems] We should be checking raised exception, not status code here
...
https://github.com/rubygems/rubygems/commit/48f8cdab9c
2021-11-25 04:02:20 +09:00
David Rodríguez
c4b1aa19a3
[rubygems/rubygems] Don't replace ENV twice on non Windows platforms
...
https://github.com/rubygems/rubygems/commit/8dc86b7096
2021-11-25 04:02:19 +09:00
David Rodríguez
997adfd410
[rubygems/rubygems] Clarify `bundle viz` deprecation
...
https://github.com/rubygems/rubygems/commit/7f22fe56b3
2021-11-22 09:29:13 +09:00
David Rodríguez
80f39d78df
[rubygems/rubygems] Allow `bundle update` to downgrade gems by changing the Gemfile
...
https://github.com/rubygems/rubygems/commit/6a19cca7e5
2021-11-19 10:12:10 +09:00
Hiroshi SHIBATA
f3bda8987e
Merge the master branch of rubygems repo
...
Picked from 4b498709a0
2021-11-16 20:19:13 +09:00
David Rodríguez
3cf7130d70
[rubygems/rubygems] Remove duplicated spec
...
https://github.com/rubygems/rubygems/commit/86b874ed24
2021-11-12 06:05:09 +09:00
David Rodríguez
4736dec58b
[rubygems/rubygems] Remove `gemfile_should_be` helper as well
...
https://github.com/rubygems/rubygems/commit/79f3c00caa
2021-11-12 06:05:08 +09:00
David Rodríguez
1f91009d24
[rubygems/rubygems] Remove `have_lockfile` matcher too
...
https://github.com/rubygems/rubygems/commit/635f3f2605
2021-11-12 06:05:08 +09:00
David Rodríguez
d0f266460f
[rubygems/rubygems] Remove `lockfile_should_be` helper
...
It doesn't add anything.
https://github.com/rubygems/rubygems/commit/ece3c864df
2021-11-12 06:05:07 +09:00
Hiroshi SHIBATA
bd2674ad33
[rubygems/rubygems] Use bundler-graph instead of bundler-viz
...
https://github.com/rubygems/rubygems/commit/a54cca13db
2021-11-08 22:15:21 +09:00
haruuzion
82ae9b092c
[rubygems/rubygems] Fix url
...
https://github.com/rubygems/rubygems/commit/6a5a80eff7
2021-11-06 01:39:24 +09:00
Nobuyoshi Nakada
539c42ed89
[rubygems/rubygems] Fix typos
...
https://github.com/rubygems/rubygems/commit/f328ef6f77
2021-11-04 23:06:25 +09:00
David Rodríguez
ed0f326e88
[rubygems/rubygems] Leave ":" after MANPATH when not set
...
So that system man pages still work after a gem with man pages overrides
it.
https://github.com/rubygems/rubygems/commit/1031879b87
2021-11-02 00:28:28 +09:00
David Rodríguez
4e7e057692
[rubygems/rubygems] Memoize materialized specs when requiring `bundler/setup`
...
Calling `Bundler.definition.specs` will memoize materialized specs.
However, requiring `bundler/setup` will end up materializing the same
set of specs, but not memoize them.
This change makes things consistent.
https://github.com/rubygems/rubygems/commit/e4c2b52824
2021-11-01 02:01:36 +09:00
David Rodríguez
f634d1ee00
[rubygems/rubygems] Better error when installing a git lockfile and git not present
...
https://github.com/rubygems/rubygems/commit/28f4842196
2021-10-30 06:11:39 +09:00
Josef Šimánek
71b370f6dd
[rubygems/rubygems] Enforce bundler platform (and default gem) to keep invalid gemspec test compatible with ruby-trunk.
...
https://github.com/rubygems/rubygems/commit/a77061d4e9
2021-10-29 18:00:47 +09:00
Josef Šimánek
9b7afd3cff
[rubygems/rubygems] Update mirror_probe realword specs to not rely exactly at raised HTTP exception.
...
- this exception differs across Ruby versions.
https://github.com/rubygems/rubygems/commit/38c6927a5f
2021-10-29 18:00:47 +09:00
Josef Šimánek
0029e0948a
[rubygems/rubygems] Install stringio for standalone spec.
...
- previously it was required already by net/http, but it is not anymore using ruby-trunk
- 996d18a43f
- 364044e090 (diff-a1d29a94def02829fd4f9ba591199acf079e028f5a2002a77c363eb01212e112)
https://github.com/rubygems/rubygems/commit/be1779655a
2021-10-29 18:00:46 +09:00
Josef Šimánek
b179166421
[rubygems/rubygems] Assert NoMethodError message only partialy in downloader_spec.
...
- latest ruby adds error_highlight gem introducing backtrace into exception message
https://github.com/rubygems/rubygems/commit/08c70f9dd0
2021-10-29 18:00:46 +09:00
Josef Šimánek
fd17ae8205
[rubygems/rubygems] Lock racc version in platform_spec.
...
- latest ruby is shipped with racc 1.6 making this spec failing
- this spec is related to platform locking, changing version should not do any harm
https://github.com/rubygems/rubygems/commit/3e18b626cb
2021-10-29 18:00:46 +09:00
Frederik Dudzik
f45af5f0a4
Support gemification of tsort
...
Co-authored-by: Frederik Dudzik <frederik.dudzik@shopify.com>
Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2021-10-29 17:32:52 +09:00
Josef Šimánek
a9be84db82
[rubygems/rubygems] Add new default gems to setup_spec exempts.
...
- error_highlight was introduced at e946049665
orriginally as error_squiggle later renamed at 9438c99590
- ruby2_keywords was introduced as a placeholder gem only at 21d2463fbc
https://github.com/rubygems/rubygems/commit/c9ebe7c7d2
2021-10-29 17:22:25 +09:00