rubygems-update 4.0.0.beta1 → 4.0.0
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 +69 -37
- data/Manifest.txt +1 -2
- data/README.md +1 -1
- data/bundler/CHANGELOG.md +65 -34
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/install.rb +2 -0
- data/bundler/lib/bundler/cli.rb +50 -13
- data/bundler/lib/bundler/definition.rb +22 -1
- data/bundler/lib/bundler/dsl.rb +15 -3
- data/bundler/lib/bundler/environment_preserver.rb +1 -0
- data/bundler/lib/bundler/inline.rb +8 -0
- data/bundler/lib/bundler/man/bundle-config.1 +3 -0
- data/bundler/lib/bundler/man/bundle-config.1.ronn +4 -0
- data/bundler/lib/bundler/man/bundle-install.1 +9 -1
- data/bundler/lib/bundler/man/bundle-install.1.ronn +15 -0
- data/bundler/lib/bundler/man/gemfile.5 +31 -0
- data/bundler/lib/bundler/man/gemfile.5.ronn +28 -0
- data/bundler/lib/bundler/runtime.rb +5 -1
- data/bundler/lib/bundler/settings.rb +1 -0
- data/bundler/lib/bundler/shared_helpers.rb +4 -0
- data/bundler/lib/bundler/templates/newgem/Rakefile.tt +5 -0
- data/bundler/lib/bundler/ui/shell.rb +10 -6
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +1 -1
- data/bundler/lib/bundler/version.rb +1 -1
- data/doc/UPGRADING.md +28 -0
- data/doc/rubygems/POLICIES.md +0 -144
- data/lib/rubygems/bundler_version_finder.rb +37 -3
- data/lib/rubygems/ext/ext_conf_builder.rb +3 -0
- data/lib/rubygems/version.rb +6 -3
- data/lib/rubygems.rb +3 -3
- data/rubygems-update.gemspec +4 -2
- metadata +3 -4
- data/doc/bundler/UPGRADING.md +0 -211
- data/doc/rubygems/UPGRADING.md +0 -15
|
@@ -8,7 +8,9 @@ bundle-install(1) -- Install the dependencies specified in your Gemfile
|
|
|
8
8
|
[--gemfile=GEMFILE]
|
|
9
9
|
[--jobs=NUMBER]
|
|
10
10
|
[--local]
|
|
11
|
+
[--lockfile=LOCKFILE]
|
|
11
12
|
[--no-cache]
|
|
13
|
+
[--no-lock]
|
|
12
14
|
[--prefer-local]
|
|
13
15
|
[--quiet]
|
|
14
16
|
[--retry=NUMBER]
|
|
@@ -60,6 +62,10 @@ update process below under [CONSERVATIVE UPDATING][].
|
|
|
60
62
|
appropriate platform-specific gem exists on `rubygems.org` it will not be
|
|
61
63
|
found.
|
|
62
64
|
|
|
65
|
+
* `--lockfile=LOCKFILE`:
|
|
66
|
+
The location of the lockfile which Bundler should use. This defaults
|
|
67
|
+
to the Gemfile location with `.lock` appended.
|
|
68
|
+
|
|
63
69
|
* `--prefer-local`:
|
|
64
70
|
Force using locally installed gems, or gems already present in Rubygems' cache
|
|
65
71
|
or in `vendor/cache`, when resolving, even if newer versions are available
|
|
@@ -71,6 +77,15 @@ update process below under [CONSERVATIVE UPDATING][].
|
|
|
71
77
|
does not remove any gems in the cache but keeps the newly bundled gems from
|
|
72
78
|
being cached during the install.
|
|
73
79
|
|
|
80
|
+
* `--no-lock`:
|
|
81
|
+
Do not create a lockfile. Useful if you want to install dependencies but not
|
|
82
|
+
lock versions of gems. Recommended for library development, and other
|
|
83
|
+
situations where the code is expected to work with a range of dependency
|
|
84
|
+
versions.
|
|
85
|
+
|
|
86
|
+
This has the same effect as using `lockfile false` in the Gemfile.
|
|
87
|
+
See gemfile(5) for more information.
|
|
88
|
+
|
|
74
89
|
* `--quiet`:
|
|
75
90
|
Do not print progress information to the standard output.
|
|
76
91
|
|
|
@@ -469,4 +469,35 @@ For implicit gems (dependencies of explicit gems), any source, git, or path repo
|
|
|
469
469
|
.IP "3." 4
|
|
470
470
|
If neither of the above conditions are met, the global source will be used\. If multiple global sources are specified, they will be prioritized from last to first, but this is deprecated since Bundler 1\.13, so Bundler prints a warning and will abort with an error in the future\.
|
|
471
471
|
.IP "" 0
|
|
472
|
+
.SH "LOCKFILE"
|
|
473
|
+
By default, Bundler will create a lockfile by adding \fB\.lock\fR to the end of the Gemfile name\. To change this, use the \fBlockfile\fR method:
|
|
474
|
+
.IP "" 4
|
|
475
|
+
.nf
|
|
476
|
+
lockfile "/path/to/lockfile\.lock"
|
|
477
|
+
.fi
|
|
478
|
+
.IP "" 0
|
|
479
|
+
.P
|
|
480
|
+
This is useful when you want to use different lockfiles per ruby version or platform\.
|
|
481
|
+
.P
|
|
482
|
+
To avoid writing a lock file, use \fBfalse\fR as the argument:
|
|
483
|
+
.IP "" 4
|
|
484
|
+
.nf
|
|
485
|
+
lockfile false
|
|
486
|
+
.fi
|
|
487
|
+
.IP "" 0
|
|
488
|
+
.P
|
|
489
|
+
This is useful for library development and other situations where the code is expected to work with a range of dependency versions\.
|
|
490
|
+
.SS "LOCKFILE PRECEDENCE"
|
|
491
|
+
When determining path to the lockfile or whether to create a lockfile, the following precedence is used:
|
|
492
|
+
.IP "1." 4
|
|
493
|
+
The \fBbundle install\fR \fB\-\-no\-lock\fR option (which disables lockfile creation)\.
|
|
494
|
+
.IP "2." 4
|
|
495
|
+
The \fBbundle install\fR \fB\-\-lockfile\fR option\.
|
|
496
|
+
.IP "3." 4
|
|
497
|
+
The \fBBUNDLE_LOCKFILE\fR environment variable\.
|
|
498
|
+
.IP "4." 4
|
|
499
|
+
The \fBlockfile\fR method in the Gemfile\.
|
|
500
|
+
.IP "5." 4
|
|
501
|
+
The default behavior of adding \fB\.lock\fR to the end of the Gemfile name\.
|
|
502
|
+
.IP "" 0
|
|
472
503
|
|
|
@@ -556,3 +556,31 @@ bundler uses the following priority order:
|
|
|
556
556
|
If multiple global sources are specified, they will be prioritized from
|
|
557
557
|
last to first, but this is deprecated since Bundler 1.13, so Bundler prints
|
|
558
558
|
a warning and will abort with an error in the future.
|
|
559
|
+
|
|
560
|
+
## LOCKFILE
|
|
561
|
+
|
|
562
|
+
By default, Bundler will create a lockfile by adding `.lock` to the end of the
|
|
563
|
+
Gemfile name. To change this, use the `lockfile` method:
|
|
564
|
+
|
|
565
|
+
lockfile "/path/to/lockfile.lock"
|
|
566
|
+
|
|
567
|
+
This is useful when you want to use different lockfiles per ruby version or
|
|
568
|
+
platform.
|
|
569
|
+
|
|
570
|
+
To avoid writing a lock file, use `false` as the argument:
|
|
571
|
+
|
|
572
|
+
lockfile false
|
|
573
|
+
|
|
574
|
+
This is useful for library development and other situations where the code is
|
|
575
|
+
expected to work with a range of dependency versions.
|
|
576
|
+
|
|
577
|
+
### LOCKFILE PRECEDENCE
|
|
578
|
+
|
|
579
|
+
When determining path to the lockfile or whether to create a lockfile, the
|
|
580
|
+
following precedence is used:
|
|
581
|
+
|
|
582
|
+
1. The `bundle install` `--no-lock` option (which disables lockfile creation).
|
|
583
|
+
1. The `bundle install` `--lockfile` option.
|
|
584
|
+
1. The `BUNDLE_LOCKFILE` environment variable.
|
|
585
|
+
1. The `lockfile` method in the Gemfile.
|
|
586
|
+
1. The default behavior of adding `.lock` to the end of the Gemfile name.
|
|
@@ -23,6 +23,9 @@ module Bundler
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def default_lockfile
|
|
26
|
+
given = ENV["BUNDLE_LOCKFILE"]
|
|
27
|
+
return Pathname.new(given) if given && !given.empty?
|
|
28
|
+
|
|
26
29
|
gemfile = default_gemfile
|
|
27
30
|
|
|
28
31
|
case gemfile.basename.to_s
|
|
@@ -297,6 +300,7 @@ module Bundler
|
|
|
297
300
|
def set_bundle_variables
|
|
298
301
|
Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", bundle_bin_path
|
|
299
302
|
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", find_gemfile.to_s
|
|
303
|
+
Bundler::SharedHelpers.set_env "BUNDLE_LOCKFILE", default_lockfile.to_s
|
|
300
304
|
Bundler::SharedHelpers.set_env "BUNDLER_VERSION", Bundler::VERSION
|
|
301
305
|
Bundler::SharedHelpers.set_env "BUNDLER_SETUP", File.expand_path("setup", __dir__)
|
|
302
306
|
end
|
|
@@ -59,6 +59,11 @@ Rake::ExtensionTask.new("<%= config[:underscored_name] %>", GEMSPEC) do |ext|
|
|
|
59
59
|
end
|
|
60
60
|
<% end -%>
|
|
61
61
|
|
|
62
|
+
<% if config[:ext] == "go" -%>
|
|
63
|
+
require "go_gem/rake_task"
|
|
64
|
+
|
|
65
|
+
GoGem::RakeTask.new("<%= config[:underscored_name] %>")
|
|
66
|
+
<% end -%>
|
|
62
67
|
<% end -%>
|
|
63
68
|
<% if default_task_names.size == 1 -%>
|
|
64
69
|
task default: <%= default_task_names.first.inspect %>
|
|
@@ -17,6 +17,7 @@ module Bundler
|
|
|
17
17
|
@level = ENV["DEBUG"] ? "debug" : "info"
|
|
18
18
|
@warning_history = []
|
|
19
19
|
@output_stream = :stdout
|
|
20
|
+
@thread_safe_logger_key = "logger_level_#{object_id}"
|
|
20
21
|
end
|
|
21
22
|
|
|
22
23
|
def add_color(string, *color)
|
|
@@ -97,11 +98,13 @@ module Bundler
|
|
|
97
98
|
end
|
|
98
99
|
|
|
99
100
|
def level(name = nil)
|
|
100
|
-
|
|
101
|
+
current_level = Thread.current.thread_variable_get(@thread_safe_logger_key) || @level
|
|
102
|
+
return current_level unless name
|
|
103
|
+
|
|
101
104
|
unless index = LEVELS.index(name)
|
|
102
105
|
raise "#{name.inspect} is not a valid level"
|
|
103
106
|
end
|
|
104
|
-
index <= LEVELS.index(
|
|
107
|
+
index <= LEVELS.index(current_level)
|
|
105
108
|
end
|
|
106
109
|
|
|
107
110
|
def output_stream=(symbol)
|
|
@@ -167,12 +170,13 @@ module Bundler
|
|
|
167
170
|
end * "\n"
|
|
168
171
|
end
|
|
169
172
|
|
|
170
|
-
def with_level(
|
|
171
|
-
|
|
172
|
-
@
|
|
173
|
+
def with_level(desired_level)
|
|
174
|
+
old_level = level
|
|
175
|
+
Thread.current.thread_variable_set(@thread_safe_logger_key, desired_level)
|
|
176
|
+
|
|
173
177
|
yield
|
|
174
178
|
ensure
|
|
175
|
-
@
|
|
179
|
+
Thread.current.thread_variable_set(@thread_safe_logger_key, old_level)
|
|
176
180
|
end
|
|
177
181
|
|
|
178
182
|
def with_output_stream(symbol)
|
|
@@ -625,7 +625,7 @@ class Bundler::Thor
|
|
|
625
625
|
# alias name.
|
|
626
626
|
def find_command_possibilities(meth)
|
|
627
627
|
len = meth.to_s.length
|
|
628
|
-
possibilities = all_commands.merge(map).keys.select { |n| meth == n[0, len] }.sort
|
|
628
|
+
possibilities = all_commands.reject { |_k, c| c.hidden? }.merge(map).keys.select { |n| meth == n[0, len] }.sort
|
|
629
629
|
unique_possibilities = possibilities.map { |k| map[k] || k }.uniq
|
|
630
630
|
|
|
631
631
|
if possibilities.include?(meth)
|
data/doc/UPGRADING.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# How to upgrade/downgrade Rubygems and Bundler:
|
|
2
|
+
|
|
3
|
+
## Upgrade Recipe
|
|
4
|
+
|
|
5
|
+
$ gem update --system
|
|
6
|
+
|
|
7
|
+
$ gem install bundler
|
|
8
|
+
$ bundle update --bundler
|
|
9
|
+
|
|
10
|
+
## Downgrade Recipe
|
|
11
|
+
|
|
12
|
+
$ gem update --system 3.7.2
|
|
13
|
+
|
|
14
|
+
$ gem install bundler -v 2.7.2
|
|
15
|
+
$ bundle update --bundler=2.7.2
|
|
16
|
+
|
|
17
|
+
## Install a pre-release version
|
|
18
|
+
|
|
19
|
+
$ gem update --system --pre
|
|
20
|
+
|
|
21
|
+
$ gem install bundler --pre
|
|
22
|
+
$ bundle update --bundler=4.0.0.beta1
|
|
23
|
+
|
|
24
|
+
## Install from source
|
|
25
|
+
|
|
26
|
+
* Download from: https://rubygems.org/pages/download
|
|
27
|
+
* Unpack into a directory and `cd` there
|
|
28
|
+
* Install with: `ruby setup.rb`
|
data/doc/rubygems/POLICIES.md
CHANGED
|
@@ -40,150 +40,6 @@ releases will only support Ruby 2.3 and above. As of this writing RubyGems is
|
|
|
40
40
|
at version 2.7, so when RubyGems 2.8 is released, it will only support Ruby
|
|
41
41
|
2.3 and later.
|
|
42
42
|
|
|
43
|
-
## Release Process
|
|
44
|
-
|
|
45
|
-
### Permissions
|
|
46
|
-
|
|
47
|
-
You'll need the following environment variables set to release RubyGems &
|
|
48
|
-
Bundler:
|
|
49
|
-
|
|
50
|
-
* AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY: to be able to push RubyGems zip
|
|
51
|
-
files to s3 so that they appear at RubyGems [download page].
|
|
52
|
-
|
|
53
|
-
* GITHUB_RELEASE_PAT: A [GitHub PAT] with repo permissions, in order to push
|
|
54
|
-
GitHub releases and to use the GitHub API for changelog generation.
|
|
55
|
-
|
|
56
|
-
[download page]: https://rubygems.org/pages/download
|
|
57
|
-
[GitHub PAT]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
|
|
58
|
-
|
|
59
|
-
### Recommendations for security releases
|
|
60
|
-
|
|
61
|
-
* Obtain CVE numbers as needed from HackerOne or Red Hat.
|
|
62
|
-
* Agree on a release date with ruby-core, so patches can be backported to
|
|
63
|
-
older Ruby versions as needed.
|
|
64
|
-
* Avoid releasing security updates on Fridays, so platform services don't
|
|
65
|
-
have to work on weekends.
|
|
66
|
-
* Continue with the regular release process below.
|
|
67
|
-
|
|
68
|
-
### Branching
|
|
69
|
-
|
|
70
|
-
Bundler releases are synchronized with rubygems releases at the moment. That
|
|
71
|
-
means that releases for both share the same stable branch, and they should
|
|
72
|
-
generally happen together.
|
|
73
|
-
|
|
74
|
-
The current conventional naming for stable branches is `x+1.y`, where `x.y` is
|
|
75
|
-
the version of `bundler` that will be released. This is because `rubygems-x+1.y`
|
|
76
|
-
will be released at the same time.
|
|
77
|
-
|
|
78
|
-
For example, `rubygems-3.2.0` and `bundler-2.2.0` were both released from the
|
|
79
|
-
`3.2` stable branch.
|
|
80
|
-
|
|
81
|
-
Once a stable branch has been cut from `master`, changes for that minor release
|
|
82
|
-
series are only made _intentionally_, via patch releases. That is to say,
|
|
83
|
-
changes to `master` by default _won't_ make their way into the current stable
|
|
84
|
-
branch, and development on `master` will be targeting the next minor
|
|
85
|
-
or major release.
|
|
86
|
-
|
|
87
|
-
There is a `bin/rake prepare_release[<target_rubygems_version>]` rake task
|
|
88
|
-
that helps with creating a release. It takes a single argument, the _exact
|
|
89
|
-
rubygems release_ being made (e.g. `3.2.3` when releasing bundler `2.2.3`).
|
|
90
|
-
This task checks out the appropriate stable branch (`3.2`, for example), grabs
|
|
91
|
-
all merged but unreleased PRs from both bundler & rubygems from GitHub that are
|
|
92
|
-
compatible with the target release level, and then cherry-picks those changes
|
|
93
|
-
(and only those changes) to a new branch based off the stable branch. Then bumps
|
|
94
|
-
the version in all version files, synchronizes both changelogs to include all
|
|
95
|
-
backported changes and commits that change on top of the cherry-picks.
|
|
96
|
-
|
|
97
|
-
Note that this task requires all user facing pull requests to be tagged with
|
|
98
|
-
specific labels. See [Merging a PR](../bundler/playbooks/MERGING_A_PR.md) for details.
|
|
99
|
-
|
|
100
|
-
Also note that when this task cherry-picks, it cherry-picks the merge commits
|
|
101
|
-
using the following command:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
$ git cherry-pick -m 1 MERGE_COMMIT_SHAS
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
For example, for PR [#5029](https://github.com/rubygems/bundler/pull/5029), we
|
|
108
|
-
cherry picked commit [dd6aef9](https://github.com/rubygems/bundler/commit/dd6aef97a5f2e7173f406267256a8c319d6134ab),
|
|
109
|
-
not [4fe9291](https://github.com/rubygems/bundler/commit/4fe92919f51e3463f0aad6fa833ab68044311f03)
|
|
110
|
-
using:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
$ git cherry-pick -m 1 dd6aef9
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
After running the task, you'll have a release branch ready to be merged into the
|
|
117
|
-
stable branch. You'll want to open a PR from this branch into the stable branch
|
|
118
|
-
and provided CI is green, you can go ahead, merge the PR and run release tasks
|
|
119
|
-
as specified below from the updated stable branch.
|
|
120
|
-
|
|
121
|
-
### Automatic changelog and backport generation
|
|
122
|
-
|
|
123
|
-
PR labels and titles are used to automatically generate changelogs for patch and
|
|
124
|
-
minor releases.
|
|
125
|
-
|
|
126
|
-
When releasing, a changelog generation script goes through all PRs that have
|
|
127
|
-
never made it into a release, and selects only the ones with specific labels as
|
|
128
|
-
detailed in the `.changelog.yml` and `bundler/.changelog.yml` files. Those
|
|
129
|
-
particular PRs get backported to the stable branch and included in the release
|
|
130
|
-
changelog.
|
|
131
|
-
|
|
132
|
-
If PRs don't have a proper label, they won't be backported to patch releases.
|
|
133
|
-
|
|
134
|
-
If you want a PR to be backported to a patch level release, but don't want to
|
|
135
|
-
include it in the changelog, you can use the special `rubygems: skip changelog`
|
|
136
|
-
and `bundler: skip changelog` labels. For example, this is useful when
|
|
137
|
-
backporting a PR generates conflicts that are solved by backporting another PR
|
|
138
|
-
with no user visible changes. You can use these special labels to also backport
|
|
139
|
-
the other PR and not get any conflicts.
|
|
140
|
-
|
|
141
|
-
### Breaking changes
|
|
142
|
-
|
|
143
|
-
Bundler cares a lot about preserving compatibility. As a result, changes that
|
|
144
|
-
break backwards compatibility should (whenever this is possible) include a feature
|
|
145
|
-
release that is backwards compatible, and issue warnings for all options and
|
|
146
|
-
behaviors that will change.
|
|
147
|
-
|
|
148
|
-
We only release major breaking changes when incrementing the _major_ version of
|
|
149
|
-
Bundler and RubyGems. However, experience shows that almost every single part of
|
|
150
|
-
Bundler and RubyGems is depended on by someone in ways hard to anticipate. So if
|
|
151
|
-
we were strict about breaking changes we'd need to hold on from making progress
|
|
152
|
-
a lot, or continuously increment the major version, emptying "really major"
|
|
153
|
-
versions from their meaning. Because of this, we also may release "small"
|
|
154
|
-
breaking changes in minor releases. "Small" here means that we expect them to
|
|
155
|
-
affect only very few users in rare cases.
|
|
156
|
-
|
|
157
|
-
### Steps for patch releases
|
|
158
|
-
|
|
159
|
-
* Confirm all PRs that you want backported are properly tagged with `rubygems:
|
|
160
|
-
<type>` or `bundler: <type>` labels at GitHub.
|
|
161
|
-
* Run `bin/rake prepare_release[<target_rubygems_version>]`. This will create
|
|
162
|
-
a PR to the stable branch with the backports included in the release, and
|
|
163
|
-
proper changelogs and version bumps. It will also create a PR to merge
|
|
164
|
-
release changelogs into master.
|
|
165
|
-
* Once CI passes, merge the release PR, switch to the stable branch and pull
|
|
166
|
-
the PR just merged.
|
|
167
|
-
* Release `bundler` with `bin/rake bundler:release`.
|
|
168
|
-
* Release `rubygems` with `bin/rake release`.
|
|
169
|
-
|
|
170
|
-
### Steps for minor and major releases
|
|
171
|
-
|
|
172
|
-
* Confirm all PRs that you want listed in changelogs are properly tagged with
|
|
173
|
-
`rubygems: <type>` or `bundler: <type>` labels at GitHub.
|
|
174
|
-
* Run `bin/rake prepare_release[<target_rubygems_version>]`. This will create
|
|
175
|
-
a new stable branch off the master branch, and create a PR to it with the
|
|
176
|
-
proper version bumps and changelogs. It will also create a PR to merge
|
|
177
|
-
release changelogs into master.
|
|
178
|
-
* Replace the stable branch in the workflows with the new stable branch, and
|
|
179
|
-
push that change to the release PR.
|
|
180
|
-
* Replace version numbers with the next ".dev" version, and push that change
|
|
181
|
-
to the master PR.
|
|
182
|
-
* Once CI passes, merge the release PR, switch to the stable branch and pull
|
|
183
|
-
the PR just merged.
|
|
184
|
-
* Release `bundler` with `bin/rake bundler:release`.
|
|
185
|
-
* Release `rubygems` with `bin/rake release`.
|
|
186
|
-
|
|
187
43
|
## Committer Access
|
|
188
44
|
|
|
189
45
|
RubyGems committers may lose their commit privileges if they are inactive for
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Gem::BundlerVersionFinder
|
|
4
4
|
def self.bundler_version
|
|
5
|
+
return if bundle_config_version == "system"
|
|
6
|
+
|
|
5
7
|
v = ENV["BUNDLER_VERSION"]
|
|
6
8
|
v = nil if v&.empty?
|
|
7
9
|
|
|
@@ -65,9 +67,12 @@ module Gem::BundlerVersionFinder
|
|
|
65
67
|
|
|
66
68
|
return unless gemfile
|
|
67
69
|
|
|
68
|
-
lockfile =
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
lockfile = ENV["BUNDLE_LOCKFILE"]
|
|
71
|
+
lockfile = nil if lockfile&.empty?
|
|
72
|
+
|
|
73
|
+
lockfile ||= case gemfile
|
|
74
|
+
when "gems.rb" then "gems.locked"
|
|
75
|
+
else "#{gemfile}.lock"
|
|
71
76
|
end
|
|
72
77
|
|
|
73
78
|
return unless File.file?(lockfile)
|
|
@@ -75,4 +80,33 @@ module Gem::BundlerVersionFinder
|
|
|
75
80
|
File.read(lockfile)
|
|
76
81
|
end
|
|
77
82
|
private_class_method :lockfile_contents
|
|
83
|
+
|
|
84
|
+
def self.bundle_config_version
|
|
85
|
+
config_file = bundler_config_file
|
|
86
|
+
return unless config_file && File.file?(config_file)
|
|
87
|
+
|
|
88
|
+
contents = File.read(config_file)
|
|
89
|
+
contents =~ /^BUNDLE_VERSION:\s*["']?([^"'\s]+)["']?\s*$/
|
|
90
|
+
|
|
91
|
+
$1
|
|
92
|
+
end
|
|
93
|
+
private_class_method :bundle_config_version
|
|
94
|
+
|
|
95
|
+
def self.bundler_config_file
|
|
96
|
+
# see Bundler::Settings#global_config_file and local_config_file
|
|
97
|
+
# global
|
|
98
|
+
if ENV["BUNDLE_CONFIG"] && !ENV["BUNDLE_CONFIG"].empty?
|
|
99
|
+
ENV["BUNDLE_CONFIG"]
|
|
100
|
+
elsif ENV["BUNDLE_USER_CONFIG"] && !ENV["BUNDLE_USER_CONFIG"].empty?
|
|
101
|
+
ENV["BUNDLE_USER_CONFIG"]
|
|
102
|
+
elsif ENV["BUNDLE_USER_HOME"] && !ENV["BUNDLE_USER_HOME"].empty?
|
|
103
|
+
ENV["BUNDLE_USER_HOME"] + "config"
|
|
104
|
+
elsif Gem.user_home && !Gem.user_home.empty?
|
|
105
|
+
Gem.user_home + ".bundle/config"
|
|
106
|
+
else
|
|
107
|
+
# local
|
|
108
|
+
"config"
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
private_class_method :bundler_config_file
|
|
78
112
|
end
|
|
@@ -40,6 +40,9 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
ENV["DESTDIR"] = nil
|
|
43
|
+
unless RUBY_PLATFORM.include?("mswin") && RbConfig::CONFIG["configure_args"]&.include?("nmake")
|
|
44
|
+
ENV["MAKEFLAGS"] ||= "-j#{Etc.nprocessors + 1}"
|
|
45
|
+
end
|
|
43
46
|
|
|
44
47
|
make dest_path, results, extension_dir, tmp_dest_relative, target_rbconfig: target_rbconfig
|
|
45
48
|
|
data/lib/rubygems/version.rb
CHANGED
|
@@ -339,11 +339,14 @@ class Gem::Version
|
|
|
339
339
|
##
|
|
340
340
|
# Compares this version with +other+ returning -1, 0, or 1 if the
|
|
341
341
|
# other version is larger, the same, or smaller than this
|
|
342
|
-
# one.
|
|
343
|
-
#
|
|
342
|
+
# one. +other+ must be an instance of Gem::Version, comparing with
|
|
343
|
+
# other types may raise an exception.
|
|
344
344
|
|
|
345
345
|
def <=>(other)
|
|
346
|
-
|
|
346
|
+
if String === other
|
|
347
|
+
return unless self.class.correct?(other)
|
|
348
|
+
return self <=> self.class.new(other)
|
|
349
|
+
end
|
|
347
350
|
|
|
348
351
|
return unless Gem::Version === other
|
|
349
352
|
return 0 if @version == other.version || canonical_segments == other.canonical_segments
|
data/lib/rubygems.rb
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
require "rbconfig"
|
|
10
10
|
|
|
11
11
|
module Gem
|
|
12
|
-
VERSION = "4.0.0
|
|
12
|
+
VERSION = "4.0.0"
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
require_relative "rubygems/defaults"
|
|
@@ -287,7 +287,7 @@ module Gem
|
|
|
287
287
|
# RubyGems now uses this new `Gem.activate_and_load_bin_path` helper in
|
|
288
288
|
# binstubs, which is of course not overridden in Bundler since it didn't
|
|
289
289
|
# exist at the time. So, include the override here to workaround that.
|
|
290
|
-
load ENV["BUNDLE_BIN_PATH"] if ENV["BUNDLE_BIN_PATH"] && spec.version <= "2.5.22"
|
|
290
|
+
load ENV["BUNDLE_BIN_PATH"] if ENV["BUNDLE_BIN_PATH"] && spec.version <= Gem::Version.create("2.5.22")
|
|
291
291
|
|
|
292
292
|
# Make sure there's no version of Bundler in `$LOAD_PATH` that's different
|
|
293
293
|
# from the version we just activated. If that was the case (it happens
|
|
@@ -666,7 +666,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|
|
666
666
|
# warnings in platform constants
|
|
667
667
|
|
|
668
668
|
def self.load_bundler_extensions(version)
|
|
669
|
-
return unless version <= "2.6.9"
|
|
669
|
+
return unless version <= Gem::Version.create("2.6.9")
|
|
670
670
|
|
|
671
671
|
previous_platforms = {}
|
|
672
672
|
|
data/rubygems-update.gemspec
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
version = File.read(File.join(__dir__, "lib", "rubygems.rb"))[/^\s*VERSION\s*=\s*"(.*)"/, 1]
|
|
4
|
+
|
|
3
5
|
Gem::Specification.new do |s|
|
|
4
6
|
s.name = "rubygems-update"
|
|
5
|
-
s.version =
|
|
7
|
+
s.version = version
|
|
6
8
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
|
7
9
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
|
8
10
|
|
|
@@ -30,7 +32,7 @@ Gem::Specification.new do |s|
|
|
|
30
32
|
s.extra_rdoc_files = [
|
|
31
33
|
"LICENSE.txt", "doc/MAINTAINERS.txt",
|
|
32
34
|
"MIT.txt", "Manifest.txt", "README.md",
|
|
33
|
-
"doc/
|
|
35
|
+
"doc/UPGRADING.md", "doc/rubygems/POLICIES.md", "CODE_OF_CONDUCT.md",
|
|
34
36
|
"doc/rubygems/CONTRIBUTING.md",
|
|
35
37
|
"bundler/LICENSE.md", "bundler/README.md",
|
|
36
38
|
"hide_lib_for_update/note.txt", *Dir["bundler/lib/bundler/man/*.1", base: __dir__]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubygems-update
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.0
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jim Weirich
|
|
@@ -76,9 +76,9 @@ extra_rdoc_files:
|
|
|
76
76
|
- bundler/lib/bundler/man/bundle-version.1
|
|
77
77
|
- bundler/lib/bundler/man/bundle.1
|
|
78
78
|
- doc/MAINTAINERS.txt
|
|
79
|
+
- doc/UPGRADING.md
|
|
79
80
|
- doc/rubygems/CONTRIBUTING.md
|
|
80
81
|
- doc/rubygems/POLICIES.md
|
|
81
|
-
- doc/rubygems/UPGRADING.md
|
|
82
82
|
- hide_lib_for_update/note.txt
|
|
83
83
|
files:
|
|
84
84
|
- CHANGELOG.md
|
|
@@ -435,10 +435,9 @@ files:
|
|
|
435
435
|
- bundler/lib/bundler/worker.rb
|
|
436
436
|
- bundler/lib/bundler/yaml_serializer.rb
|
|
437
437
|
- doc/MAINTAINERS.txt
|
|
438
|
-
- doc/
|
|
438
|
+
- doc/UPGRADING.md
|
|
439
439
|
- doc/rubygems/CONTRIBUTING.md
|
|
440
440
|
- doc/rubygems/POLICIES.md
|
|
441
|
-
- doc/rubygems/UPGRADING.md
|
|
442
441
|
- exe/gem
|
|
443
442
|
- exe/update_rubygems
|
|
444
443
|
- hide_lib_for_update/note.txt
|