rubygems-update 3.6.8 → 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.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +874 -787
  3. data/CONTRIBUTING.md +9 -0
  4. data/Manifest.txt +6 -22
  5. data/README.md +1 -1
  6. data/SECURITY.md +7 -0
  7. data/bundler/CHANGELOG.md +1103 -1030
  8. data/bundler/README.md +7 -7
  9. data/bundler/bundler.gemspec +2 -2
  10. data/bundler/lib/bundler/build_metadata.rb +10 -11
  11. data/bundler/lib/bundler/cli/common.rb +1 -1
  12. data/bundler/lib/bundler/cli/config.rb +2 -2
  13. data/bundler/lib/bundler/cli/doctor/diagnose.rb +167 -0
  14. data/bundler/lib/bundler/cli/doctor/ssl.rb +249 -0
  15. data/bundler/lib/bundler/cli/doctor.rb +27 -155
  16. data/bundler/lib/bundler/cli/gem.rb +62 -30
  17. data/bundler/lib/bundler/cli/install.rb +4 -4
  18. data/bundler/lib/bundler/cli/issue.rb +2 -2
  19. data/bundler/lib/bundler/cli/outdated.rb +1 -1
  20. data/bundler/lib/bundler/cli/update.rb +2 -2
  21. data/bundler/lib/bundler/cli.rb +12 -25
  22. data/bundler/lib/bundler/compact_index_client.rb +1 -5
  23. data/bundler/lib/bundler/current_ruby.rb +27 -3
  24. data/bundler/lib/bundler/definition.rb +55 -58
  25. data/bundler/lib/bundler/dependency.rb +1 -1
  26. data/bundler/lib/bundler/dsl.rb +33 -23
  27. data/bundler/lib/bundler/feature_flag.rb +15 -12
  28. data/bundler/lib/bundler/fetcher/dependency.rb +2 -1
  29. data/bundler/lib/bundler/fetcher/downloader.rb +33 -7
  30. data/bundler/lib/bundler/fetcher.rb +49 -19
  31. data/bundler/lib/bundler/friendly_errors.rb +2 -1
  32. data/bundler/lib/bundler/index.rb +7 -2
  33. data/bundler/lib/bundler/installer.rb +5 -4
  34. data/bundler/lib/bundler/lazy_specification.rb +29 -18
  35. data/bundler/lib/bundler/lockfile_parser.rb +21 -5
  36. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  40. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  41. data/bundler/lib/bundler/man/bundle-config.1 +172 -126
  42. data/bundler/lib/bundler/man/bundle-config.1.ronn +91 -91
  43. data/bundler/lib/bundler/man/bundle-console.1 +1 -1
  44. data/bundler/lib/bundler/man/bundle-doctor.1 +43 -4
  45. data/bundler/lib/bundler/man/bundle-doctor.1.ronn +48 -4
  46. data/bundler/lib/bundler/man/bundle-env.1 +1 -1
  47. data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
  48. data/bundler/lib/bundler/man/bundle-fund.1 +1 -1
  49. data/bundler/lib/bundler/man/bundle-gem.1 +67 -44
  50. data/bundler/lib/bundler/man/bundle-gem.1.ronn +8 -4
  51. data/bundler/lib/bundler/man/bundle-help.1 +1 -1
  52. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  53. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  54. data/bundler/lib/bundler/man/bundle-inject.1 +2 -2
  55. data/bundler/lib/bundler/man/bundle-inject.1.ronn +1 -1
  56. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  57. data/bundler/lib/bundler/man/bundle-issue.1 +1 -1
  58. data/bundler/lib/bundler/man/bundle-licenses.1 +1 -1
  59. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  60. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  61. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  62. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  63. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  64. data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
  65. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  66. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  67. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  68. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  69. data/bundler/lib/bundler/man/bundle-version.1 +1 -1
  70. data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
  71. data/bundler/lib/bundler/man/bundle.1 +1 -1
  72. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  73. data/bundler/lib/bundler/match_platform.rb +31 -12
  74. data/bundler/lib/bundler/materialization.rb +2 -2
  75. data/bundler/lib/bundler/resolver/package.rb +1 -1
  76. data/bundler/lib/bundler/resolver.rb +11 -9
  77. data/bundler/lib/bundler/rubygems_ext.rb +116 -120
  78. data/bundler/lib/bundler/rubygems_integration.rb +11 -6
  79. data/bundler/lib/bundler/runtime.rb +1 -1
  80. data/bundler/lib/bundler/self_manager.rb +32 -42
  81. data/bundler/lib/bundler/settings/validator.rb +0 -23
  82. data/bundler/lib/bundler/settings.rb +4 -6
  83. data/bundler/lib/bundler/shared_helpers.rb +6 -4
  84. data/bundler/lib/bundler/source/git/git_proxy.rb +3 -3
  85. data/bundler/lib/bundler/source/path.rb +7 -0
  86. data/bundler/lib/bundler/source_list.rb +1 -5
  87. data/bundler/lib/bundler/source_map.rb +1 -1
  88. data/bundler/lib/bundler/spec_set.rb +28 -6
  89. data/bundler/lib/bundler/templates/Executable +0 -11
  90. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +2 -0
  91. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +6 -5
  92. data/bundler/lib/bundler/ui/shell.rb +2 -2
  93. data/bundler/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
  94. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +2 -1
  95. data/bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +81 -42
  96. data/bundler/lib/bundler/version.rb +10 -2
  97. data/bundler/lib/bundler/worker.rb +1 -1
  98. data/bundler/lib/bundler.rb +14 -12
  99. data/doc/bundler/UPGRADING.md +137 -127
  100. data/doc/rubygems/CONTRIBUTING.md +1 -1
  101. data/lib/rubygems/basic_specification.rb +7 -0
  102. data/lib/rubygems/commands/pristine_command.rb +9 -12
  103. data/lib/rubygems/commands/push_command.rb +2 -1
  104. data/lib/rubygems/commands/setup_command.rb +2 -2
  105. data/lib/rubygems/core_ext/kernel_require.rb +5 -2
  106. data/lib/rubygems/ext/builder.rb +15 -4
  107. data/lib/rubygems/ext/cargo_builder.rb +7 -5
  108. data/lib/rubygems/ext/rake_builder.rb +1 -3
  109. data/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +10 -3
  110. data/lib/rubygems/gemcutter_utilities.rb +5 -2
  111. data/lib/rubygems/installer.rb +45 -50
  112. data/lib/rubygems/package/tar_writer.rb +5 -4
  113. data/lib/rubygems/platform.rb +142 -39
  114. data/lib/rubygems/remote_fetcher.rb +3 -3
  115. data/lib/rubygems/request_set.rb +3 -6
  116. data/lib/rubygems/resolver/best_set.rb +1 -1
  117. data/lib/rubygems/resolver/source_set.rb +1 -1
  118. data/lib/rubygems/resolver.rb +1 -1
  119. data/lib/rubygems/s3_uri_signer.rb +5 -3
  120. data/lib/rubygems/source.rb +28 -22
  121. data/lib/rubygems/specification.rb +2 -2
  122. data/lib/rubygems/uri_formatter.rb +2 -1
  123. data/lib/rubygems/util/licenses.rb +21 -0
  124. data/lib/rubygems/vendor/net-http/lib/net/http.rb +14 -19
  125. data/lib/rubygems/vendor/resolv/lib/resolv.rb +50 -22
  126. data/lib/rubygems.rb +65 -7
  127. data/rubygems-update.gemspec +2 -2
  128. data/setup.rb +1 -1
  129. metadata +9 -25
  130. data/bundler/lib/bundler/gem_helpers.rb +0 -144
  131. data/bundler/lib/bundler/templates/Executable.bundler +0 -109
  132. data/bundler/lib/bundler/vendor/fileutils/.document +0 -1
  133. data/bundler/lib/bundler/vendor/net-http-persistent/.document +0 -1
  134. data/bundler/lib/bundler/vendor/pub_grub/.document +0 -1
  135. data/bundler/lib/bundler/vendor/securerandom/.document +0 -1
  136. data/bundler/lib/bundler/vendor/thor/.document +0 -1
  137. data/bundler/lib/bundler/vendor/tsort/.document +0 -1
  138. data/bundler/lib/bundler/vendor/uri/.document +0 -1
  139. data/lib/rubygems/shellwords.rb +0 -3
  140. data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +0 -21
  141. data/lib/rubygems/vendor/molinillo/.document +0 -1
  142. data/lib/rubygems/vendor/net-http/.document +0 -1
  143. data/lib/rubygems/vendor/net-protocol/.document +0 -1
  144. data/lib/rubygems/vendor/optparse/.document +0 -1
  145. data/lib/rubygems/vendor/resolv/.document +0 -1
  146. data/lib/rubygems/vendor/securerandom/.document +0 -1
  147. data/lib/rubygems/vendor/timeout/.document +0 -1
  148. data/lib/rubygems/vendor/tsort/.document +0 -1
  149. data/lib/rubygems/vendor/uri/.document +0 -1
  150. /data/lib/rubygems/ssl_certs/rubygems.org/{GlobalSignRootCA_R3.pem → GlobalSign.pem} +0 -0
  151. /data/{bundler/lib/bundler/vendor/connection_pool → lib/rubygems/vendor}/.document +0 -0
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: 3.6.8
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -85,10 +85,12 @@ extra_rdoc_files:
85
85
  files:
