rubygems-update 3.5.10 → 3.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -1
- data/CODE_OF_CONDUCT.md +79 -28
- data/CONTRIBUTING.md +2 -2
- data/Manifest.txt +1 -0
- data/bundler/CHANGELOG.md +28 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/install.rb +1 -1
- data/bundler/lib/bundler/compact_index_client/cache.rb +16 -7
- data/bundler/lib/bundler/constants.rb +8 -1
- data/bundler/lib/bundler/definition.rb +15 -24
- data/bundler/lib/bundler/errors.rb +14 -0
- data/bundler/lib/bundler/gem_helper.rb +1 -1
- data/bundler/lib/bundler/installer.rb +8 -8
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -1
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/rubygems_ext.rb +20 -12
- data/bundler/lib/bundler/self_manager.rb +1 -1
- data/bundler/lib/bundler/shared_helpers.rb +6 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +8 -0
- data/bundler/lib/bundler/source/metadata.rb +2 -0
- data/bundler/lib/bundler/source/rubygems.rb +3 -2
- data/bundler/lib/bundler/source_list.rb +13 -2
- data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +77 -29
- data/bundler/lib/bundler/version.rb +1 -1
- data/exe/update_rubygems +1 -1
- data/lib/rubygems/commands/pristine_command.rb +9 -6
- data/lib/rubygems/commands/setup_command.rb +2 -0
- data/lib/rubygems/commands/uninstall_command.rb +1 -1
- data/lib/rubygems/dependency.rb +1 -13
- data/lib/rubygems/ext/cargo_builder.rb +1 -16
- data/lib/rubygems/installer.rb +1 -1
- data/lib/rubygems/package/tar_header.rb +20 -4
- data/lib/rubygems/package.rb +0 -1
- data/lib/rubygems/platform.rb +1 -0
- data/lib/rubygems/specification.rb +35 -117
- data/lib/rubygems/specification_policy.rb +3 -1
- data/lib/rubygems/specification_record.rb +213 -0
- data/lib/rubygems/uninstaller.rb +15 -9
- data/lib/rubygems/util/licenses.rb +25 -0
- data/lib/rubygems.rb +8 -1
- data/rubygems-update.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd4f648b70b6865239d7b78c7773946b5be7fa737c540ffcc33e1266e1ef3f88
|
4
|
+
data.tar.gz: 4c94ce1d451e13399cf9c29154707d75b5bde5dfe2a663864dff4587bf724017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ea473f16af7b832d500c6b5692039281f77f5f581fe1f114d7f183443bfb4149a415fc5f021d8255662d5712a369d0a52d943367962ea14b301b7f12ef859f5
|
7
|
+
data.tar.gz: 492b437441e43a45505cb6223c7e317341eee786436cc44bd619dd00f765c07867bcd8b11824eef968360e6798aa9c83013e543a69466c48b81cb51f0a831979
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,47 @@
|
|
1
|
+
# 3.5.11 / 2024-05-28
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
* Update SPDX license list as of 2024-05-22. Pull request
|
6
|
+
[#7689](https://github.com/rubygems/rubygems/pull/7689) by
|
7
|
+
github-actions[bot]
|
8
|
+
* Fix the update_rubygems inconsistency (--disable-gems). Pull request
|
9
|
+
[#7658](https://github.com/rubygems/rubygems/pull/7658) by x-yuri
|
10
|
+
* Accept WASI as an OS name in Gem::Platform. Pull request
|
11
|
+
[#7629](https://github.com/rubygems/rubygems/pull/7629) by kateinoigakukun
|
12
|
+
* Warn if RubyGems version explicitly set in gemspec does not match
|
13
|
+
running version. Pull request
|
14
|
+
[#7460](https://github.com/rubygems/rubygems/pull/7460) by
|
15
|
+
deivid-rodriguez
|
16
|
+
* Installs bundler 2.5.11 as a default gem.
|
17
|
+
|
18
|
+
## Bug fixes:
|
19
|
+
|
20
|
+
* Fix binstubs sometimes not getting regenerated when `--destdir` is
|
21
|
+
given. Pull request
|
22
|
+
[#7660](https://github.com/rubygems/rubygems/pull/7660) by
|
23
|
+
deivid-rodriguez
|
24
|
+
* Fix `gem uninstall --user-install` for symlinked HOME. Pull request
|
25
|
+
[#7645](https://github.com/rubygems/rubygems/pull/7645) by
|
26
|
+
deivid-rodriguez
|
27
|
+
* Fix issue when plugin stubs would sometimes not be properly removed by
|
28
|
+
`gem uninstall`. Pull request
|
29
|
+
[#7631](https://github.com/rubygems/rubygems/pull/7631) by
|
30
|
+
deivid-rodriguez
|
31
|
+
* Fix plugins uninstallation for user installed gems. Pull request
|
32
|
+
[#6456](https://github.com/rubygems/rubygems/pull/6456) by voxik
|
33
|
+
|
34
|
+
## Performance:
|
35
|
+
|
36
|
+
* Use a constant empty tar header to avoid extra allocations. Pull request
|
37
|
+
[#7484](https://github.com/rubygems/rubygems/pull/7484) by segiddins
|
38
|
+
|
39
|
+
## Documentation:
|
40
|
+
|
41
|
+
* Recommend `bin/rake` over `rake` in contributing docs. Pull request
|
42
|
+
[#7648](https://github.com/rubygems/rubygems/pull/7648) by
|
43
|
+
deivid-rodriguez
|
44
|
+
|
1
45
|
# 3.5.10 / 2024-05-03
|
2
46
|
|
3
47
|
## Security:
|
@@ -5949,7 +5993,7 @@ There has been some minor usability enhancements and changes ...
|
|
5949
5993
|
This *greatly* speeds up gem commands run in non-admin mode when the
|
5950
5994
|
site-wide cache is out of date.
|
5951
5995
|
* The gem command now used an HTTP HEAD command to detect if the
|
5952
|
-
server's source index needs to be
|
5996
|
+
server's source index needs to be downloaded.
|
5953
5997
|
* gem check gemname --test will run unit tests on installed gems that
|
5954
5998
|
have unit tests.
|
5955
5999
|
* Multiple gem names are allowed on the gem install command line.
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -2,80 +2,131 @@
|
|
2
2
|
|
3
3
|
## Our Pledge
|
4
4
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
10
|
+
identity and orientation.
|
6
11
|
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13
|
+
diverse, inclusive, and healthy community.
|
8
14
|
|
9
15
|
## Our Standards
|
10
16
|
|
11
|
-
Examples of behavior that contributes to a positive environment for our
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
18
|
+
community include:
|
12
19
|
|
13
20
|
* Demonstrating empathy and kindness toward other people
|
14
21
|
* Being respectful of differing opinions, viewpoints, and experiences
|
15
22
|
* Giving and gracefully accepting constructive feedback
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
17
|
-
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24
|
+
and learning from the experience
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
26
|
+
community
|
18
27
|
|
19
28
|
Examples of unacceptable behavior include:
|
20
29
|
|
21
|
-
* The use of sexualized language or imagery, and sexual attention or advances of
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
31
|
+
any kind
|
22
32
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
23
33
|
* Public or private harassment
|
24
|
-
* Publishing others' private information, such as a physical or email address,
|
25
|
-
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
35
|
+
without their explicit permission
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
37
|
+
professional setting
|
26
38
|
|
27
39
|
## Enforcement Responsibilities
|
28
40
|
|
29
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44
|
+
or harmful.
|
30
45
|
|
31
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
49
|
+
decisions when appropriate.
|
32
50
|
|
33
51
|
## Scope
|
34
52
|
|
35
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
54
|
+
an individual is officially representing the community in public spaces.
|
55
|
+
Examples of representing our community include using an official email address,
|
56
|
+
posting via an official social media account, or acting as an appointed
|
57
|
+
representative at an online or offline event.
|
36
58
|
|
37
59
|
## Enforcement
|
38
60
|
|
39
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
reported to the community leaders responsible for enforcement at
|
63
|
+
team@bundler.io.
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
40
65
|
|
41
|
-
All community leaders are obligated to respect the privacy and security of the
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
67
|
+
reporter of any incident.
|
42
68
|
|
43
69
|
## Enforcement Guidelines
|
44
70
|
|
45
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
46
73
|
|
47
74
|
### 1. Correction
|
48
75
|
|
49
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77
|
+
unprofessional or unwelcome in the community.
|
50
78
|
|
51
|
-
**Consequence**: A private, written warning from community leaders, providing
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
52
82
|
|
53
83
|
### 2. Warning
|
54
84
|
|
55
|
-
**Community Impact**: A violation through a single incident or series of
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
86
|
+
actions.
|
56
87
|
|
57
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
93
|
+
ban.
|
58
94
|
|
59
95
|
### 3. Temporary Ban
|
60
96
|
|
61
|
-
**Community Impact**: A serious violation of community standards, including
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
98
|
+
sustained inappropriate behavior.
|
62
99
|
|
63
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
101
|
+
communication with the community for a specified period of time. No public or
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
104
|
+
Violating these terms may lead to a permanent ban.
|
64
105
|
|
65
106
|
### 4. Permanent Ban
|
66
107
|
|
67
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
68
111
|
|
69
|
-
**Consequence**: A permanent ban from any sort of public interaction within the
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
113
|
+
community.
|
70
114
|
|
71
115
|
## Attribution
|
72
116
|
|
73
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
74
|
-
available at
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
118
|
+
version 2.1, available at
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
75
120
|
|
76
|
-
Community Impact Guidelines were inspired by
|
77
|
-
|
78
|
-
[homepage]: https://www.contributor-covenant.org
|
121
|
+
Community Impact Guidelines were inspired by
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
79
123
|
|
80
124
|
For answers to common questions about this code of conduct, see the FAQ at
|
81
|
-
https://www.contributor-covenant.org/faq. Translations are available at
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
127
|
+
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/CONTRIBUTING.md
CHANGED
@@ -31,7 +31,7 @@ here: https://guides.rubygems.org/contributing/
|
|
31
31
|
|
32
32
|
### Installing dependencies
|
33
33
|
|
34
|
-
rake setup
|
34
|
+
bin/rake setup
|
35
35
|
|
36
36
|
> **NOTE**: If the above fails with permission related errors, you're most
|
37
37
|
> likely using a global Ruby installation (like the one packaged by your OS),
|
@@ -58,7 +58,7 @@ To run commands like `bundle install` from the repo:
|
|
58
58
|
|
59
59
|
To run the entire test suite you can use:
|
60
60
|
|
61
|
-
rake test
|
61
|
+
bin/rake test
|
62
62
|
|
63
63
|
To run an individual test file located for example in `test/rubygems/test_deprecate.rb` you can use:
|
64
64
|
|
data/Manifest.txt
CHANGED
@@ -515,6 +515,7 @@ lib/rubygems/source_list.rb
|
|
515
515
|
lib/rubygems/spec_fetcher.rb
|
516
516
|
lib/rubygems/specification.rb
|
517
517
|
lib/rubygems/specification_policy.rb
|
518
|
+
lib/rubygems/specification_record.rb
|
518
519
|
lib/rubygems/ssl_certs/.document
|
519
520
|
lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem
|
520
521
|
lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,31 @@
|
|
1
|
+
# 2.5.11 (May 28, 2024)
|
2
|
+
|
3
|
+
## Deprecations:
|
4
|
+
|
5
|
+
- Deprecate Bundler constants [#7653](https://github.com/rubygems/rubygems/pull/7653)
|
6
|
+
|
7
|
+
## Enhancements:
|
8
|
+
|
9
|
+
- Bump `bundle gem` generated COC to Contributor Covenant 2.1 [#7692](https://github.com/rubygems/rubygems/pull/7692)
|
10
|
+
- Retry a full clone when git server does not support shallow capabilities [#7649](https://github.com/rubygems/rubygems/pull/7649)
|
11
|
+
|
12
|
+
## Bug fixes:
|
13
|
+
|
14
|
+
- Fix regression when caching gems from secondary sources [#7659](https://github.com/rubygems/rubygems/pull/7659)
|
15
|
+
- Fix error when Bundler installation is corrupted [#7642](https://github.com/rubygems/rubygems/pull/7642)
|
16
|
+
- Fix crash caused by RubyGems `require` gem activation logic running before Bundler can properly register its own monkeypatches [#7647](https://github.com/rubygems/rubygems/pull/7647)
|
17
|
+
|
18
|
+
## Performance:
|
19
|
+
|
20
|
+
- Update cache checksums to decrease string allocations [#7637](https://github.com/rubygems/rubygems/pull/7637)
|
21
|
+
- Fix performance regression in applications with a local cache [#7680](https://github.com/rubygems/rubygems/pull/7680)
|
22
|
+
|
23
|
+
## Documentation:
|
24
|
+
|
25
|
+
- Recommend `bin/rake` over `rake` in contributing docs [#7648](https://github.com/rubygems/rubygems/pull/7648)
|
26
|
+
- Monthly man update for May 2024 [#7640](https://github.com/rubygems/rubygems/pull/7640)
|
27
|
+
- Clarify Bundler support policy [#7633](https://github.com/rubygems/rubygems/pull/7633)
|
28
|
+
|
1
29
|
# 2.5.10 (May 3, 2024)
|
2
30
|
|
3
31
|
## Security:
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2024-05-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2024-05-28".freeze
|
8
|
+
@git_commit_sha = "4afb2d450a".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -14,7 +14,7 @@ module Bundler
|
|
14
14
|
|
15
15
|
Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
|
16
16
|
|
17
|
-
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if
|
17
|
+
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Gem.freebsd_platform?
|
18
18
|
|
19
19
|
# Disable color in deployment mode
|
20
20
|
Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment]
|
@@ -55,14 +55,9 @@ module Bundler
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def checksums
|
58
|
-
|
59
|
-
|
60
|
-
lines(versions_path).each do |line|
|
61
|
-
name, _, checksum = line.split(" ", 3)
|
62
|
-
checksums[name] = checksum
|
58
|
+
lines(versions_path).each_with_object({}) do |line, checksums|
|
59
|
+
parse_version_checksum(line, checksums)
|
63
60
|
end
|
64
|
-
|
65
|
-
checksums
|
66
61
|
end
|
67
62
|
|
68
63
|
def dependencies(name)
|
@@ -106,6 +101,20 @@ module Bundler
|
|
106
101
|
@dependency_parser.parse(line)
|
107
102
|
end
|
108
103
|
|
104
|
+
# This is mostly the same as `split(" ", 3)` but it avoids allocating extra objects.
|
105
|
+
# This method gets called at least once for every gem when parsing versions.
|
106
|
+
def parse_version_checksum(line, checksums)
|
107
|
+
line.freeze # allows slicing into the string to not allocate a copy of the line
|
108
|
+
name_end = line.index(" ")
|
109
|
+
checksum_start = line.index(" ", name_end + 1) + 1
|
110
|
+
checksum_end = line.size - checksum_start
|
111
|
+
# freeze name since it is used as a hash key
|
112
|
+
# pre-freezing means a frozen copy isn't created
|
113
|
+
name = line[0, name_end].freeze
|
114
|
+
checksum = line[checksum_start, checksum_end]
|
115
|
+
checksums[name] = checksum
|
116
|
+
end
|
117
|
+
|
109
118
|
def info_roots
|
110
119
|
[
|
111
120
|
directory.join("info"),
|
@@ -1,7 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "rbconfig"
|
4
|
+
|
3
5
|
module Bundler
|
4
6
|
WINDOWS = RbConfig::CONFIG["host_os"] =~ /(msdos|mswin|djgpp|mingw)/
|
7
|
+
deprecate_constant :WINDOWS
|
8
|
+
|
5
9
|
FREEBSD = RbConfig::CONFIG["host_os"].to_s.include?("bsd")
|
6
|
-
|
10
|
+
deprecate_constant :FREEBSD
|
11
|
+
|
12
|
+
NULL = File::NULL
|
13
|
+
deprecate_constant :NULL
|
7
14
|
end
|
@@ -69,7 +69,6 @@ module Bundler
|
|
69
69
|
@sources = sources
|
70
70
|
@unlock = unlock
|
71
71
|
@optional_groups = optional_groups
|
72
|
-
@remote = false
|
73
72
|
@prefer_local = false
|
74
73
|
@specs = nil
|
75
74
|
@ruby_version = ruby_version
|
@@ -164,37 +163,24 @@ module Bundler
|
|
164
163
|
end
|
165
164
|
|
166
165
|
def resolve_only_locally!
|
167
|
-
@remote = false
|
168
166
|
sources.local_only!
|
169
167
|
resolve
|
170
168
|
end
|
171
169
|
|
172
170
|
def resolve_with_cache!
|
171
|
+
sources.local!
|
173
172
|
sources.cached!
|
174
173
|
resolve
|
175
174
|
end
|
176
175
|
|
177
176
|
def resolve_remotely!
|
178
|
-
|
177
|
+
sources.cached!
|
179
178
|
sources.remote!
|
180
179
|
resolve
|
181
180
|
end
|
182
181
|
|
183
|
-
def
|
184
|
-
|
185
|
-
@remote = false
|
186
|
-
else
|
187
|
-
@remote = true
|
188
|
-
@prefer_local = options["prefer-local"]
|
189
|
-
end
|
190
|
-
end
|
191
|
-
|
192
|
-
def setup_sources_for_resolve
|
193
|
-
if @remote == false
|
194
|
-
sources.cached!
|
195
|
-
else
|
196
|
-
sources.remote!
|
197
|
-
end
|
182
|
+
def prefer_local!
|
183
|
+
@prefer_local = true
|
198
184
|
end
|
199
185
|
|
200
186
|
# For given dependency list returns a SpecSet with Gemspec of all the required
|
@@ -310,7 +296,12 @@ module Bundler
|
|
310
296
|
end
|
311
297
|
end
|
312
298
|
else
|
313
|
-
|
299
|
+
if lockfile_exists?
|
300
|
+
Bundler.ui.debug "Found changes from the lockfile, re-resolving dependencies because #{change_reason}"
|
301
|
+
else
|
302
|
+
Bundler.ui.debug "Resolving dependencies because there's no lockfile"
|
303
|
+
end
|
304
|
+
|
314
305
|
start_resolution
|
315
306
|
end
|
316
307
|
end
|
@@ -483,6 +474,8 @@ module Bundler
|
|
483
474
|
private :sources
|
484
475
|
|
485
476
|
def nothing_changed?
|
477
|
+
return false unless lockfile_exists?
|
478
|
+
|
486
479
|
!@source_changes &&
|
487
480
|
!@dependency_changes &&
|
488
481
|
!@new_platform &&
|
@@ -587,7 +580,7 @@ module Bundler
|
|
587
580
|
if missing_specs.any?
|
588
581
|
missing_specs.each do |s|
|
589
582
|
locked_gem = @locked_specs[s.name].last
|
590
|
-
next if locked_gem.nil? || locked_gem.version != s.version ||
|
583
|
+
next if locked_gem.nil? || locked_gem.version != s.version || sources.local_mode?
|
591
584
|
raise GemNotFound, "Your bundle is locked to #{locked_gem} from #{locked_gem.source}, but that version can " \
|
592
585
|
"no longer be found in that source. That means the author of #{locked_gem} has removed it. " \
|
593
586
|
"You'll need to update your bundle to a version other than #{locked_gem} that hasn't been " \
|
@@ -606,7 +599,7 @@ module Bundler
|
|
606
599
|
break if incomplete_specs.empty?
|
607
600
|
|
608
601
|
Bundler.ui.debug("The lockfile does not have all gems needed for the current platform though, Bundler will still re-resolve dependencies")
|
609
|
-
|
602
|
+
sources.remote!
|
610
603
|
resolution_packages.delete(incomplete_specs)
|
611
604
|
@resolve = start_resolution
|
612
605
|
specs = resolve.materialize(dependencies)
|
@@ -967,7 +960,7 @@ module Bundler
|
|
967
960
|
else
|
968
961
|
{ default: Source::RubygemsAggregate.new(sources, source_map) }.merge(source_map.direct_requirements)
|
969
962
|
end
|
970
|
-
source_requirements.merge!(source_map.locked_requirements)
|
963
|
+
source_requirements.merge!(source_map.locked_requirements) if nothing_changed?
|
971
964
|
metadata_dependencies.each do |dep|
|
972
965
|
source_requirements[dep.name] = sources.metadata_source
|
973
966
|
end
|
@@ -1038,8 +1031,6 @@ module Bundler
|
|
1038
1031
|
|
1039
1032
|
def dup_for_full_unlock
|
1040
1033
|
unlocked_definition = self.class.new(@lockfile, @dependencies, @sources, true, @ruby_version, @optional_groups, @gemfiles)
|
1041
|
-
unlocked_definition.resolution_mode = { "local" => !@remote }
|
1042
|
-
unlocked_definition.setup_sources_for_resolve
|
1043
1034
|
unlocked_definition.gem_version_promoter.tap do |gvp|
|
1044
1035
|
gvp.level = gem_version_promoter.level
|
1045
1036
|
gvp.strict = gem_version_promoter.strict
|
@@ -230,4 +230,18 @@ module Bundler
|
|
230
230
|
|
231
231
|
status_code(38)
|
232
232
|
end
|
233
|
+
|
234
|
+
class CorruptBundlerInstallError < BundlerError
|
235
|
+
def initialize(loaded_spec)
|
236
|
+
@loaded_spec = loaded_spec
|
237
|
+
end
|
238
|
+
|
239
|
+
def message
|
240
|
+
"The running version of Bundler (#{Bundler::VERSION}) does not match the version of the specification installed for it (#{@loaded_spec.version}). " \
|
241
|
+
"This can be caused by reinstalling Ruby without removing previous installation, leaving around an upgraded default version of Bundler. " \
|
242
|
+
"Reinstalling Ruby from scratch should fix the problem."
|
243
|
+
end
|
244
|
+
|
245
|
+
status_code(39)
|
246
|
+
end
|
233
247
|
end
|
@@ -47,7 +47,7 @@ module Bundler
|
|
47
47
|
built_gem_path = build_gem
|
48
48
|
end
|
49
49
|
|
50
|
-
desc "Generate SHA512 checksum
|
50
|
+
desc "Generate SHA512 checksum of #{name}-#{version}.gem into the checksums directory."
|
51
51
|
task "build:checksum" => "build" do
|
52
52
|
build_checksum(built_gem_path)
|
53
53
|
end
|
@@ -249,15 +249,15 @@ module Bundler
|
|
249
249
|
|
250
250
|
# returns whether or not a re-resolve was needed
|
251
251
|
def resolve_if_needed(options)
|
252
|
-
@definition.
|
253
|
-
|
254
|
-
if
|
255
|
-
|
252
|
+
@definition.prefer_local! if options["prefer-local"]
|
253
|
+
|
254
|
+
if options["local"] || (@definition.no_resolve_needed? && !@definition.missing_specs?)
|
255
|
+
@definition.resolve_with_cache!
|
256
|
+
false
|
257
|
+
else
|
258
|
+
@definition.resolve_remotely!
|
259
|
+
true
|
256
260
|
end
|
257
|
-
|
258
|
-
@definition.setup_sources_for_resolve
|
259
|
-
|
260
|
-
true
|
261
261
|
end
|
262
262
|
|
263
263
|
def lock
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-BINSTUBS" "1" "
|
3
|
+
.TH "BUNDLE\-BINSTUBS" "1" "May 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-CACHE" "1" "
|
3
|
+
.TH "BUNDLE\-CACHE" "1" "May 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-CHECK" "1" "
|
3
|
+
.TH "BUNDLE\-CHECK" "1" "May 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-CONSOLE" "1" "
|
3
|
+
.TH "BUNDLE\-CONSOLE" "1" "May 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" generated with nRonn/v0.11.1
|
2
2
|
.\" https://github.com/n-ronn/nronn/tree/0.11.1
|
3
|
-
.TH "BUNDLE\-INIT" "1" "
|
3
|
+
.TH "BUNDLE\-INIT" "1" "May 2024" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
|
6
6
|
.SH "SYNOPSIS"
|