rubygems-update 3.6.9 → 3.7.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 +853 -790
- data/CONTRIBUTING.md +9 -0
- data/Manifest.txt +4 -21
- data/README.md +1 -1
- data/SECURITY.md +7 -0
- data/bundler/CHANGELOG.md +1093 -1033
- data/bundler/README.md +7 -7
- data/bundler/bundler.gemspec +2 -2
- data/bundler/lib/bundler/build_metadata.rb +10 -11
- data/bundler/lib/bundler/cli/common.rb +1 -1
- data/bundler/lib/bundler/cli/config.rb +2 -2
- data/bundler/lib/bundler/cli/gem.rb +62 -30
- data/bundler/lib/bundler/cli/install.rb +4 -4
- data/bundler/lib/bundler/cli/outdated.rb +1 -1
- data/bundler/lib/bundler/cli/update.rb +2 -2
- data/bundler/lib/bundler/cli.rb +10 -14
- data/bundler/lib/bundler/compact_index_client.rb +1 -5
- data/bundler/lib/bundler/current_ruby.rb +27 -3
- data/bundler/lib/bundler/definition.rb +21 -22
- data/bundler/lib/bundler/dependency.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +33 -23
- data/bundler/lib/bundler/feature_flag.rb +15 -12
- data/bundler/lib/bundler/fetcher/dependency.rb +2 -1
- data/bundler/lib/bundler/fetcher/downloader.rb +33 -7
- data/bundler/lib/bundler/fetcher.rb +49 -19
- data/bundler/lib/bundler/friendly_errors.rb +2 -1
- data/bundler/lib/bundler/index.rb +7 -2
- data/bundler/lib/bundler/installer.rb +5 -4
- data/bundler/lib/bundler/lazy_specification.rb +9 -7
- data/bundler/lib/bundler/lockfile_parser.rb +21 -5
- 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 +172 -126
- data/bundler/lib/bundler/man/bundle-config.1.ronn +91 -91
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +43 -4
- data/bundler/lib/bundler/man/bundle-doctor.1.ronn +48 -4
- data/bundler/lib/bundler/man/bundle-env.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +67 -44
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +8 -4
- 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 +2 -2
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
- data/bundler/lib/bundler/man/bundle-licenses.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/match_platform.rb +31 -12
- data/bundler/lib/bundler/materialization.rb +2 -2
- data/bundler/lib/bundler/resolver/package.rb +1 -1
- data/bundler/lib/bundler/resolver.rb +1 -3
- data/bundler/lib/bundler/rubygems_ext.rb +116 -120
- data/bundler/lib/bundler/rubygems_integration.rb +11 -6
- data/bundler/lib/bundler/runtime.rb +1 -1
- data/bundler/lib/bundler/self_manager.rb +32 -42
- data/bundler/lib/bundler/settings/validator.rb +0 -23
- data/bundler/lib/bundler/settings.rb +4 -6
- data/bundler/lib/bundler/shared_helpers.rb +6 -4
- data/bundler/lib/bundler/source/git/git_proxy.rb +3 -3
- data/bundler/lib/bundler/source/path.rb +7 -0
- data/bundler/lib/bundler/source_list.rb +1 -5
- data/bundler/lib/bundler/source_map.rb +1 -1
- data/bundler/lib/bundler/spec_set.rb +7 -3
- data/bundler/lib/bundler/templates/Executable +0 -11
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -0
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -5
- data/bundler/lib/bundler/ui/shell.rb +2 -2
- data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +2 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +81 -42
- data/bundler/lib/bundler/version.rb +10 -2
- data/bundler/lib/bundler/worker.rb +1 -1
- data/bundler/lib/bundler.rb +14 -12
- data/doc/bundler/UPGRADING.md +137 -127
- data/doc/rubygems/CONTRIBUTING.md +1 -1
- data/lib/rubygems/basic_specification.rb +7 -0
- data/lib/rubygems/commands/pristine_command.rb +9 -12
- data/lib/rubygems/commands/setup_command.rb +2 -2
- data/lib/rubygems/core_ext/kernel_require.rb +5 -2
- data/lib/rubygems/ext/cargo_builder.rb +4 -0
- data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +10 -3
- data/lib/rubygems/gemcutter_utilities.rb +1 -1
- data/lib/rubygems/installer.rb +45 -50
- data/lib/rubygems/platform.rb +142 -39
- data/lib/rubygems/remote_fetcher.rb +3 -3
- data/lib/rubygems/request_set.rb +3 -6
- data/lib/rubygems/resolver/best_set.rb +1 -1
- data/lib/rubygems/resolver/source_set.rb +1 -1
- data/lib/rubygems/resolver.rb +1 -1
- data/lib/rubygems/s3_uri_signer.rb +5 -3
- data/lib/rubygems/source.rb +28 -22
- data/lib/rubygems/specification.rb +2 -2
- data/lib/rubygems/uri_formatter.rb +2 -1
- data/lib/rubygems/util/licenses.rb +21 -0
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -19
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +50 -22
- data/lib/rubygems.rb +65 -7
- data/rubygems-update.gemspec +2 -2
- data/setup.rb +1 -1
- metadata +7 -24
- data/bundler/lib/bundler/gem_helpers.rb +0 -144
- data/bundler/lib/bundler/templates/Executable.bundler +0 -109
- data/bundler/lib/bundler/vendor/fileutils/.document +0 -1
- data/bundler/lib/bundler/vendor/net-http-persistent/.document +0 -1
- data/bundler/lib/bundler/vendor/pub_grub/.document +0 -1
- data/bundler/lib/bundler/vendor/securerandom/.document +0 -1
- data/bundler/lib/bundler/vendor/thor/.document +0 -1
- data/bundler/lib/bundler/vendor/tsort/.document +0 -1
- data/bundler/lib/bundler/vendor/uri/.document +0 -1
- data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +0 -21
- data/lib/rubygems/vendor/molinillo/.document +0 -1
- data/lib/rubygems/vendor/net-http/.document +0 -1
- data/lib/rubygems/vendor/net-protocol/.document +0 -1
- data/lib/rubygems/vendor/optparse/.document +0 -1
- data/lib/rubygems/vendor/resolv/.document +0 -1
- data/lib/rubygems/vendor/securerandom/.document +0 -1
- data/lib/rubygems/vendor/timeout/.document +0 -1
- data/lib/rubygems/vendor/tsort/.document +0 -1
- data/lib/rubygems/vendor/uri/.document +0 -1
- /data/lib/rubygems/ssl_certs/rubygems.org/{GlobalSignRootCA_R3.pem → GlobalSign.pem} +0 -0
- /data/{bundler/lib/bundler/vendor/connection_pool → lib/rubygems/vendor}/.document +0 -0
data/bundler/README.md
CHANGED
@@ -6,7 +6,7 @@ Bundler makes sure Ruby applications run the same code on every machine.
|
|
6
6
|
|
7
7
|
It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Bundler can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.
|
8
8
|
|
9
|
-
|
9
|
+
## Installation and usage
|
10
10
|
|
11
11
|
To install (or update to the latest version):
|
12
12
|
|
@@ -27,32 +27,32 @@ bundle exec rspec
|
|
27
27
|
|
28
28
|
See [bundler.io](https://bundler.io) for the full documentation.
|
29
29
|
|
30
|
-
|
30
|
+
## Troubleshooting
|
31
31
|
|
32
32
|
For help with common problems, see [TROUBLESHOOTING](../doc/bundler/TROUBLESHOOTING.md).
|
33
33
|
|
34
34
|
Still stuck? Try [filing an issue](https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md).
|
35
35
|
|
36
|
-
|
36
|
+
## Other questions
|
37
37
|
|
38
38
|
To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANGELOG.md).
|
39
39
|
|
40
40
|
To get in touch with the Bundler core team and other Bundler users, please join [the Bundler slack](https://join.slack.com/t/bundler/shared_invite/zt-1rrsuuv3m-OmXKWQf8K6iSla4~F1DBjQ).
|
41
41
|
|
42
|
-
|
42
|
+
## Contributing
|
43
43
|
|
44
44
|
If you'd like to contribute to Bundler, that's awesome, and we <3 you. We've put together [the Bundler contributor guide](https://github.com/rubygems/rubygems/blob/master/doc/bundler/contributing/README.md) with all of the information you need to get started.
|
45
45
|
|
46
46
|
If you'd like to request a substantial change to Bundler or its documentation, refer to the [Bundler RFC process](https://github.com/rubygems/rfcs) for more information.
|
47
47
|
|
48
|
-
|
48
|
+
## Supporting
|
49
49
|
|
50
50
|
RubyGems is managed by [Ruby Central](https://rubycentral.org), a non-profit organization that supports the Ruby community through projects like this one, as well as [RubyConf](https://rubyconf.org), [RailsConf](https://railsconf.org), and [RubyGems.org](https://rubygems.org). You can support Ruby Central by attending or [sponsoring](sponsors@rubycentral.org) a conference, or by [joining as a supporting member](https://rubycentral.org/#/portal/signup).
|
51
51
|
|
52
|
-
|
52
|
+
## Code of Conduct
|
53
53
|
|
54
54
|
Everyone interacting in the Bundler project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
|
55
55
|
|
56
|
-
|
56
|
+
## License
|
57
57
|
|
58
58
|
Bundler is available under an [MIT License](https://github.com/rubygems/rubygems/blob/master/bundler/LICENSE.md).
|
data/bundler/bundler.gemspec
CHANGED
@@ -29,10 +29,10 @@ Gem::Specification.new do |s|
|
|
29
29
|
"source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
|
30
30
|
}
|
31
31
|
|
32
|
-
s.required_ruby_version = ">= 3.
|
32
|
+
s.required_ruby_version = ">= 3.2.0"
|
33
33
|
|
34
34
|
# It should match the RubyGems version shipped with `required_ruby_version` above
|
35
|
-
s.required_rubygems_version = ">= 3.
|
35
|
+
s.required_rubygems_version = ">= 3.4.1"
|
36
36
|
|
37
37
|
s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
|
38
38
|
|
@@ -4,23 +4,27 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "
|
8
|
-
@git_commit_sha = "
|
9
|
-
@release = true
|
7
|
+
@built_at = "2025-07-16".freeze
|
8
|
+
@git_commit_sha = "24a46f4f3d6".freeze
|
10
9
|
# end ivars
|
11
10
|
|
12
11
|
# A hash representation of the build metadata.
|
13
12
|
def self.to_h
|
14
13
|
{
|
15
|
-
"
|
14
|
+
"Timestamp" => timestamp,
|
16
15
|
"Git SHA" => git_commit_sha,
|
17
|
-
"Released Version" => release?,
|
18
16
|
}
|
19
17
|
end
|
20
18
|
|
19
|
+
# A timestamp representing the date the bundler gem was built, or the
|
20
|
+
# current time if never built
|
21
|
+
def self.timestamp
|
22
|
+
@timestamp ||= @built_at || Time.now.utc.strftime("%Y-%m-%d").freeze
|
23
|
+
end
|
24
|
+
|
21
25
|
# A string representing the date the bundler gem was built.
|
22
26
|
def self.built_at
|
23
|
-
@built_at
|
27
|
+
@built_at
|
24
28
|
end
|
25
29
|
|
26
30
|
# The SHA for the git commit the bundler gem was built from.
|
@@ -36,10 +40,5 @@ module Bundler
|
|
36
40
|
|
37
41
|
@git_commit_sha ||= "unknown"
|
38
42
|
end
|
39
|
-
|
40
|
-
# Whether this is an official release build of Bundler.
|
41
|
-
def self.release?
|
42
|
-
@release
|
43
|
-
end
|
44
43
|
end
|
45
44
|
end
|
@@ -130,7 +130,7 @@ module Bundler
|
|
130
130
|
def self.clean_after_install?
|
131
131
|
clean = Bundler.settings[:clean]
|
132
132
|
return clean unless clean.nil?
|
133
|
-
clean ||= Bundler.feature_flag.
|
133
|
+
clean ||= Bundler.feature_flag.bundler_4_mode? && Bundler.settings[:path].nil?
|
134
134
|
clean &&= !Bundler.use_system_gems?
|
135
135
|
clean
|
136
136
|
end
|
@@ -26,8 +26,8 @@ module Bundler
|
|
26
26
|
end
|
27
27
|
|
28
28
|
message = "Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle #{new_args.join(" ")}` instead."
|
29
|
-
removed_message = "Using the `config` command without a subcommand [list, get, set, unset]
|
30
|
-
SharedHelpers.major_deprecation
|
29
|
+
removed_message = "Using the `config` command without a subcommand [list, get, set, unset] has been removed. Use `bundle #{new_args.join(" ")}` instead."
|
30
|
+
SharedHelpers.major_deprecation 4, message, removed_message: removed_message
|
31
31
|
|
32
32
|
Base.new(options, name, value, self).run
|
33
33
|
end
|
@@ -31,7 +31,6 @@ module Bundler
|
|
31
31
|
@extension = options[:ext]
|
32
32
|
|
33
33
|
validate_ext_name if @extension
|
34
|
-
validate_rust_builder_rubygems_version if @extension == "rust"
|
35
34
|
end
|
36
35
|
|
37
36
|
def run
|
@@ -48,13 +47,16 @@ module Bundler
|
|
48
47
|
git_author_name = use_git ? `git config user.name`.chomp : ""
|
49
48
|
git_username = use_git ? `git config github.user`.chomp : ""
|
50
49
|
git_user_email = use_git ? `git config user.email`.chomp : ""
|
50
|
+
github_username = github_username(git_username)
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
""
|
52
|
+
if github_username.empty?
|
53
|
+
homepage_uri = "TODO: Put your gem's website or public repo URL here."
|
54
|
+
source_code_uri = "TODO: Put your gem's public repo URL here."
|
55
|
+
changelog_uri = "TODO: Put your gem's CHANGELOG.md URL here."
|
56
56
|
else
|
57
|
-
|
57
|
+
homepage_uri = "https://github.com/#{github_username}/#{name}"
|
58
|
+
source_code_uri = "https://github.com/#{github_username}/#{name}"
|
59
|
+
changelog_uri = "https://github.com/#{github_username}/#{name}/blob/main/CHANGELOG.md"
|
58
60
|
end
|
59
61
|
|
60
62
|
config = {
|
@@ -69,12 +71,17 @@ module Bundler
|
|
69
71
|
test: options[:test],
|
70
72
|
ext: extension,
|
71
73
|
exe: options[:exe],
|
74
|
+
bundle: options[:bundle],
|
72
75
|
bundler_version: bundler_dependency_version,
|
73
76
|
git: use_git,
|
74
77
|
github_username: github_username.empty? ? "[USERNAME]" : github_username,
|
75
78
|
required_ruby_version: required_ruby_version,
|
76
79
|
rust_builder_required_rubygems_version: rust_builder_required_rubygems_version,
|
77
80
|
minitest_constant_name: minitest_constant_name,
|
81
|
+
ignore_paths: %w[bin/],
|
82
|
+
homepage_uri: homepage_uri,
|
83
|
+
source_code_uri: source_code_uri,
|
84
|
+
changelog_uri: changelog_uri,
|
78
85
|
}
|
79
86
|
ensure_safe_gem_name(name, constant_array)
|
80
87
|
|
@@ -95,7 +102,18 @@ module Bundler
|
|
95
102
|
bin/setup
|
96
103
|
]
|
97
104
|
|
98
|
-
|
105
|
+
case Bundler.preferred_gemfile_name
|
106
|
+
when "Gemfile"
|
107
|
+
config[:ignore_paths] << "Gemfile"
|
108
|
+
when "gems.rb"
|
109
|
+
config[:ignore_paths] << "gems.rb"
|
110
|
+
config[:ignore_paths] << "gems.locked"
|
111
|
+
end
|
112
|
+
|
113
|
+
if use_git
|
114
|
+
templates.merge!("gitignore.tt" => ".gitignore")
|
115
|
+
config[:ignore_paths] << ".gitignore"
|
116
|
+
end
|
99
117
|
|
100
118
|
if test_framework = ask_and_set_test_framework
|
101
119
|
config[:test] = test_framework
|
@@ -109,6 +127,8 @@ module Bundler
|
|
109
127
|
"spec/newgem_spec.rb.tt" => "spec/#{namespaced_path}_spec.rb"
|
110
128
|
)
|
111
129
|
config[:test_task] = :spec
|
130
|
+
config[:ignore_paths] << ".rspec"
|
131
|
+
config[:ignore_paths] << "spec/"
|
112
132
|
when "minitest"
|
113
133
|
# Generate path for minitest target file (FileList["test/**/test_*.rb"])
|
114
134
|
# foo => test/test_foo.rb
|
@@ -123,12 +143,14 @@ module Bundler
|
|
123
143
|
"test/minitest/test_newgem.rb.tt" => "test/#{minitest_namespaced_path}.rb"
|
124
144
|
)
|
125
145
|
config[:test_task] = :test
|
146
|
+
config[:ignore_paths] << "test/"
|
126
147
|
when "test-unit"
|
127
148
|
templates.merge!(
|
128
149
|
"test/test-unit/test_helper.rb.tt" => "test/test_helper.rb",
|
129
150
|
"test/test-unit/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
|
130
151
|
)
|
131
152
|
config[:test_task] = :test
|
153
|
+
config[:ignore_paths] << "test/"
|
132
154
|
end
|
133
155
|
end
|
134
156
|
|
@@ -136,19 +158,19 @@ module Bundler
|
|
136
158
|
case config[:ci]
|
137
159
|
when "github"
|
138
160
|
templates.merge!("github/workflows/main.yml.tt" => ".github/workflows/main.yml")
|
139
|
-
config[:
|
161
|
+
config[:ignore_paths] << ".github/"
|
140
162
|
when "gitlab"
|
141
163
|
templates.merge!("gitlab-ci.yml.tt" => ".gitlab-ci.yml")
|
142
|
-
config[:
|
164
|
+
config[:ignore_paths] << ".gitlab-ci.yml"
|
143
165
|
when "circle"
|
144
166
|
templates.merge!("circleci/config.yml.tt" => ".circleci/config.yml")
|
145
|
-
config[:
|
167
|
+
config[:ignore_paths] << ".circleci/"
|
146
168
|
end
|
147
169
|
|
148
170
|
if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?",
|
149
|
-
"
|
150
|
-
"for free as long as they admit you created it. You can read more about
|
151
|
-
"at https://choosealicense.com/licenses/mit.")
|
171
|
+
"Using a MIT license means that any other developer or company will be legally allowed " \
|
172
|
+
"to use your code for free as long as they admit you created it. You can read more about " \
|
173
|
+
"the MIT license at https://choosealicense.com/licenses/mit.")
|
152
174
|
config[:mit] = true
|
153
175
|
Bundler.ui.info "MIT License enabled in config"
|
154
176
|
templates.merge!("LICENSE.txt.tt" => "LICENSE.txt")
|
@@ -185,10 +207,12 @@ module Bundler
|
|
185
207
|
config[:linter_version] = rubocop_version
|
186
208
|
Bundler.ui.info "RuboCop enabled in config"
|
187
209
|
templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
|
210
|
+
config[:ignore_paths] << ".rubocop.yml"
|
188
211
|
when "standard"
|
189
212
|
config[:linter_version] = standard_version
|
190
213
|
Bundler.ui.info "Standard enabled in config"
|
191
214
|
templates.merge!("standard.yml.tt" => ".standard.yml")
|
215
|
+
config[:ignore_paths] << ".standard.yml"
|
192
216
|
end
|
193
217
|
|
194
218
|
if config[:exe]
|
@@ -219,7 +243,7 @@ module Bundler
|
|
219
243
|
end
|
220
244
|
|
221
245
|
if use_git
|
222
|
-
Bundler.ui.info "
|
246
|
+
Bundler.ui.info "\nInitializing git repo in #{target}"
|
223
247
|
require "shellwords"
|
224
248
|
`git init #{target.to_s.shellescape}`
|
225
249
|
|
@@ -241,10 +265,17 @@ module Bundler
|
|
241
265
|
IO.popen(%w[git add .], { chdir: target }, &:read)
|
242
266
|
end
|
243
267
|
|
268
|
+
if config[:bundle]
|
269
|
+
Bundler.ui.info "Running bundle install in the new gem directory."
|
270
|
+
Dir.chdir(target) do
|
271
|
+
system("bundle install")
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
244
275
|
# Open gemspec in editor
|
245
276
|
open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit]
|
246
277
|
|
247
|
-
Bundler.ui.info "
|
278
|
+
Bundler.ui.info "\nGem '#{name}' was successfully created. " \
|
248
279
|
"For more information on making a RubyGem visit https://bundler.io/guides/creating_gem.html"
|
249
280
|
end
|
250
281
|
|
@@ -254,13 +285,13 @@ module Bundler
|
|
254
285
|
SharedHelpers.pwd.join(name).basename.to_s
|
255
286
|
end
|
256
287
|
|
257
|
-
def ask_and_set(key,
|
288
|
+
def ask_and_set(key, prompt, explanation)
|
258
289
|
choice = options[key]
|
259
290
|
choice = Bundler.settings["gem.#{key}"] if choice.nil?
|
260
291
|
|
261
292
|
if choice.nil?
|
262
|
-
Bundler.ui.
|
263
|
-
choice = Bundler.ui.yes? "#{
|
293
|
+
Bundler.ui.info "\n#{explanation}"
|
294
|
+
choice = Bundler.ui.yes? "#{prompt} y/(n):"
|
264
295
|
Bundler.settings.set_global("gem.#{key}", choice)
|
265
296
|
end
|
266
297
|
|
@@ -282,7 +313,7 @@ module Bundler
|
|
282
313
|
test_framework = options[:test] || Bundler.settings["gem.test"]
|
283
314
|
|
284
315
|
if test_framework.to_s.empty?
|
285
|
-
Bundler.ui.
|
316
|
+
Bundler.ui.info "\nDo you want to generate tests with your gem?"
|
286
317
|
Bundler.ui.info hint_text("test")
|
287
318
|
|
288
319
|
result = Bundler.ui.ask "Enter a test framework. rspec/minitest/test-unit/(none):"
|
@@ -322,12 +353,11 @@ module Bundler
|
|
322
353
|
ci_template = options[:ci] || Bundler.settings["gem.ci"]
|
323
354
|
|
324
355
|
if ci_template.to_s.empty?
|
325
|
-
Bundler.ui.
|
356
|
+
Bundler.ui.info "\nDo you want to set up continuous integration for your gem? " \
|
326
357
|
"Supported services:\n" \
|
327
358
|
"* CircleCI: https://circleci.com/\n" \
|
328
359
|
"* GitHub Actions: https://github.com/features/actions\n" \
|
329
|
-
"* GitLab CI: https://docs.gitlab.com/ee/ci/\n"
|
330
|
-
"\n"
|
360
|
+
"* GitLab CI: https://docs.gitlab.com/ee/ci/\n"
|
331
361
|
Bundler.ui.info hint_text("ci")
|
332
362
|
|
333
363
|
result = Bundler.ui.ask "Enter a CI service. github/gitlab/circle/(none):"
|
@@ -355,11 +385,10 @@ module Bundler
|
|
355
385
|
linter_template = deprecated_rubocop_option if linter_template.nil?
|
356
386
|
|
357
387
|
if linter_template.to_s.empty?
|
358
|
-
Bundler.ui.
|
388
|
+
Bundler.ui.info "\nDo you want to add a code linter and formatter to your gem? " \
|
359
389
|
"Supported Linters:\n" \
|
360
390
|
"* RuboCop: https://rubocop.org\n" \
|
361
|
-
"* Standard: https://github.com/standardrb/standard\n"
|
362
|
-
"\n"
|
391
|
+
"* Standard: https://github.com/standardrb/standard\n"
|
363
392
|
Bundler.ui.info hint_text("linter")
|
364
393
|
|
365
394
|
result = Bundler.ui.ask "Enter a linter. rubocop/standard/(none):"
|
@@ -446,7 +475,7 @@ module Bundler
|
|
446
475
|
end
|
447
476
|
|
448
477
|
def required_ruby_version
|
449
|
-
"3.
|
478
|
+
"3.2.0"
|
450
479
|
end
|
451
480
|
|
452
481
|
def rubocop_version
|
@@ -457,10 +486,13 @@ module Bundler
|
|
457
486
|
"1.3"
|
458
487
|
end
|
459
488
|
|
460
|
-
def
|
461
|
-
if
|
462
|
-
|
463
|
-
|
489
|
+
def github_username(git_username)
|
490
|
+
if options[:github_username].nil?
|
491
|
+
git_username
|
492
|
+
elsif options[:github_username] == false
|
493
|
+
""
|
494
|
+
else
|
495
|
+
options[:github_username]
|
464
496
|
end
|
465
497
|
end
|
466
498
|
end
|
@@ -66,7 +66,9 @@ module Bundler
|
|
66
66
|
|
67
67
|
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
|
68
68
|
|
69
|
-
|
69
|
+
# For install we want to enable strict validation
|
70
|
+
# (rather than some optimizations we perform at app runtime).
|
71
|
+
definition = Bundler.definition(strict: true)
|
70
72
|
definition.validate_runtime!
|
71
73
|
|
72
74
|
installer = Installer.install(Bundler.root, definition, options)
|
@@ -158,9 +160,7 @@ module Bundler
|
|
158
160
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
159
161
|
|
160
162
|
if options["standalone"] && Bundler.settings[:path].nil? && !options["local"]
|
161
|
-
Bundler.settings.
|
162
|
-
Bundler.settings.set_command_option :path, "bundle"
|
163
|
-
end
|
163
|
+
Bundler.settings.set_command_option :path, "bundle"
|
164
164
|
end
|
165
165
|
|
166
166
|
bin_option = options["binstubs"]
|
@@ -155,7 +155,7 @@ module Bundler
|
|
155
155
|
|
156
156
|
return active_spec if strict
|
157
157
|
|
158
|
-
active_specs = active_spec.source.specs.search(current_spec.name).select {|spec| spec.
|
158
|
+
active_specs = active_spec.source.specs.search(current_spec.name).select {|spec| spec.installable_on_platform?(current_spec.platform) }.sort_by(&:version)
|
159
159
|
if !current_spec.version.prerelease? && !options[:pre] && active_specs.size > 1
|
160
160
|
active_specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
|
161
161
|
end
|
@@ -26,7 +26,7 @@ module Bundler
|
|
26
26
|
if Bundler.feature_flag.update_requires_all_flag?
|
27
27
|
raise InvalidOption, "To update everything, pass the `--all` flag."
|
28
28
|
end
|
29
|
-
SharedHelpers.major_deprecation
|
29
|
+
SharedHelpers.major_deprecation 4, "Pass --all to `bundle update` to update everything"
|
30
30
|
elsif !full_update && options[:all]
|
31
31
|
raise InvalidOption, "Cannot specify --all along with specific options."
|
32
32
|
end
|
@@ -92,7 +92,7 @@ module Bundler
|
|
92
92
|
locked_spec = locked_info[:spec]
|
93
93
|
new_spec = Bundler.definition.specs[name].first
|
94
94
|
unless new_spec
|
95
|
-
unless locked_spec.
|
95
|
+
unless locked_spec.installable_on_platform?(Bundler.local_platform)
|
96
96
|
Bundler.ui.warn "Bundler attempted to update #{name} but it was not considered because it is for a different platform from the current one"
|
97
97
|
end
|
98
98
|
|
data/bundler/lib/bundler/cli.rb
CHANGED
@@ -77,7 +77,7 @@ module Bundler
|
|
77
77
|
self.options ||= {}
|
78
78
|
unprinted_warnings = Bundler.ui.unprinted_warnings
|
79
79
|
Bundler.ui = UI::Shell.new(options)
|
80
|
-
Bundler.ui.level = "debug" if options[
|
80
|
+
Bundler.ui.level = "debug" if options[:verbose] || Bundler.settings[:verbose]
|
81
81
|
unprinted_warnings.each {|w| Bundler.ui.warn(w) }
|
82
82
|
end
|
83
83
|
|
@@ -130,7 +130,7 @@ module Bundler
|
|
130
130
|
|
131
131
|
if man_pages.include?(command)
|
132
132
|
man_page = man_pages[command]
|
133
|
-
if Bundler.which("man") && !man_path.match?(%r{^file
|
133
|
+
if Bundler.which("man") && !man_path.match?(%r{^(?:file:/.+!|uri:classloader:)/META-INF/jruby.home/.+})
|
134
134
|
Kernel.exec("man", man_page)
|
135
135
|
else
|
136
136
|
puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
|
@@ -486,13 +486,13 @@ module Bundler
|
|
486
486
|
def version
|
487
487
|
cli_help = current_command.name == "cli_help"
|
488
488
|
if cli_help || ARGV.include?("version")
|
489
|
-
build_info = " (#{BuildMetadata.
|
489
|
+
build_info = " (#{BuildMetadata.timestamp} commit #{BuildMetadata.git_commit_sha})"
|
490
490
|
end
|
491
491
|
|
492
|
-
if !cli_help && Bundler.feature_flag.
|
493
|
-
Bundler.ui.info "#{Bundler
|
492
|
+
if !cli_help && Bundler.feature_flag.bundler_4_mode?
|
493
|
+
Bundler.ui.info "#{Bundler.verbose_version}#{build_info}"
|
494
494
|
else
|
495
|
-
Bundler.ui.info "Bundler version #{Bundler
|
495
|
+
Bundler.ui.info "Bundler version #{Bundler.verbose_version}#{build_info}"
|
496
496
|
end
|
497
497
|
end
|
498
498
|
|
@@ -512,7 +512,7 @@ module Bundler
|
|
512
512
|
end
|
513
513
|
end
|
514
514
|
|
515
|
-
unless Bundler.feature_flag.
|
515
|
+
unless Bundler.feature_flag.bundler_4_mode?
|
516
516
|
desc "viz [OPTIONS]", "Generates a visual dependency graph", hide: true
|
517
517
|
long_desc <<-D
|
518
518
|
Viz generates a PNG file of the current Gemfile as a dependency graph.
|
@@ -544,6 +544,7 @@ module Bundler
|
|
544
544
|
method_option :ci, type: :string, lazy_default: Bundler.settings["gem.ci"] || "", enum: %w[github gitlab circle], desc: "Generate CI configuration, either GitHub Actions, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|gitlab|circle)`"
|
545
545
|
method_option :linter, type: :string, lazy_default: Bundler.settings["gem.linter"] || "", enum: %w[rubocop standard], desc: "Add a linter and code formatter, either RuboCop or Standard. Set a default with `bundle config set --global gem.linter (rubocop|standard)`"
|
546
546
|
method_option :github_username, type: :string, default: Bundler.settings["gem.github_username"], banner: "Set your username on GitHub", desc: "Fill in GitHub username on README so that you don't have to do it manually. Set a default with `bundle config set --global gem.github_username <your_username>`."
|
547
|
+
method_option :bundle, type: :boolean, default: Bundler.settings["gem.bundle"], desc: "Automatically run `bundle install` after creation. Set a default with `bundle config set --global gem.bundle true`"
|
547
548
|
|
548
549
|
def gem(name)
|
549
550
|
require_relative "cli/gem"
|
@@ -713,14 +714,9 @@ module Bundler
|
|
713
714
|
command_name = cmd.name
|
714
715
|
return if PARSEABLE_COMMANDS.include?(command_name)
|
715
716
|
command = ["bundle", command_name] + args
|
716
|
-
|
717
|
-
options_to_print.delete_if do |k, v|
|
718
|
-
next unless o = cmd.options[k]
|
719
|
-
o.default == v
|
720
|
-
end
|
721
|
-
command << Thor::Options.to_switches(options_to_print.sort_by(&:first)).strip
|
717
|
+
command << Thor::Options.to_switches(options.sort_by(&:first)).strip
|
722
718
|
command.reject!(&:empty?)
|
723
|
-
Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler
|
719
|
+
Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler.verbose_version}"
|
724
720
|
end
|
725
721
|
|
726
722
|
def warn_on_outdated_bundler
|
@@ -28,11 +28,7 @@ module Bundler
|
|
28
28
|
# It may be called concurrently without global interpreter lock in some Rubies.
|
29
29
|
# As a result, some methods may look more complex than necessary to save memory or time.
|
30
30
|
class CompactIndexClient
|
31
|
-
|
32
|
-
# because we use it to generate the etag on first request during the upgrade
|
33
|
-
# to the compact index client that uses opaque etags saved to files.
|
34
|
-
# Remove once 2.5.0 has been out for a while.
|
35
|
-
SUPPORTED_DIGESTS = { "sha-256" => :SHA256, "md5" => :MD5 }.freeze
|
31
|
+
SUPPORTED_DIGESTS = { "sha-256" => :SHA256 }.freeze
|
36
32
|
DEBUG_MUTEX = Thread::Mutex.new
|
37
33
|
|
38
34
|
# info returns an Array of INFO Arrays. Each INFO Array has the following indices:
|
@@ -32,7 +32,7 @@ module Bundler
|
|
32
32
|
end.freeze
|
33
33
|
|
34
34
|
def ruby?
|
35
|
-
return true if Bundler::
|
35
|
+
return true if Bundler::MatchPlatform.generic_local_platform_is_ruby?
|
36
36
|
|
37
37
|
!windows? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
|
38
38
|
end
|
@@ -50,6 +50,18 @@ module Bundler
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def maglev?
|
53
|
+
message =
|
54
|
+
"`CurrentRuby#maglev?` is deprecated with no replacement. Please use the " \
|
55
|
+
"built-in Ruby `RUBY_ENGINE` constant to check the Ruby implementation you are running on."
|
56
|
+
removed_message =
|
57
|
+
"`CurrentRuby#maglev?` was removed with no replacement. Please use the " \
|
58
|
+
"built-in Ruby `RUBY_ENGINE` constant to check the Ruby implementation you are running on."
|
59
|
+
internally_exempted = caller_locations(1, 1).first.path == __FILE__
|
60
|
+
|
61
|
+
unless internally_exempted
|
62
|
+
SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
63
|
+
end
|
64
|
+
|
53
65
|
RUBY_ENGINE == "maglev"
|
54
66
|
end
|
55
67
|
|
@@ -71,12 +83,24 @@ module Bundler
|
|
71
83
|
RUBY_VERSION.start_with?("#{version}.")
|
72
84
|
end
|
73
85
|
|
74
|
-
|
75
|
-
all_platforms.each do |platform|
|
86
|
+
PLATFORM_MAP.keys.each do |platform|
|
76
87
|
define_method(:"#{platform}_#{trimmed_version}?") do
|
77
88
|
send(:"#{platform}?") && send(:"on_#{trimmed_version}?")
|
78
89
|
end
|
79
90
|
end
|
91
|
+
|
92
|
+
define_method(:"maglev_#{trimmed_version}?") do
|
93
|
+
message =
|
94
|
+
"`CurrentRuby##{__method__}` is deprecated with no replacement. Please use the " \
|
95
|
+
"built-in Ruby `RUBY_ENGINE` and `RUBY_VERSION` constants to perform a similar check."
|
96
|
+
removed_message =
|
97
|
+
"`CurrentRuby##{__method__}` was removed with no replacement. Please use the " \
|
98
|
+
"built-in Ruby `RUBY_ENGINE` and `RUBY_VERSION` constants to perform a similar check."
|
99
|
+
|
100
|
+
SharedHelpers.major_deprecation(2, message, removed_message: removed_message, print_caller_location: true)
|
101
|
+
|
102
|
+
send(:"maglev?") && send(:"on_#{trimmed_version}?")
|
103
|
+
end
|
80
104
|
end
|
81
105
|
end
|
82
106
|
end
|