86
86
  - CHANGELOG.md
87
87
  - CODE_OF_CONDUCT.md
88
+ - CONTRIBUTING.md
88
89
  - LICENSE.txt
89
90
  - MIT.txt
90
91
  - Manifest.txt
91
92
  - README.md
93
+ - SECURITY.md
92
94
  - bundler/CHANGELOG.md
93
95
  - bundler/LICENSE.md
94
96
  - bundler/README.md
@@ -111,6 +113,8 @@ files:
111
113
  - bundler/lib/bundler/cli/config.rb
112
114
  - bundler/lib/bundler/cli/console.rb
113
115
  - bundler/lib/bundler/cli/doctor.rb
116
+ - bundler/lib/bundler/cli/doctor/diagnose.rb
117
+ - bundler/lib/bundler/cli/doctor/ssl.rb
114
118
  - bundler/lib/bundler/cli/exec.rb
115
119
  - bundler/lib/bundler/cli/fund.rb
116
120
  - bundler/lib/bundler/cli/gem.rb
@@ -158,7 +162,6 @@ files:
158
162
  - bundler/lib/bundler/force_platform.rb
159
163
  - bundler/lib/bundler/friendly_errors.rb
160
164
  - bundler/lib/bundler/gem_helper.rb
161
- - bundler/lib/bundler/gem_helpers.rb
162
165
  - bundler/lib/bundler/gem_tasks.rb
