rubygems-update 3.5.22 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +91 -0
- data/Manifest.txt +23 -16
- data/README.md +14 -9
- data/bundler/CHANGELOG.md +83 -0
- data/bundler/bundler.gemspec +2 -2
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/add.rb +2 -0
- data/bundler/lib/bundler/cli/check.rb +2 -2
- data/bundler/lib/bundler/cli/console.rb +0 -4
- data/bundler/lib/bundler/cli/doctor.rb +4 -4
- data/bundler/lib/bundler/cli/exec.rb +1 -0
- data/bundler/lib/bundler/cli/gem.rb +1 -1
- data/bundler/lib/bundler/cli/info.rb +2 -2
- data/bundler/lib/bundler/cli/inject.rb +1 -1
- data/bundler/lib/bundler/cli/install.rb +4 -0
- data/bundler/lib/bundler/cli/lock.rb +20 -1
- data/bundler/lib/bundler/cli/pristine.rb +1 -1
- data/bundler/lib/bundler/cli/show.rb +2 -2
- data/bundler/lib/bundler/cli.rb +23 -53
- data/bundler/lib/bundler/compact_index_client/cache_file.rb +0 -5
- data/bundler/lib/bundler/compact_index_client/updater.rb +0 -11
- data/bundler/lib/bundler/definition.rb +143 -76
- data/bundler/lib/bundler/dependency.rb +1 -1
- data/bundler/lib/bundler/dsl.rb +33 -28
- data/bundler/lib/bundler/endpoint_specification.rb +10 -1
- data/bundler/lib/bundler/errors.rb +10 -0
- data/bundler/lib/bundler/feature_flag.rb +1 -0
- data/bundler/lib/bundler/fetcher/compact_index.rb +1 -1
- data/bundler/lib/bundler/fetcher.rb +10 -3
- data/bundler/lib/bundler/gem_helpers.rb +21 -5
- data/bundler/lib/bundler/injector.rb +2 -2
- data/bundler/lib/bundler/inline.rb +12 -8
- data/bundler/lib/bundler/installer/standalone.rb +2 -2
- data/bundler/lib/bundler/installer.rb +4 -38
- data/bundler/lib/bundler/lazy_specification.rb +74 -26
- data/bundler/lib/bundler/lockfile_generator.rb +1 -1
- data/bundler/lib/bundler/lockfile_parser.rb +9 -1
- data/bundler/lib/bundler/man/bundle-add.1 +17 -11
- data/bundler/lib/bundler/man/bundle-add.1.ronn +16 -10
- data/bundler/lib/bundler/man/bundle-binstubs.1 +7 -4
- data/bundler/lib/bundler/man/bundle-binstubs.1.ronn +6 -3
- data/bundler/lib/bundler/man/bundle-cache.1 +30 -2
- data/bundler/lib/bundler/man/bundle-cache.1.ronn +31 -2
- data/bundler/lib/bundler/man/bundle-check.1 +3 -3
- data/bundler/lib/bundler/man/bundle-check.1.ronn +4 -2
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +3 -5
- data/bundler/lib/bundler/man/bundle-config.1.ronn +2 -7
- data/bundler/lib/bundler/man/bundle-console.1 +2 -4
- data/bundler/lib/bundler/man/bundle-console.1.ronn +2 -7
- data/bundler/lib/bundler/man/bundle-doctor.1 +2 -2
- data/bundler/lib/bundler/man/bundle-doctor.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-env.1 +9 -0
- data/bundler/lib/bundler/man/bundle-env.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-exec.1 +5 -2
- data/bundler/lib/bundler/man/bundle-exec.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-fund.1 +22 -0
- data/bundler/lib/bundler/man/bundle-fund.1.ronn +25 -0
- data/bundler/lib/bundler/man/bundle-gem.1 +17 -5
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +27 -6
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +5 -2
- data/bundler/lib/bundler/man/bundle-info.1.ronn +6 -2
- data/bundler/lib/bundler/man/bundle-init.1 +3 -3
- data/bundler/lib/bundler/man/bundle-init.1.ronn +3 -2
- data/bundler/lib/bundler/man/bundle-inject.1 +10 -2
- data/bundler/lib/bundler/man/bundle-inject.1.ronn +9 -1
- data/bundler/lib/bundler/man/bundle-install.1 +15 -12
- data/bundler/lib/bundler/man/bundle-install.1.ronn +22 -18
- data/bundler/lib/bundler/man/bundle-issue.1 +45 -0
- data/bundler/lib/bundler/man/bundle-issue.1.ronn +37 -0
- data/bundler/lib/bundler/man/bundle-licenses.1 +9 -0
- data/bundler/lib/bundler/man/bundle-licenses.1.ronn +10 -0
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1.ronn +4 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +21 -6
- data/bundler/lib/bundler/man/bundle-lock.1.ronn +25 -4
- data/bundler/lib/bundler/man/bundle-open.1 +2 -2
- data/bundler/lib/bundler/man/bundle-open.1.ronn +2 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +8 -5
- data/bundler/lib/bundler/man/bundle-outdated.1.ronn +8 -4
- 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-pristine.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1.ronn +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +5 -2
- data/bundler/lib/bundler/man/bundle-show.1.ronn +4 -0
- data/bundler/lib/bundler/man/bundle-update.1 +13 -7
- data/bundler/lib/bundler/man/bundle-update.1.ronn +14 -6
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +4 -4
- data/bundler/lib/bundler/man/bundle-viz.1.ronn +7 -3
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/man/index.txt +4 -0
- data/bundler/lib/bundler/materialization.rb +59 -0
- data/bundler/lib/bundler/plugin/events.rb +24 -0
- data/bundler/lib/bundler/plugin/installer.rb +1 -1
- data/bundler/lib/bundler/plugin.rb +20 -1
- data/bundler/lib/bundler/process_lock.rb +10 -14
- data/bundler/lib/bundler/remote_specification.rb +6 -1
- data/bundler/lib/bundler/resolver/base.rb +6 -6
- data/bundler/lib/bundler/resolver/candidate.rb +2 -2
- data/bundler/lib/bundler/resolver/spec_group.rb +4 -3
- data/bundler/lib/bundler/resolver.rb +5 -5
- data/bundler/lib/bundler/rubygems_ext.rb +30 -27
- data/bundler/lib/bundler/rubygems_gem_installer.rb +3 -2
- data/bundler/lib/bundler/rubygems_integration.rb +23 -40
- data/bundler/lib/bundler/runtime.rb +27 -7
- data/bundler/lib/bundler/self_manager.rb +2 -3
- data/bundler/lib/bundler/settings.rb +6 -1
- data/bundler/lib/bundler/shared_helpers.rb +29 -17
- data/bundler/lib/bundler/source/git/git_proxy.rb +0 -6
- data/bundler/lib/bundler/source/git.rb +56 -31
- data/bundler/lib/bundler/source/metadata.rb +2 -3
- data/bundler/lib/bundler/source/path.rb +2 -2
- data/bundler/lib/bundler/source_list.rb +1 -1
- data/bundler/lib/bundler/spec_set.rb +81 -56
- data/bundler/lib/bundler/stub_specification.rb +8 -0
- data/bundler/lib/bundler/templates/newgem/Gemfile.tt +0 -3
- data/bundler/lib/bundler/templates/newgem/README.md.tt +1 -1
- data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +15 -15
- data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -4
- data/bundler/lib/bundler/uri_credentials_filter.rb +1 -1
- data/bundler/lib/bundler/vendor/fileutils/COPYING +56 -0
- data/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb +15 -13
- data/bundler/lib/bundler/vendor/securerandom/COPYING +56 -0
- data/bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb +5 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +3 -5
- data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +11 -0
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +1 -4
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +2 -2
- data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +2 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +9 -9
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +5 -21
- data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/bundler/lib/bundler/vendor/thor/lib/thor.rb +11 -0
- data/bundler/lib/bundler/vendor/uri/COPYING +56 -0
- data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +37 -16
- data/bundler/lib/bundler/vendor/uri/lib/uri/file.rb +3 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +16 -26
- data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +2 -2
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
- data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/bundler/lib/bundler/vendor/uri/lib/uri.rb +9 -9
- data/bundler/lib/bundler/vendored_securerandom.rb +0 -2
- data/bundler/lib/bundler/version.rb +1 -1
- data/bundler/lib/bundler.rb +38 -14
- data/{CONTRIBUTING.md → doc/rubygems/CONTRIBUTING.md} +9 -9
- data/{POLICIES.md → doc/rubygems/POLICIES.md} +11 -11
- data/lib/rubygems/basic_specification.rb +5 -4
- data/lib/rubygems/commands/cleanup_command.rb +2 -2
- data/lib/rubygems/commands/contents_command.rb +4 -4
- data/lib/rubygems/commands/exec_command.rb +3 -0
- data/lib/rubygems/commands/pristine_command.rb +2 -2
- data/lib/rubygems/commands/push_command.rb +29 -5
- data/lib/rubygems/commands/rdoc_command.rb +2 -2
- data/lib/rubygems/commands/rebuild_command.rb +0 -2
- data/lib/rubygems/commands/setup_command.rb +7 -16
- data/lib/rubygems/commands/unpack_command.rb +0 -6
- data/lib/rubygems/commands/update_command.rb +2 -8
- data/lib/rubygems/config_file.rb +12 -0
- data/lib/rubygems/core_ext/kernel_warn.rb +2 -6
- data/lib/rubygems/defaults.rb +1 -1
- data/lib/rubygems/exceptions.rb +0 -6
- data/lib/rubygems/ext/builder.rb +6 -4
- data/lib/rubygems/ext/cargo_builder.rb +7 -4
- data/lib/rubygems/ext/cmake_builder.rb +7 -2
- data/lib/rubygems/ext/configure_builder.rb +7 -2
- data/lib/rubygems/ext/ext_conf_builder.rb +9 -5
- data/lib/rubygems/ext/rake_builder.rb +6 -1
- data/lib/rubygems/gem_runner.rb +9 -0
- data/lib/rubygems/gemcutter_utilities.rb +8 -2
- data/lib/rubygems/install_update_options.rb +5 -0
- data/lib/rubygems/installer.rb +8 -9
- data/lib/rubygems/package/tar_header.rb +11 -0
- data/lib/rubygems/package/tar_reader/entry.rb +1 -5
- data/lib/rubygems/platform.rb +4 -3
- data/lib/rubygems/psych_tree.rb +4 -0
- data/lib/rubygems/request_set/gem_dependency_api.rb +1 -1
- data/lib/rubygems/requirement.rb +0 -4
- data/lib/rubygems/resolver/composed_set.rb +3 -3
- data/lib/rubygems/resolver/git_set.rb +0 -1
- data/lib/rubygems/resolver/index_set.rb +2 -2
- data/lib/rubygems/resolver.rb +3 -3
- data/lib/rubygems/source/git.rb +13 -10
- data/lib/rubygems/spec_fetcher.rb +46 -7
- data/lib/rubygems/specification.rb +38 -32
- data/lib/rubygems/target_rbconfig.rb +50 -0
- data/lib/rubygems/uri.rb +1 -1
- data/lib/rubygems/util/licenses.rb +10 -1
- data/lib/rubygems/vendor/net-http/COPYING +56 -0
- data/lib/rubygems/vendor/net-http/lib/net/http/header.rb +1 -1
- data/lib/rubygems/vendor/net-http/lib/net/http/requests.rb +5 -0
- data/lib/rubygems/vendor/net-http/lib/net/http.rb +120 -36
- data/lib/rubygems/vendor/optparse/lib/optparse/ac.rb +16 -0
- data/lib/rubygems/vendor/optparse/lib/optparse/kwargs.rb +8 -3
- data/lib/rubygems/vendor/optparse/lib/optparse/version.rb +9 -0
- data/lib/rubygems/vendor/optparse/lib/optparse.rb +147 -51
- data/lib/rubygems/vendor/resolv/COPYING +56 -0
- data/lib/rubygems/vendor/resolv/lib/resolv.rb +50 -37
- data/lib/rubygems/vendor/securerandom/COPYING +56 -0
- data/lib/rubygems/vendor/securerandom/lib/securerandom.rb +5 -5
- data/lib/rubygems/vendor/timeout/COPYING +56 -0
- data/lib/rubygems/vendor/timeout/lib/timeout.rb +5 -8
- data/lib/rubygems/vendor/uri/COPYING +56 -0
- data/lib/rubygems/vendor/uri/lib/uri/common.rb +37 -16
- data/lib/rubygems/vendor/uri/lib/uri/file.rb +3 -3
- data/lib/rubygems/vendor/uri/lib/uri/ftp.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri/generic.rb +16 -26
- data/lib/rubygems/vendor/uri/lib/uri/http.rb +2 -2
- data/lib/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +10 -3
- data/lib/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +26 -3
- data/lib/rubygems/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/rubygems/vendor/uri/lib/uri.rb +9 -9
- data/lib/rubygems/vendored_securerandom.rb +0 -1
- data/lib/rubygems/version.rb +0 -4
- data/lib/rubygems.rb +30 -20
- data/rubygems-update.gemspec +5 -5
- data/setup.rb +1 -1
- metadata +36 -27
- data/bundler/lib/bundler/vendor/fileutils/LICENSE.txt +0 -22
- data/bundler/lib/bundler/vendor/securerandom/LICENSE.txt +0 -22
- data/bundler/lib/bundler/vendor/securerandom/lib/random/formatter.rb +0 -373
- data/bundler/lib/bundler/vendor/uri/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/net-http/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/net-http/lib/net/http/backward.rb +0 -40
- data/lib/rubygems/vendor/resolv/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/securerandom/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/securerandom/lib/random/formatter.rb +0 -373
- data/lib/rubygems/vendor/timeout/LICENSE.txt +0 -22
- data/lib/rubygems/vendor/uri/LICENSE.txt +0 -22
- /data/{MAINTAINERS.txt → doc/MAINTAINERS.txt} +0 -0
- /data/{bundler → doc/bundler}/UPGRADING.md +0 -0
- /data/{UPGRADING.md → doc/rubygems/UPGRADING.md} +0 -0
@@ -102,7 +102,7 @@ module Bundler
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def identifier
|
105
|
-
uri_with_specifiers([humanized_ref,
|
105
|
+
uri_with_specifiers([humanized_ref, locked_revision, glob_for_display])
|
106
106
|
end
|
107
107
|
|
108
108
|
def uri_with_specifiers(specifiers)
|
@@ -176,10 +176,10 @@ module Bundler
|
|
176
176
|
"#{current_branch} but Gemfile specifies #{branch}"
|
177
177
|
end
|
178
178
|
|
179
|
-
changed =
|
179
|
+
changed = locked_revision && locked_revision != revision
|
180
180
|
|
181
|
-
if !Bundler.settings[:disable_local_revision_check] && changed && !@unlocked && !git_proxy.contains?(
|
182
|
-
raise GitError, "The Gemfile lock is pointing to revision #{shortref_for_display(
|
181
|
+
if !Bundler.settings[:disable_local_revision_check] && changed && !@unlocked && !git_proxy.contains?(locked_revision)
|
182
|
+
raise GitError, "The Gemfile lock is pointing to revision #{shortref_for_display(locked_revision)} " \
|
183
183
|
"but the current branch in your local override for #{name} does not contain such commit. " \
|
184
184
|
"Please make sure your branch is up to date."
|
185
185
|
end
|
@@ -188,12 +188,10 @@ module Bundler
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def specs(*)
|
191
|
-
|
191
|
+
set_cache_path!(app_cache_path) if use_app_cache?
|
192
192
|
|
193
193
|
if requires_checkout? && !@copied
|
194
|
-
|
195
|
-
|
196
|
-
fetch
|
194
|
+
fetch unless use_app_cache?
|
197
195
|
checkout
|
198
196
|
end
|
199
197
|
|
@@ -216,17 +214,16 @@ module Bundler
|
|
216
214
|
requires_checkout? ? spec.post_install_message : nil
|
217
215
|
end
|
218
216
|
|
217
|
+
def migrate_cache(custom_path = nil, local: false)
|
218
|
+
if local
|
219
|
+
cache_to(custom_path, try_migrate: false)
|
220
|
+
else
|
221
|
+
cache_to(custom_path, try_migrate: true)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
219
225
|
def cache(spec, custom_path = nil)
|
220
|
-
|
221
|
-
return unless Bundler.feature_flag.cache_all?
|
222
|
-
return if install_path == app_cache_path
|
223
|
-
return if cache_path == app_cache_path
|
224
|
-
cached!
|
225
|
-
FileUtils.rm_rf(app_cache_path)
|
226
|
-
git_proxy.checkout if requires_checkout?
|
227
|
-
FileUtils.cp_r("#{cache_path}/.", app_cache_path)
|
228
|
-
FileUtils.touch(app_cache_path.join(".bundlecache"))
|
229
|
-
FileUtils.rm_rf(Dir.glob(app_cache_path.join("hooks/*.sample")))
|
226
|
+
cache_to(custom_path, try_migrate: false)
|
230
227
|
end
|
231
228
|
|
232
229
|
def load_spec_files
|
@@ -249,7 +246,7 @@ module Bundler
|
|
249
246
|
end
|
250
247
|
|
251
248
|
def app_cache_dirname
|
252
|
-
"#{base_name}-#{shortref_for_path(
|
249
|
+
"#{base_name}-#{shortref_for_path(locked_revision || revision)}"
|
253
250
|
end
|
254
251
|
|
255
252
|
def revision
|
@@ -270,9 +267,38 @@ module Bundler
|
|
270
267
|
|
271
268
|
private
|
272
269
|
|
270
|
+
def cache_to(custom_path, try_migrate: false)
|
271
|
+
return unless Bundler.feature_flag.cache_all?
|
272
|
+
|
273
|
+
app_cache_path = app_cache_path(custom_path)
|
274
|
+
|
275
|
+
migrate = try_migrate ? bare_repo?(app_cache_path) : false
|
276
|
+
|
277
|
+
set_cache_path!(nil) if migrate
|
278
|
+
|
279
|
+
return if cache_path == app_cache_path
|
280
|
+
|
281
|
+
cached!
|
282
|
+
FileUtils.rm_rf(app_cache_path)
|
283
|
+
git_proxy.checkout if migrate || requires_checkout?
|
284
|
+
git_proxy.copy_to(app_cache_path, @submodules)
|
285
|
+
end
|
286
|
+
|
273
287
|
def checkout
|
274
288
|
Bundler.ui.debug " * Checking out revision: #{ref}"
|
275
|
-
|
289
|
+
if use_app_cache? && !bare_repo?(app_cache_path)
|
290
|
+
SharedHelpers.filesystem_access(install_path.dirname) do |p|
|
291
|
+
FileUtils.mkdir_p(p)
|
292
|
+
end
|
293
|
+
FileUtils.cp_r("#{app_cache_path}/.", install_path)
|
294
|
+
else
|
295
|
+
if use_app_cache? && bare_repo?(app_cache_path)
|
296
|
+
Bundler.ui.warn "Installing from cache in old \"bare repository\" format for compatibility. " \
|
297
|
+
"Please run `bundle cache` and commit the updated cache to migrate to the new format and get rid of this warning."
|
298
|
+
end
|
299
|
+
|
300
|
+
git_proxy.copy_to(install_path, submodules)
|
301
|
+
end
|
276
302
|
serialize_gemspecs_in(install_path)
|
277
303
|
@copied = true
|
278
304
|
end
|
@@ -320,13 +346,8 @@ module Bundler
|
|
320
346
|
@install_path = path
|
321
347
|
end
|
322
348
|
|
323
|
-
def set_up_app_cache!(path)
|
324
|
-
FileUtils.mkdir_p(path.join("refs"))
|
325
|
-
set_cache_path!(path)
|
326
|
-
end
|
327
|
-
|
328
349
|
def has_app_cache?
|
329
|
-
|
350
|
+
locked_revision && super
|
330
351
|
end
|
331
352
|
|
332
353
|
def use_app_cache?
|
@@ -334,11 +355,11 @@ module Bundler
|
|
334
355
|
end
|
335
356
|
|
336
357
|
def requires_checkout?
|
337
|
-
allow_git_ops? && !local? && !
|
358
|
+
allow_git_ops? && !local? && !locked_revision_checked_out?
|
338
359
|
end
|
339
360
|
|
340
|
-
def
|
341
|
-
|
361
|
+
def locked_revision_checked_out?
|
362
|
+
locked_revision && locked_revision == revision && install_path.exist?
|
342
363
|
end
|
343
364
|
|
344
365
|
def base_name
|
@@ -375,7 +396,7 @@ module Bundler
|
|
375
396
|
Bundler::Digest.sha1(input)
|
376
397
|
end
|
377
398
|
|
378
|
-
def
|
399
|
+
def locked_revision
|
379
400
|
options["revision"]
|
380
401
|
end
|
381
402
|
|
@@ -384,7 +405,7 @@ module Bundler
|
|
384
405
|
end
|
385
406
|
|
386
407
|
def git_proxy
|
387
|
-
@git_proxy ||= GitProxy.new(cache_path, uri, options,
|
408
|
+
@git_proxy ||= GitProxy.new(cache_path, uri, options, locked_revision, self)
|
388
409
|
end
|
389
410
|
|
390
411
|
def fetch
|
@@ -417,6 +438,10 @@ module Bundler
|
|
417
438
|
def override_for(path)
|
418
439
|
Bundler.settings.local_overrides.key(path)
|
419
440
|
end
|
441
|
+
|
442
|
+
def bare_repo?(path)
|
443
|
+
File.exist?(path.join("objects")) && File.exist?(path.join("HEAD"))
|
444
|
+
end
|
420
445
|
end
|
421
446
|
end
|
422
447
|
end
|
@@ -24,9 +24,8 @@ module Bundler
|
|
24
24
|
s.bindir = "exe"
|
25
25
|
s.homepage = "https://bundler.io"
|
26
26
|
s.summary = "The best way to manage your application's dependencies"
|
27
|
-
s.executables = %w[bundle]
|
28
|
-
|
29
|
-
s.loaded_from = __dir__
|
27
|
+
s.executables = %w[bundle bundler]
|
28
|
+
s.loaded_from = SharedHelpers.gemspec_path
|
30
29
|
end
|
31
30
|
end
|
32
31
|
|
@@ -214,7 +214,7 @@ module Bundler
|
|
214
214
|
|
215
215
|
# Some gem authors put absolute paths in their gemspec
|
216
216
|
# and we have to save them from themselves
|
217
|
-
spec.files = spec.files.
|
217
|
+
spec.files = spec.files.filter_map do |path|
|
218
218
|
next path unless /\A#{Pathname::SEPARATOR_PAT}/o.match?(path)
|
219
219
|
next if File.directory?(path)
|
220
220
|
begin
|
@@ -222,7 +222,7 @@ module Bundler
|
|
222
222
|
rescue ArgumentError
|
223
223
|
path
|
224
224
|
end
|
225
|
-
end
|
225
|
+
end
|
226
226
|
|
227
227
|
installer = Path::Installer.new(
|
228
228
|
spec,
|
@@ -7,49 +7,44 @@ module Bundler
|
|
7
7
|
include Enumerable
|
8
8
|
include TSort
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
def initialize(specs, incomplete_specs = [])
|
10
|
+
def initialize(specs)
|
13
11
|
@specs = specs
|
14
|
-
@incomplete_specs = incomplete_specs
|
15
12
|
end
|
16
13
|
|
17
|
-
def for(dependencies,
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
def for(dependencies, platforms_or_legacy_check = [nil], legacy_platforms = [nil], skips: [])
|
15
|
+
platforms = if [true, false].include?(platforms_or_legacy_check)
|
16
|
+
Bundler::SharedHelpers.major_deprecation 2,
|
17
|
+
"SpecSet#for received a `check` parameter, but that's no longer used and deprecated. " \
|
18
|
+
"SpecSet#for always implicitly performs validation. Please remove this parameter",
|
19
|
+
print_caller_location: true
|
21
20
|
|
22
|
-
|
23
|
-
|
21
|
+
legacy_platforms
|
22
|
+
else
|
23
|
+
platforms_or_legacy_check
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
platform = dep[1]
|
27
|
-
incomplete = false
|
26
|
+
materialize_dependencies(dependencies, platforms, skips: skips)
|
28
27
|
|
29
|
-
|
30
|
-
|
28
|
+
@materializations.flat_map(&:specs).uniq
|
29
|
+
end
|
31
30
|
|
32
|
-
|
31
|
+
def normalize_platforms!(deps, platforms)
|
32
|
+
complete_platforms = add_extra_platforms!(platforms)
|
33
33
|
|
34
|
-
|
35
|
-
if
|
36
|
-
specs.concat(specs_for_dep)
|
34
|
+
complete_platforms.map do |platform|
|
35
|
+
next platform if platform == Gem::Platform::RUBY
|
37
36
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
43
|
-
else
|
44
|
-
incomplete = true
|
37
|
+
begin
|
38
|
+
Integer(platform.version)
|
39
|
+
rescue ArgumentError, TypeError
|
40
|
+
next platform
|
45
41
|
end
|
46
42
|
|
47
|
-
|
48
|
-
|
49
|
-
end
|
50
|
-
end
|
43
|
+
less_specific_platform = Gem::Platform.new([platform.cpu, platform.os, nil])
|
44
|
+
next platform if incomplete_for_platform?(deps, less_specific_platform)
|
51
45
|
|
52
|
-
|
46
|
+
less_specific_platform
|
47
|
+
end.uniq
|
53
48
|
end
|
54
49
|
|
55
50
|
def add_extra_platforms!(platforms)
|
@@ -112,19 +107,18 @@ module Bundler
|
|
112
107
|
end
|
113
108
|
|
114
109
|
def materialize(deps)
|
115
|
-
|
110
|
+
materialize_dependencies(deps)
|
116
111
|
|
117
|
-
SpecSet.new(
|
112
|
+
SpecSet.new(materialized_specs)
|
118
113
|
end
|
119
114
|
|
120
115
|
# Materialize for all the specs in the spec set, regardless of what platform they're for
|
121
|
-
# This is in contrast to how for does platform filtering (and specifically different from how `materialize` calls `for` only for the current platform)
|
122
116
|
# @return [Array<Gem::Specification>]
|
123
117
|
def materialized_for_all_platforms
|
124
118
|
@specs.map do |s|
|
125
119
|
next s unless s.is_a?(LazySpecification)
|
126
120
|
s.source.remote!
|
127
|
-
spec = s.
|
121
|
+
spec = s.materialize_strictly
|
128
122
|
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
|
129
123
|
spec
|
130
124
|
end
|
@@ -133,15 +127,32 @@ module Bundler
|
|
133
127
|
def incomplete_for_platform?(deps, platform)
|
134
128
|
return false if @specs.empty?
|
135
129
|
|
136
|
-
|
130
|
+
validation_set = self.class.new(@specs)
|
131
|
+
validation_set.for(deps, [platform])
|
132
|
+
|
133
|
+
validation_set.incomplete_specs.any?
|
134
|
+
end
|
137
135
|
|
138
|
-
|
136
|
+
def missing_specs_for(dependencies)
|
137
|
+
materialize_dependencies(dependencies)
|
139
138
|
|
140
|
-
|
139
|
+
missing_specs
|
141
140
|
end
|
142
141
|
|
143
142
|
def missing_specs
|
144
|
-
@
|
143
|
+
@materializations.flat_map(&:completely_missing_specs)
|
144
|
+
end
|
145
|
+
|
146
|
+
def partially_missing_specs
|
147
|
+
@materializations.flat_map(&:partially_missing_specs)
|
148
|
+
end
|
149
|
+
|
150
|
+
def incomplete_specs
|
151
|
+
@materializations.flat_map(&:incomplete_specs)
|
152
|
+
end
|
153
|
+
|
154
|
+
def insecurely_materialized_specs
|
155
|
+
materialized_specs.select(&:insecurely_materialized?)
|
145
156
|
end
|
146
157
|
|
147
158
|
def -(other)
|
@@ -152,12 +163,6 @@ module Bundler
|
|
152
163
|
@specs.detect {|spec| spec.name == name && spec.match_platform(platform) }
|
153
164
|
end
|
154
165
|
|
155
|
-
def specs_compatible_with(other)
|
156
|
-
select do |spec|
|
157
|
-
other.valid?(spec)
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
166
|
def delete_by_name(name)
|
162
167
|
@specs.reject! {|spec| spec.name == name }
|
163
168
|
|
@@ -201,6 +206,37 @@ module Bundler
|
|
201
206
|
|
202
207
|
private
|
203
208
|
|
209
|
+
def materialize_dependencies(dependencies, platforms = [nil], skips: [])
|
210
|
+
handled = ["bundler"].product(platforms).map {|k| [k, true] }.to_h
|
211
|
+
deps = dependencies.product(platforms)
|
212
|
+
@materializations = []
|
213
|
+
|
214
|
+
loop do
|
215
|
+
break unless dep = deps.shift
|
216
|
+
|
217
|
+
dependency = dep[0]
|
218
|
+
platform = dep[1]
|
219
|
+
name = dependency.name
|
220
|
+
|
221
|
+
key = [name, platform]
|
222
|
+
next if handled.key?(key)
|
223
|
+
|
224
|
+
handled[key] = true
|
225
|
+
|
226
|
+
materialization = Materialization.new(dependency, platform, candidates: lookup[name])
|
227
|
+
|
228
|
+
deps.concat(materialization.dependencies) if materialization.complete?
|
229
|
+
|
230
|
+
@materializations << materialization unless skips.include?(name)
|
231
|
+
end
|
232
|
+
|
233
|
+
@materializations
|
234
|
+
end
|
235
|
+
|
236
|
+
def materialized_specs
|
237
|
+
@materializations.filter_map(&:materialized_spec)
|
238
|
+
end
|
239
|
+
|
204
240
|
def reset!
|
205
241
|
@sorted = nil
|
206
242
|
@lookup = nil
|
@@ -273,17 +309,6 @@ module Bundler
|
|
273
309
|
@specs.sort_by(&:name).each {|s| yield s }
|
274
310
|
end
|
275
311
|
|
276
|
-
def specs_for_dependency(dep, platform)
|
277
|
-
specs_for_name = lookup[dep.name]
|
278
|
-
return [] unless specs_for_name
|
279
|
-
|
280
|
-
if platform
|
281
|
-
GemHelpers.select_best_platform_match(specs_for_name, platform, force_ruby: dep.force_ruby_platform)
|
282
|
-
else
|
283
|
-
GemHelpers.select_best_local_platform_match(specs_for_name, force_ruby: dep.force_ruby_platform || dep.default_force_ruby_platform)
|
284
|
-
end
|
285
|
-
end
|
286
|
-
|
287
312
|
def tsort_each_child(s)
|
288
313
|
s.dependencies.sort_by(&:name).each do |d|
|
289
314
|
next if d.type == :development
|
@@ -9,6 +9,10 @@ module Bundler
|
|
9
9
|
spec
|
10
10
|
end
|
11
11
|
|
12
|
+
def insecurely_materialized?
|
13
|
+
false
|
14
|
+
end
|
15
|
+
|
12
16
|
attr_reader :checksum
|
13
17
|
attr_accessor :stub, :ignored
|
14
18
|
|
@@ -112,6 +116,10 @@ module Bundler
|
|
112
116
|
stub.raw_require_paths
|
113
117
|
end
|
114
118
|
|
119
|
+
def inspect
|
120
|
+
"#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>"
|
121
|
+
end
|
122
|
+
|
115
123
|
private
|
116
124
|
|
117
125
|
def _remote_specification
|
@@ -26,7 +26,7 @@ TODO: Write usage instructions here
|
|
26
26
|
|
27
27
|
## Development
|
28
28
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:test_task] %>` to run the tests.<% end %> You can also run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the gem in this directory, ignoring other installed copies of this gem.<% end %>
|
30
30
|
|
31
31
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
32
|
<% if config[:git] -%>
|
@@ -17,21 +17,21 @@ jobs:
|
|
17
17
|
- '<%= RUBY_VERSION %>'
|
18
18
|
|
19
19
|
steps:
|
20
|
-
|
20
|
+
- uses: actions/checkout@v4
|
21
21
|
<%- if config[:ext] == 'rust' -%>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
22
|
+
- name: Set up Ruby & Rust
|
23
|
+
uses: oxidize-rb/actions/setup-ruby-and-rust@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby }}
|
26
|
+
bundler-cache: true
|
27
|
+
cargo-cache: true
|
28
|
+
rubygems: '<%= ::Gem.rubygems_version %>'
|
29
29
|
<%- else -%>
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
- name: Set up Ruby
|
31
|
+
uses: ruby/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: ${{ matrix.ruby }}
|
34
|
+
bundler-cache: true
|
35
35
|
<%- end -%>
|
36
|
-
|
37
|
-
|
36
|
+
- name: Run the default task
|
37
|
+
run: bundle exec rake
|
@@ -37,15 +37,15 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.bindir = "exe"
|
38
38
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
39
39
|
spec.require_paths = ["lib"]
|
40
|
-
<%- if config[:ext] == 'c' -%>
|
40
|
+
<%- if config[:ext] == 'c' || config[:ext] == 'rust' -%>
|
41
41
|
spec.extensions = ["ext/<%= config[:underscored_name] %>/extconf.rb"]
|
42
42
|
<%- end -%>
|
43
|
-
<%- if config[:ext] == 'rust' -%>
|
44
|
-
spec.extensions = ["ext/<%= config[:underscored_name] %>/Cargo.toml"]
|
45
|
-
<%- end -%>
|
46
43
|
|
47
44
|
# Uncomment to register a new dependency of your gem
|
48
45
|
# spec.add_dependency "example-gem", "~> 1.0"
|
46
|
+
<%- if config[:ext] == 'rust' -%>
|
47
|
+
spec.add_dependency "rb_sys", "~> 0.9.91"
|
48
|
+
<%- end -%>
|
49
49
|
|
50
50
|
# For more information and examples about making a new gem, check out our
|
51
51
|
# guide at: https://bundler.io/guides/creating_gem.html
|
@@ -16,7 +16,7 @@ module Bundler
|
|
16
16
|
|
17
17
|
if uri.userinfo
|
18
18
|
# oauth authentication
|
19
|
-
if uri.password == "x-oauth-basic" || uri.password == "x"
|
19
|
+
if uri.password == "x-oauth-basic" || uri.password == "x" || uri.password.nil?
|
20
20
|
# URI as string does not display with password if no user is set
|
21
21
|
oauth_designation = uri.password
|
22
22
|
uri.user = oauth_designation
|
@@ -0,0 +1,56 @@
|
|
1
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
2
|
+
You can redistribute it and/or modify it under either the terms of the
|
3
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a. place your modifications in the Public Domain or otherwise
|
13
|
+
make them Freely Available, such as by posting said
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
+
the author to include your modifications in the software.
|
16
|
+
|
17
|
+
b. use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c. give non-standard binaries non-standard names, with
|
21
|
+
instructions on where to get the original software distribution.
|
22
|
+
|
23
|
+
d. make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or binary form,
|
26
|
+
provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a. distribute the binaries and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent)
|
30
|
+
on where to get the original distribution.
|
31
|
+
|
32
|
+
b. accompany the distribution with the machine-readable source of
|
33
|
+
the software.
|
34
|
+
|
35
|
+
c. give non-standard binaries non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d. make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under these terms.
|
43
|
+
|
44
|
+
For the list of those files and their copying conditions, see the
|
45
|
+
file LEGAL.
|
46
|
+
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
48
|
+
output from the software do not automatically fall under the
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
51
|
+
software.
|
52
|
+
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
+
PURPOSE.
|