163
166
  - bundler/lib/bundler/gem_version_promoter.rb
164
167
  - bundler/lib/bundler/graph.rb
@@ -296,7 +299,6 @@ files:
296
299
  - bundler/lib/bundler/stub_specification.rb
297
300
  - bundler/lib/bundler/templates/.document
298
301
  - bundler/lib/bundler/templates/Executable
299
- - bundler/lib/bundler/templates/Executable.bundler
300
302
  - bundler/lib/bundler/templates/Executable.standalone
301
303
  - bundler/lib/bundler/templates/Gemfile
302
304
  - bundler/lib/bundler/templates/newgem/CHANGELOG.md.tt
@@ -339,22 +341,18 @@ files:
339
341
  - bundler/lib/bundler/uri_credentials_filter.rb
340
342
  - bundler/lib/bundler/uri_normalizer.rb
341
343
  - bundler/lib/bundler/vendor/.document
342
- - bundler/lib/bundler/vendor/connection_pool/.document
343
344
  - bundler/lib/bundler/vendor/connection_pool/LICENSE
344
345
  - bundler/lib/bundler/vendor/connection_pool/lib/connection_pool.rb
345
346
  - bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb
346
347
  - bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb
347
348
  - bundler/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb
348
- - bundler/lib/bundler/vendor/fileutils/.document
349
349
  - bundler/lib/bundler/vendor/fileutils/COPYING
350
350
  - bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb
351
- - bundler/lib/bundler/vendor/net-http-persistent/.document
352
351
  - bundler/lib/bundler/vendor/net-http-persistent/README.rdoc
353
352
  - bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
354
353
  - bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
355
354
  - bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb
356
355
  - bundler/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb
357
- - bundler/lib/bundler/vendor/pub_grub/.document
358
356
  - bundler/lib/bundler/vendor/pub_grub/LICENSE.txt
359
357
  - bundler/lib/bundler/vendor/pub_grub/lib/pub_grub.rb
360
358
  - bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
@@ -373,10 +371,8 @@ files:
373
371
  - bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
374
372
  - bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
375
373
  - bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
376
- - bundler/lib/bundler/vendor/securerandom/.document
377
374
  - bundler/lib/bundler/vendor/securerandom/COPYING
378
375
  - bundler/lib/bundler/vendor/securerandom/lib/securerandom.rb
379
- - bundler/lib/bundler/vendor/thor/.document
380
376
  - bundler/lib/bundler/vendor/thor/LICENSE.md
381
377
  - bundler/lib/bundler/vendor/thor/lib/thor.rb
382
378
  - bundler/lib/bundler/vendor/thor/lib/thor/actions.rb
@@ -413,10 +409,8 @@ files:
413
409
  - bundler/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
414
410
  - bundler/lib/bundler/vendor/thor/lib/thor/util.rb
415
411
  - bundler/lib/bundler/vendor/thor/lib/thor/version.rb
416
- - bundler/lib/bundler/vendor/tsort/.document
417
412
  - bundler/lib/bundler/vendor/tsort/LICENSE.txt
418
413
  - bundler/lib/bundler/vendor/tsort/lib/tsort.rb
419
- - bundler/lib/bundler/vendor/uri/.document
420
414
  - bundler/lib/bundler/vendor/uri/COPYING
421
415
  - bundler/lib/bundler/vendor/uri/lib/uri.rb
422
416
  - bundler/lib/bundler/vendor/uri/lib/uri/common.rb
@@ -603,7 +597,6 @@ files:
603
597
  - lib/rubygems/security/signer.rb
604
598
  - lib/rubygems/security/trust_dir.rb
605
599
  - lib/rubygems/security_option.rb
606
- - lib/rubygems/shellwords.rb
607
600
  - lib/rubygems/source.rb
608
601
  - lib/rubygems/source/git.rb
609
602
  - lib/rubygems/source/installed.rb
@@ -617,8 +610,7 @@ files:
617
610
  - lib/rubygems/specification_policy.rb
618
611
  - lib/rubygems/specification_record.rb
619
612
  - lib/rubygems/ssl_certs/.document
620
- - lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem
621
- - lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
613
+ - lib/rubygems/ssl_certs/rubygems.org/GlobalSign.pem
622
614
  - lib/rubygems/stub_specification.rb
623
615
  - lib/rubygems/target_rbconfig.rb
624
616
  - lib/rubygems/text.rb
@@ -632,7 +624,7 @@ files:
632
624
  - lib/rubygems/util/licenses.rb
633
625
  - lib/rubygems/util/list.rb
634
626
  - lib/rubygems/validator.rb
635
- - lib/rubygems/vendor/molinillo/.document
627
+ - lib/rubygems/vendor/.document
636
628
  - lib/rubygems/vendor/molinillo/LICENSE
637
629
  - lib/rubygems/vendor/molinillo/lib/molinillo.rb
638
630
  - lib/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
@@ -654,7 +646,6 @@ files:
654
646
  - lib/rubygems/vendor/molinillo/lib/molinillo/resolution.rb
655
647
  - lib/rubygems/vendor/molinillo/lib/molinillo/resolver.rb
656
648
  - lib/rubygems/vendor/molinillo/lib/molinillo/state.rb
657
- - lib/rubygems/vendor/net-http/.document
658
649
  - lib/rubygems/vendor/net-http/COPYING
659
650
  - lib/rubygems/vendor/net-http/lib/net/http.rb
660
651
  - lib/rubygems/vendor/net-http/lib/net/http/exceptions.rb
@@ -667,10 +658,8 @@ files:
667
658
  - lib/rubygems/vendor/net-http/lib/net/http/responses.rb
668
659
  - lib/rubygems/vendor/net-http/lib/net/http/status.rb
669
660
  - lib/rubygems/vendor/net-http/lib/net/https.rb
670
- - lib/rubygems/vendor/net-protocol/.document
671
661
  - lib/rubygems/vendor/net-protocol/LICENSE.txt
672
662
  - lib/rubygems/vendor/net-protocol/lib/net/protocol.rb
673
- - lib/rubygems/vendor/optparse/.document
674
663
  - lib/rubygems/vendor/optparse/COPYING
675
664
  - lib/rubygems/vendor/optparse/lib/optionparser.rb
676
665
  - lib/rubygems/vendor/optparse/lib/optparse.rb
@@ -681,19 +670,14 @@ files:
681
670
  - lib/rubygems/vendor/optparse/lib/optparse/time.rb
682
671
  - lib/rubygems/vendor/optparse/lib/optparse/uri.rb
683
672
  - lib/rubygems/vendor/optparse/lib/optparse/version.rb
684
- - lib/rubygems/vendor/resolv/.document
685
673
  - lib/rubygems/vendor/resolv/COPYING
686
674
  - lib/rubygems/vendor/resolv/lib/resolv.rb
687
- - lib/rubygems/vendor/securerandom/.document
688
675
  - lib/rubygems/vendor/securerandom/COPYING
689
676
  - lib/rubygems/vendor/securerandom/lib/securerandom.rb
690
- - lib/rubygems/vendor/timeout/.document
691
677
  - lib/rubygems/vendor/timeout/COPYING
692
678
  - lib/rubygems/vendor/timeout/lib/timeout.rb
693
- - lib/rubygems/vendor/tsort/.document
694
679
  - lib/rubygems/vendor/tsort/LICENSE.txt
695
680
  - lib/rubygems/vendor/tsort/lib/tsort.rb
696
- - lib/rubygems/vendor/uri/.document
697
681
  - lib/rubygems/vendor/uri/COPYING
698
682
  - lib/rubygems/vendor/uri/lib/uri.rb
699
683
  - lib/rubygems/vendor/uri/lib/uri/common.rb
@@ -740,14 +724,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
740
724
  requirements:
741
725
  - - ">="
742
726
  - !ruby/object:Gem::Version
743
- version: 3.1.0
727
+ version: 3.2.0
744
728
  required_rubygems_version: !ruby/object:Gem::Requirement
745
729
  requirements:
746
730
  - - ">="
747
731
  - !ruby/object:Gem::Version
748
732
  version: '0'
749
733
  requirements: []
750
- rubygems_version: 3.6.8
734
+ rubygems_version: 3.7.0
751
735
  specification_version: 4
752
736
  summary: RubyGems is a package management framework for Ruby. This gem is downloaded
753
737
  and installed by `gem update --system`, so that the `gem` CLI can update itself.
@@ -1,144 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bundler
4
- module GemHelpers
5
- GENERIC_CACHE = { Gem::Platform::RUBY => Gem::Platform::RUBY } # rubocop:disable Style/MutableConstant
6
- GENERICS = [
7
- Gem::Platform::JAVA,
8
- *Gem::Platform::WINDOWS,
9
- ].freeze
10
-
11
- def generic(p)
12
- GENERIC_CACHE[p] ||= begin
13
- found = GENERICS.find do |match|
14
- p === match
15
- end
16
- found || Gem::Platform::RUBY
17
- end
18
- end
19
- module_function :generic
20
-
21
- def generic_local_platform
22
- generic(local_platform)
23
- end
24
- module_function :generic_local_platform
25
-
26
- def local_platform
27
- Bundler.local_platform
28
- end
29
- module_function :local_platform
30
-
31
- def generic_local_platform_is_ruby?
32
- generic_local_platform == Gem::Platform::RUBY
33
- end
34
- module_function :generic_local_platform_is_ruby?
35
-
36
- def platform_specificity_match(spec_platform, user_platform)
37
- spec_platform = Gem::Platform.new(spec_platform)
38
-
39
- PlatformMatch.specificity_score(spec_platform, user_platform)
40
- end
41
- module_function :platform_specificity_match
42
-
43
- def select_all_platform_match(specs, platform, force_ruby: false, prefer_locked: false)
44
- matching = if force_ruby
45
- specs.select {|spec| spec.match_platform(Gem::Platform::RUBY) && spec.force_ruby_platform! }
46
- else
47
- specs.select {|spec| spec.match_platform(platform) }
48
- end
49
-
50
- if prefer_locked
51
- locked_originally = matching.select {|spec| spec.is_a?(LazySpecification) }
52
- return locked_originally if locked_originally.any?
53
- end
54
-
55
- matching
56
- end
57
- module_function :select_all_platform_match
58
-
59
- def select_best_platform_match(specs, platform, force_ruby: false, prefer_locked: false)
60
- matching = select_all_platform_match(specs, platform, force_ruby: force_ruby, prefer_locked: prefer_locked)
61
-
62
- sort_and_filter_best_platform_match(matching, platform)
63
- end
64
- module_function :select_best_platform_match
65
-
66
- def select_best_local_platform_match(specs, force_ruby: false)
67
- matching = select_all_platform_match(specs, local_platform, force_ruby: force_ruby).filter_map(&:materialized_for_installation)
68
-
69
- sort_best_platform_match(matching, local_platform)
70
- end
71
- module_function :select_best_local_platform_match
72
-
73
- def sort_and_filter_best_platform_match(matching, platform)
74
- return matching if matching.one?
75
-
76
- exact = matching.select {|spec| spec.platform == platform }
77
- return exact if exact.any?
78
-
79
- sorted_matching = sort_best_platform_match(matching, platform)
80
- exemplary_spec = sorted_matching.first
81
-
82
- sorted_matching.take_while {|spec| same_specificity(platform, spec, exemplary_spec) && same_deps(spec, exemplary_spec) }
83
- end
84
- module_function :sort_and_filter_best_platform_match
85
-
86
- def sort_best_platform_match(matching, platform)
87
- matching.sort_by {|spec| platform_specificity_match(spec.platform, platform) }
88
- end
89
- module_function :sort_best_platform_match
90
-
91
- class PlatformMatch
92
- def self.specificity_score(spec_platform, user_platform)
93
- return -1 if spec_platform == user_platform
94
- return 1_000_000 if spec_platform.nil? || spec_platform == Gem::Platform::RUBY || user_platform == Gem::Platform::RUBY
95
-
96
- os_match(spec_platform, user_platform) +
97
- cpu_match(spec_platform, user_platform) * 10 +
98
- platform_version_match(spec_platform, user_platform) * 100
99
- end
100
-
101
- def self.os_match(spec_platform, user_platform)
102
- if spec_platform.os == user_platform.os
103
- 0
104
- else
105
- 1
106
- end
107
- end
108
-
109
- def self.cpu_match(spec_platform, user_platform)
110
- if spec_platform.cpu == user_platform.cpu
111
- 0
112
- elsif spec_platform.cpu == "arm" && user_platform.cpu.to_s.start_with?("arm")
113
- 0
114
- elsif spec_platform.cpu.nil? || spec_platform.cpu == "universal"
115
- 1
116
- else
117
- 2
118
- end
119
- end
120
-
121
- def self.platform_version_match(spec_platform, user_platform)
122
- if spec_platform.version == user_platform.version
123
- 0
124
- elsif spec_platform.version.nil?
125
- 1
126
- else
127
- 2
128
- end
129
- end
130
- end
131
-
132
- def same_specificity(platform, spec, exemplary_spec)
133
- platform_specificity_match(spec.platform, platform) == platform_specificity_match(exemplary_spec.platform, platform)
134
- end
135
- module_function :same_specificity
136
-
137
- def same_deps(spec, exemplary_spec)
138
- same_runtime_deps = spec.dependencies.sort == exemplary_spec.dependencies.sort
139
- same_metadata_deps = spec.required_ruby_version == exemplary_spec.required_ruby_version && spec.required_rubygems_version == exemplary_spec.required_rubygems_version
140
- same_runtime_deps && same_metadata_deps
141
- end
142
- module_function :same_deps
143
- end
144
- end
@@ -1,109 +0,0 @@
1
- #!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG["ruby_install_name"] %>
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application '<%= executable %>' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "rubygems"
12
-
13
- m = Module.new do
14
- module_function
15
-
16
- def invoked_as_script?
17
- File.expand_path($0) == File.expand_path(__FILE__)
18
- end
19
-
20
- def env_var_version
21
- ENV["BUNDLER_VERSION"]
22
- end
23
-
24
- def cli_arg_version
25
- return unless invoked_as_script? # don't want to hijack other binstubs
26
- return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
- bundler_version = nil
28
- update_index = nil
29
- ARGV.each_with_index do |a, i|
30
- if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
31
- bundler_version = a
32
- end
33
- next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1
35
- update_index = i
36
- end
37
- bundler_version
38
- end
39
-
40
- def gemfile
41
- gemfile = ENV["BUNDLE_GEMFILE"]
42
- return gemfile if gemfile && !gemfile.empty?
43
-
44
- File.expand_path("<%= relative_gemfile_path %>", __dir__)
45
- end
46
-
47
- def lockfile
48
- lockfile =
49
- case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
51
- else "#{gemfile}.lock"
52
- end
53
- File.expand_path(lockfile)
54
- end
55
-
56
- def lockfile_version
57
- return unless File.file?(lockfile)
58
- lockfile_contents = File.read(lockfile)
59
- return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
- Regexp.last_match(1)
61
- end
62
-
63
- def bundler_requirement
64
- @bundler_requirement ||=
65
- env_var_version ||
66
- cli_arg_version ||
67
- bundler_requirement_for(lockfile_version)
68
- end
69
-
70
- def bundler_requirement_for(version)
71
- return "#{Gem::Requirement.default}.a" unless version
72
-
73
- bundler_gem_version = Gem::Version.new(version)
74
-
75
- bundler_gem_version.approximate_recommendation
76
- end
77
-
78
- def load_bundler!
79
- ENV["BUNDLE_GEMFILE"] ||= gemfile
80
-
81
- activate_bundler
82
- end
83
-
84
- def activate_bundler
85
- gem_error = activation_error_handling do
86
- gem "bundler", bundler_requirement
87
- end
88
- return if gem_error.nil?
89
- require_error = activation_error_handling do
90
- require "bundler/version"
91
- end
92
- return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
93
- warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
94
- exit 42
95
- end
96
-
97
- def activation_error_handling
98
- yield
99
- nil
100
- rescue StandardError, LoadError => e
101
- e
102
- end
103
- end
104
-
105
- m.load_bundler!
106
-
107
- if m.invoked_as_script?
108
- load Gem.bin_path("<%= spec.name %>", "<%= executable %>")
109
- end
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- autoload :Shellwords, "shellwords"
@@ -1,21 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
3
- A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
4
- b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
5
- MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
6
- YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
7
- aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
8
- jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
9
- xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
10
- 1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
11
- snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
12
- U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
13
- 9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
14
- BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B
15
- AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz
16
- yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE
17
- 38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP
18
- AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
19
- DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
20
- HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
21
- -----END CERTIFICATE-----
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented
@@ -1 +0,0 @@
1
- # Vendored files do not need to be documented