rubygems-update 3.2.34 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -4
  3. data/CONTRIBUTING.md +40 -10
  4. data/Manifest.txt +6 -5
  5. data/POLICIES.md +22 -8
  6. data/README.md +9 -7
  7. data/UPGRADING.md +5 -81
  8. data/bin/gem +1 -6
  9. data/bundler/CHANGELOG.md +27 -0
  10. data/bundler/exe/bundle +7 -8
  11. data/bundler/lib/bundler/build_metadata.rb +2 -2
  12. data/bundler/lib/bundler/cli/gem.rb +1 -1
  13. data/bundler/lib/bundler/cli/install.rb +2 -0
  14. data/bundler/lib/bundler/cli.rb +5 -0
  15. data/bundler/lib/bundler/definition.rb +14 -2
  16. data/bundler/lib/bundler/dependency.rb +5 -7
  17. data/bundler/lib/bundler/dsl.rb +0 -27
  18. data/bundler/lib/bundler/endpoint_specification.rb +0 -8
  19. data/bundler/lib/bundler/fetcher/compact_index.rb +9 -4
  20. data/bundler/lib/bundler/fetcher.rb +2 -5
  21. data/bundler/lib/bundler/injector.rb +10 -1
  22. data/bundler/lib/bundler/installer/gem_installer.rb +1 -6
  23. data/bundler/lib/bundler/installer.rb +1 -4
  24. data/bundler/lib/bundler/lockfile_parser.rb +10 -13
  25. data/bundler/lib/bundler/man/bundle-add.1 +9 -1
  26. data/bundler/lib/bundler/man/bundle-add.1.ronn +7 -1
  27. data/bundler/lib/bundler/man/bundle-config.1 +2 -2
  28. data/bundler/lib/bundler/man/bundle-config.1.ronn +3 -3
  29. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-install.1.ronn +2 -2
  31. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-update.1.ronn +2 -1
  33. data/bundler/lib/bundler/man/gemfile.5 +1 -1
  34. data/bundler/lib/bundler/man/gemfile.5.ronn +1 -1
  35. data/bundler/lib/bundler/plugin/installer.rb +1 -1
  36. data/bundler/lib/bundler/process_lock.rb +1 -1
  37. data/bundler/lib/bundler/psyched_yaml.rb +1 -13
  38. data/bundler/lib/bundler/resolver.rb +34 -29
  39. data/bundler/lib/bundler/rubygems_ext.rb +2 -0
  40. data/bundler/lib/bundler/rubygems_integration.rb +11 -48
  41. data/bundler/lib/bundler/self_manager.rb +73 -0
  42. data/bundler/lib/bundler/shared_helpers.rb +2 -9
  43. data/bundler/lib/bundler/source/metadata.rb +1 -1
  44. data/bundler/lib/bundler/templates/Executable.bundler +1 -1
  45. data/bundler/lib/bundler/templates/Gemfile +0 -2
  46. data/bundler/lib/bundler/templates/gems.rb +0 -3
  47. data/bundler/lib/bundler/templates/newgem/Rakefile.tt +10 -1
  48. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  49. data/bundler/lib/bundler/templates/newgem/test/minitest/{newgem_test.rb.tt → test_newgem.rb.tt} +1 -1
  50. data/bundler/lib/bundler/ui/shell.rb +1 -1
  51. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +6 -6
  52. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +2 -1
  53. data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +2 -6
  54. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +0 -6
  55. data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +4 -9
  56. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +1 -19
  57. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +4 -22
  58. data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
  59. data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
  60. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  61. data/bundler/lib/bundler/vendor/uri/lib/uri/common.rb +17 -80
  62. data/bundler/lib/bundler/vendor/uri/lib/uri/ftp.rb +0 -1
  63. data/bundler/lib/bundler/vendor/uri/lib/uri/generic.rb +5 -6
  64. data/bundler/lib/bundler/vendor/uri/lib/uri/http.rb +0 -1
  65. data/bundler/lib/bundler/vendor/uri/lib/uri/https.rb +0 -1
  66. data/bundler/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
  67. data/bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb +0 -1
  68. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +1 -14
  69. data/bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +1 -12
  70. data/bundler/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
  71. data/bundler/lib/bundler/vendor/uri/lib/uri/ws.rb +84 -0
  72. data/bundler/lib/bundler/vendor/uri/lib/uri/wss.rb +22 -0
  73. data/bundler/lib/bundler/vendor/uri/lib/uri.rb +0 -1
  74. data/bundler/lib/bundler/version.rb +1 -1
  75. data/bundler/lib/bundler.rb +9 -3
  76. data/hide_lib_for_update/note.txt +0 -4
  77. data/lib/rubygems/command_manager.rb +1 -1
  78. data/lib/rubygems/commands/install_command.rb +5 -2
  79. data/lib/rubygems/commands/server_command.rb +14 -77
  80. data/lib/rubygems/commands/setup_command.rb +4 -16
  81. data/lib/rubygems/commands/update_command.rb +9 -4
  82. data/lib/rubygems/defaults.rb +2 -20
  83. data/lib/rubygems/deprecate.rb +55 -8
  84. data/lib/rubygems/exceptions.rb +26 -1
  85. data/lib/rubygems/ext/builder.rb +5 -3
  86. data/lib/rubygems/install_update_options.rb +11 -2
  87. data/lib/rubygems/installer.rb +11 -1
  88. data/lib/rubygems/name_tuple.rb +2 -3
  89. data/lib/rubygems/path_support.rb +1 -6
  90. data/lib/rubygems/platform.rb +4 -0
  91. data/lib/rubygems/remote_fetcher.rb +1 -1
  92. data/lib/rubygems/resolver/installer_set.rb +1 -1
  93. data/lib/rubygems/security.rb +4 -3
  94. data/lib/rubygems/source.rb +3 -1
  95. data/lib/rubygems/spec_fetcher.rb +1 -1
  96. data/lib/rubygems/specification.rb +9 -13
  97. data/lib/rubygems/text.rb +21 -20
  98. data/lib/rubygems/uninstaller.rb +4 -1
  99. data/lib/rubygems/unknown_command_spell_checker.rb +21 -0
  100. data/lib/rubygems/version.rb +2 -0
  101. data/lib/rubygems.rb +3 -3
  102. data/rubygems-update.gemspec +1 -1
  103. data/setup.rb +1 -6
  104. data/test/rubygems/helper.rb +20 -6
  105. data/test/rubygems/test_config.rb +2 -2
  106. data/test/rubygems/test_exit.rb +11 -0
  107. data/test/rubygems/test_gem.rb +46 -41
  108. data/test/rubygems/test_gem_command_manager.rb +16 -27
  109. data/test/rubygems/test_gem_commands_open_command.rb +1 -1
  110. data/test/rubygems/test_gem_commands_server_command.rb +4 -46
  111. data/test/rubygems/test_gem_commands_update_command.rb +2 -2
  112. data/test/rubygems/test_gem_path_support.rb +2 -6
  113. data/test/rubygems/test_gem_remote_fetcher.rb +15 -0
  114. data/test/rubygems/test_gem_requirement.rb +0 -1
  115. data/test/rubygems/test_gem_security.rb +1 -1
  116. data/test/rubygems/test_gem_source_git.rb +0 -5
  117. data/test/rubygems/test_gem_specification.rb +16 -25
  118. data/test/rubygems/test_gem_text.rb +6 -0
  119. data/test/rubygems/test_project_sanity.rb +1 -1
  120. data/test/rubygems/test_require.rb +0 -7
  121. metadata +9 -8
  122. data/bundler/lib/bundler/gemdeps.rb +0 -29
  123. data/lib/rubygems/server.rb +0 -882
  124. data/test/rubygems/bogussources.rb +0 -9
  125. data/test/rubygems/test_gem_server.rb +0 -608
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8c702a4165527b22d31e1cb41e0e5bc94e75428b2a69a48f5e4565df627e885
4
- data.tar.gz: 2dd36e7a22f82691fe39d1384d37270843bf6705b929e92e8d6d501af21db430
3
+ metadata.gz: 54e94fde92dd221d68a39c5ec1116f860999c9ea55f744ff77b02e84fca6f580
4
+ data.tar.gz: 79682c276c94ea4e5a51d44f62f24ba38af3c41b6fda47a7ff58352143f517c0
5
5
  SHA512:
6
- metadata.gz: f77785a6aac66c4e68e2f73b794c0d642cf8a962192ece73fd6e208c79ec1c29a6e824cb065c40f25b97c06aa5feb827efe8ce4419d2d103843758ae7514b378
7
- data.tar.gz: b90468d920c7f6ea3217858d74ebfa2fe7e162f7408cb61987284e381f4d91d6e258d574c7f8cbc70a429b872521c50f26a92db48a3dee5394a70534acddb848
6
+ metadata.gz: 72363f1d7b5ba733226562c433807f0ed13543e598adc030f274db516cacac54d7e748907db269a0fd1b8ada7a567986ddfe8db25a848a4edad8203301bcf02c
7
+ data.tar.gz: 3c5c777ac829d9af2533e7717a4a3814266d8fc0b9c2f634a2e4173fc1763a0d80c15ffa02ec5c0ffb1ce9edc893f4121a3f9cf6731d3919532a006536e2b52b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,44 @@
1
+ # 3.3.0 / 2021-12-21
2
+
3
+ ## Breaking changes:
4
+
5
+ * Removed deprecated `gem server` command. Pull request #5034 by hsbt
6
+ * Remove MacOS specific gem layout. Pull request #4833 by deivid-rodriguez
7
+ * Default `gem update` documentation format is now only `ri`. Pull request
8
+ #3888 by hsbt
9
+
10
+ ## Features:
11
+
12
+ * Give command misspelled suggestions via `did_you_mean` gem. Pull request
13
+ #3904 by hsbt
14
+
15
+ ## Performance:
16
+
17
+ * Avoid some unnecessary stat calls. Pull request #3887 by kares
18
+ * Improve spell checking suggestion performance by
19
+ vendoring`DidYouMean::Levenshtein.distance` from `did_you_mean-1.4.0`.
20
+ Pull request #3856 by austinpray
21
+
22
+ ## Enhancements:
23
+
24
+ * Set `BUNDLER_VERSION` when `bundle _<version>_` is passed. Pull request
25
+ #5180 by deivid-rodriguez
26
+ * Don't require `rdoc` for `gem uninstall`. Pull request #4691 by ndren
27
+ * More focused rescue on extension builder exception to get more
28
+ information on errors. Pull request #4189 by deivid-rodriguez
29
+ * Installs bundler 2.3.0 as a default gem.
30
+
31
+ ## Bug fixes:
32
+
33
+ * Fix encoding mismatch issues when writing gem packages. Pull request
34
+ #5162 by deivid-rodriguez
35
+ * Fix broken brew formula due to loading `operating_system.rb`
36
+ customizations too late. Pull request #5154 by deivid-rodriguez
37
+ * Properly fetch `Gem#latest_spec_for` with multiple sources. Pull request
38
+ #2764 by kevlogan90
39
+ * Fix upgrade crashing when multiple versions of `fileutils` installed.
40
+ Pull request #5140 by deivid-rodriguez
41
+
1
42
  # 3.2.33 / 2021-12-07
2
43
 
3
44
  ## Deprecations:
@@ -4601,7 +4642,7 @@ Lavena and Daniel Berger for continuing windows support.
4601
4642
  * Tar handling code refactoring and cleanup.
4602
4643
  * Gem::DependencyInstaller's API has changed.
4603
4644
 
4604
- For a full list of changes to RubyGems, see the ChangeLog file.
4645
+ For a full list of changes to RubyGems, see the git log.
4605
4646
 
4606
4647
  # 1.0.1 / 2007-12-20
4607
4648
 
@@ -4745,7 +4786,7 @@ have permanently enabled the work around on all versions.
4745
4786
 
4746
4787
  # 0.9.1 / 2007-01-16
4747
4788
 
4748
- See ChangeLog
4789
+ See git log
4749
4790
 
4750
4791
  # 0.9.0 / 2006-06-28
4751
4792
 
@@ -4993,11 +5034,11 @@ There has been some minor usability enhancements and changes ...
4993
5034
 
4994
5035
  # 0.7.0 / 2004-07-09
4995
5036
 
4996
- See ChangeLog
5037
+ See git log
4997
5038
 
4998
5039
  # 0.6.1 / 2004-06-08
4999
5040
 
5000
- See ChangeLog
5041
+ See git log
5001
5042
 
5002
5043
  # 0.6.0 / 2004-06-08
5003
5044
 
data/CONTRIBUTING.md CHANGED
@@ -13,7 +13,6 @@ contributors to follow to reduce the time it takes to get changes merged in.
13
13
  * Match indentation (two spaces)
14
14
  * Match coding style (run `rake rubocop`)
15
15
 
16
-
17
16
  3. If any new files are added or existing files removed in a commit or PR,
18
17
  please update the `Manifest.txt` accordingly. This can be done by running
19
18
  `rake update_manifest`
@@ -30,20 +29,51 @@ here: https://guides.rubygems.org/contributing/
30
29
 
31
30
  ## Getting Started
32
31
 
33
- $ rake setup
34
- $ rake test
32
+ rake setup
35
33
 
36
- > Optional you can configure git hooks with: rake git_hooks
34
+ > Optionally you can configure git hooks with: rake git_hooks
37
35
 
38
36
  To run commands like `gem install` from the repo:
39
37
 
40
- $ ruby -Ilib bin/gem install
38
+ ruby -Ilib bin/gem install
39
+
40
+ To run commands like `bundle install` from the repo:
41
+
42
+ ruby bundler/spec/support/bundle.rb install
43
+
44
+ ### Running Tests
45
+
46
+ To run the entire test suite you can use:
47
+
48
+ rake test
49
+
50
+ To run an individual test file located for example in `test/rubygems/test_deprecate.rb` you can use:
51
+
52
+ ruby -Ilib:test:bundler/lib test/rubygems/test_deprecate.rb
53
+
54
+ And to run an individual test method named `test_default` within a test file, you can use:
55
+
56
+ ruby -Ilib:test:bundler/lib test/rubygems/test_deprecate.rb -n /test_default/
57
+
58
+ ### Running bundler tests
59
+
60
+ Everything needs to be run from the `bundler/` subfolder.
61
+
62
+ To setup bundler tests:
63
+
64
+ bin/rake spec:parallel_deps
65
+
66
+ To run the entire bundler test suite in parallel (it takes a while):
67
+
68
+ bin/parallel_rspec
69
+
70
+ To run the entire bundler test suite sequentially (get a coffee because it's very slow):
71
+
72
+ bin/rspec
41
73
 
42
- To run bundler test:
74
+ To run an individual test file location for example in `spec/install/gems/standalone_spec.rb` you can use:
43
75
 
44
- $ cd bundler
45
- $ bin/rake spec:deps
46
- $ bin/rspec spec
76
+ bin/rspec spec/install/gems/standalone_spec.rb
47
77
 
48
78
  ## Issues
49
79
 
@@ -108,7 +138,7 @@ where it is in the process from being submitted to being closed. These are
108
138
  listed in rough progression order from submitted to closed.
109
139
 
110
140
  * **triage** - This is an issue or pull request that needs to be properly
111
- labeled by by a maintainer.
141
+ labeled by a maintainer.
112
142
  * **confirmed** - This issue/pull request has been accepted as valid, but is
113
143
  not yet immediately ready for work.
114
144
  * **ready** - An issue that is available for collaboration. This issue
data/Manifest.txt CHANGED
@@ -78,7 +78,6 @@ bundler/lib/bundler/gem_helper.rb
78
78
  bundler/lib/bundler/gem_helpers.rb
79
79
  bundler/lib/bundler/gem_tasks.rb
80
80
  bundler/lib/bundler/gem_version_promoter.rb
81
- bundler/lib/bundler/gemdeps.rb
82
81
  bundler/lib/bundler/graph.rb
83
82
  bundler/lib/bundler/index.rb
84
83
  bundler/lib/bundler/injector.rb
@@ -166,6 +165,7 @@ bundler/lib/bundler/rubygems_ext.rb
166
165
  bundler/lib/bundler/rubygems_gem_installer.rb
167
166
  bundler/lib/bundler/rubygems_integration.rb
168
167
  bundler/lib/bundler/runtime.rb
168
+ bundler/lib/bundler/self_manager.rb
169
169
  bundler/lib/bundler/settings.rb
170
170
  bundler/lib/bundler/settings/validator.rb
171
171
  bundler/lib/bundler/setup.rb
@@ -216,8 +216,8 @@ bundler/lib/bundler/templates/newgem/sig/newgem.rbs.tt
216
216
  bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
217
217
  bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt
218
218
  bundler/lib/bundler/templates/newgem/standard.yml.tt
219
- bundler/lib/bundler/templates/newgem/test/minitest/newgem_test.rb.tt
220
219
  bundler/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt
220
+ bundler/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt
221
221
  bundler/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt
222
222
  bundler/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt
223
223
  bundler/lib/bundler/templates/newgem/travis.yml.tt
@@ -309,6 +309,8 @@ bundler/lib/bundler/vendor/uri/lib/uri/mailto.rb
309
309
  bundler/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
310
310
  bundler/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
311
311
  bundler/lib/bundler/vendor/uri/lib/uri/version.rb
312
+ bundler/lib/bundler/vendor/uri/lib/uri/ws.rb
313
+ bundler/lib/bundler/vendor/uri/lib/uri/wss.rb
312
314
  bundler/lib/bundler/vendored_fileutils.rb
313
315
  bundler/lib/bundler/vendored_molinillo.rb
314
316
  bundler/lib/bundler/vendored_persistent.rb
@@ -493,7 +495,6 @@ lib/rubygems/security/policy.rb
493
495
  lib/rubygems/security/signer.rb
494
496
  lib/rubygems/security/trust_dir.rb
495
497
  lib/rubygems/security_option.rb
496
- lib/rubygems/server.rb
497
498
  lib/rubygems/source.rb
498
499
  lib/rubygems/source/git.rb
499
500
  lib/rubygems/source/installed.rb
@@ -515,6 +516,7 @@ lib/rubygems/tsort/.document
515
516
  lib/rubygems/tsort/LICENSE.txt
516
517
  lib/rubygems/tsort/lib/tsort.rb
517
518
  lib/rubygems/uninstaller.rb
519
+ lib/rubygems/unknown_command_spell_checker.rb
518
520
  lib/rubygems/uri.rb
519
521
  lib/rubygems/uri_formatter.rb
520
522
  lib/rubygems/user_interaction.rb
@@ -530,7 +532,6 @@ test/rubygems/alternate_cert.pem
530
532
  test/rubygems/alternate_cert_32.pem
531
533
  test/rubygems/alternate_key.pem
532
534
  test/rubygems/bad_rake.rb
533
- test/rubygems/bogussources.rb
534
535
  test/rubygems/ca_cert.pem
535
536
  test/rubygems/child_cert.pem
536
537
  test/rubygems/child_cert_32.pem
@@ -587,6 +588,7 @@ test/rubygems/ssl_key.pem
587
588
  test/rubygems/test_bundled_ca.rb
588
589
  test/rubygems/test_config.rb
589
590
  test/rubygems/test_deprecate.rb
591
+ test/rubygems/test_exit.rb
590
592
  test/rubygems/test_gem.rb
591
593
  test/rubygems/test_gem_available_set.rb
592
594
  test/rubygems/test_gem_bundler_version_finder.rb
@@ -689,7 +691,6 @@ test/rubygems/test_gem_security.rb
689
691
  test/rubygems/test_gem_security_policy.rb
690
692
  test/rubygems/test_gem_security_signer.rb
691
693
  test/rubygems/test_gem_security_trust_dir.rb
692
- test/rubygems/test_gem_server.rb
693
694
  test/rubygems/test_gem_silent_ui.rb
694
695
  test/rubygems/test_gem_source.rb
695
696
  test/rubygems/test_gem_source_fetch_problem.rb
data/POLICIES.md CHANGED
@@ -45,7 +45,7 @@ at version 2.7, so when RubyGems 2.8 is released, it will only support Ruby
45
45
  Releases of new versions should follow these steps, to ensure the process is
46
46
  smooth and no needed steps are missed.
47
47
 
48
- ### Steps for security releases
48
+ ### Recommendations for security releases
49
49
 
50
50
  * Obtain CVE numbers as needed from HackerOne or Red Hat.
51
51
  * Agree on a release date with ruby-core, so patches can be backported to
@@ -55,16 +55,30 @@ smooth and no needed steps are missed.
55
55
  * Continue with the regular release process below.
56
56
 
57
57
 
58
- ### Steps for all releases
58
+ ### Steps for patch releases
59
59
 
60
60
  * Confirm all PRs that you want backported are properly tagged with `rubygems:
61
- <type>` labels at GitHub.
62
- * Run `rake prepare_stable_branch[<target_version>]`, create a PR and merge it
61
+ <type>` or `bundler: <type>` labels at GitHub.
62
+ * Run `rake prepare_release[<target_version>]`, create a PR and merge it
63
63
  to the stable branch once CI passes.
64
- * Create and push git tag
65
- * Create and push `rubygems-update` gem and tgz
66
- * Publish blog post
67
-
64
+ * Switch to the stable branch and pull the PR just merged.
65
+ * Release `bundler` with `(cd bundler && bin/rake release)`.
66
+ * Release `rubygems` with `rake release`.
67
+
68
+ ### Steps for minor and major releases
69
+
70
+ * Confirm all PRs that you want listed in changelogs are properly tagged with
71
+ `rubygems: <type>` or `bundler: <type>` labels at GitHub.
72
+ * Run `rake prepare_release[<target_version>]`.
73
+ * Add the new stable branch `x.y` where `x.y` are the first two components of
74
+ the rubygems version being released to the CI workflows as an extra commit
75
+ on top of what the `prepare_release` task generated.
76
+ * Create a PR to the main branch, and merge it once CI passes.
77
+ * From the main branch, cut a new stable branch with `git pull && git checkout
78
+ -b x.y`.
79
+ * Push the stable branch and wait for CI to be green.
80
+ * Release `bundler` with `(cd bundler && bin/rake release)`.
81
+ * Release `rubygems` with `rake release`.
68
82
 
69
83
  ## Committer Access
70
84
 
data/README.md CHANGED
@@ -33,9 +33,15 @@ For more information about how to use RubyGems, see our RubyGems basics guide at
33
33
 
34
34
  ## Installation
35
35
 
36
- RubyGems is likely already installed in your Ruby environment, you can check by running `gem --version` in your terminal emulator.
37
- In some cases your OS's package manager may install RubyGems as a separate package from Ruby. It's recommended to check
38
- with your OS's package manager before installing RubyGems manually.
36
+ RubyGems is already installed in your Ruby environment, you can check the version you have installed by running `gem --version` in your terminal emulator.
37
+
38
+ In some cases Ruby & RubyGems may be provided as OS packages. This is not a
39
+ recommended way to use Ruby & RubyGems. It's better to use a Ruby Version
40
+ Manager, such as [rbenv](https://github.com/rbenv/rbenv) or
41
+ [chruby](https://github.com/postmodern/chruby). If you still want to use the
42
+ version provided by your OS package manager, please also use your OS package
43
+ manager to upgrade rubygems, and disregard any other installation instructions
44
+ given below.
39
45
 
40
46
  If you would like to manually install RubyGems:
41
47
 
@@ -46,8 +52,6 @@ Install RubyGems by running:
46
52
 
47
53
  $ ruby setup.rb
48
54
 
49
- Note: You may need to run the install script with admin/root privileges.
50
-
51
55
  For more details and other options, see:
52
56
 
53
57
  $ ruby setup.rb --help
@@ -58,8 +62,6 @@ To upgrade to the latest RubyGems, run:
58
62
 
59
63
  $ gem update --system
60
64
 
61
- Note: You might need to run the command as an administrator or root user.
62
-
63
65
  See [UPGRADING](UPGRADING.md) for more details and alternative instructions.
64
66
 
65
67
  ## Documentation
data/UPGRADING.md CHANGED
@@ -1,91 +1,15 @@
1
1
  # How to upgrade/downgrade Rubygems:
2
2
 
3
- ## For RubyGems 1.5.0 and 1.5.1:
4
-
5
- RubyGems 1.5.0 and 1.5.1 shipped with a broken `gem update --system`. You will
6
- need to use the Manual Upgrade Recipe below.
7
-
8
- ## On Ruby 1.9.x:
9
-
10
- ### From stock ruby shipping with 1.9:
11
-
12
- Use the Normal Upgrade Method below. (finally!)
13
-
14
- ## On Ruby 1.8.x:
15
-
16
- ### From rubygems 1.3.x:
17
-
18
- Use the Normal Upgrade Recipe below.
19
-
20
- ### From rubygems 1-1.x through 1.2.x:
21
-
22
- RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update
23
- installed. You will need to use the following instructions if you see "Nothing
24
- to update".
25
-
26
- Use the Manual Upgrade Recipe below.
27
-
28
- ### From rubygems < 1.1.x:
29
-
30
- Use the Normal Upgrade Recipe below.
31
-
32
3
  ## Downgrade Recipe
33
4
 
34
- ### Normal Downgrade
35
-
36
- #### With rubygems 1.5.2 and higher:
37
-
38
- $ gem update --system 1.3.7
39
-
40
- #### With rubygems 1.5.1 and lower:
5
+ $ gem update --system 3.1.4
41
6
 
42
- Use sudo/su as appropriate:
43
-
44
- $ gem install rubygems-update -v 1.3.7
45
- $ update_rubygems _1.3.7_
46
-
47
- Replace 1.3.7 with whatever version you want to downgrade to. This recipe can
48
- also be used to upgrade to a specific version instead of the latest.
49
-
50
- Do make sure that you don't have any other versions of rubygems-update
51
- installed when you run the second command.
52
-
53
- ### 1.9.2 Downgrade from Rubygems 1.4.x+ to stock 1.9 rubygems:
54
-
55
- Use sudo/su as appropriate:
56
-
57
- $ ruby --disable-gems -S gem which rubygems
58
- ~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb
59
- $ rm ~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb
60
- $ rm -rf ~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems
61
- $ gem -v
62
- 1.3.7
63
-
64
- ## Upgrade Recipes
65
-
66
- ### Normal Upgrade
67
-
68
- Use sudo/su as appropriate:
7
+ ## Upgrade Recipe
69
8
 
70
9
  $ gem update --system
71
10
 
72
- ### Manual Upgrade
73
-
74
- If you have an older version of RubyGems installed, then you can still do it
75
- in two steps:
76
-
77
- Use sudo/su as appropriate:
78
-
79
- $ gem install rubygems-update
80
- $ update_rubygems
81
-
82
- ### Manual Install
83
-
84
- If you don't have any RubyGems install, there is still the pre-gem approach to
85
- getting software, doing it manually:
86
-
87
- Use sudo/su as appropriate:
11
+ ## Install from source
88
12
 
89
13
  * Download from: https://rubygems.org/pages/download
90
- * Unpack into a directory and cd there
91
- * Install with: ruby setup.rb
14
+ * Unpack into a directory and `cd` there
15
+ * Install with: `ruby setup.rb`
data/bin/gem CHANGED
@@ -7,12 +7,7 @@
7
7
 
8
8
  require 'rubygems'
9
9
  require 'rubygems/gem_runner'
10
- require 'rubygems/exceptions'
11
10
 
12
11
  args = ARGV.clone
13
12
 
14
- begin
15
- Gem::GemRunner.new.run args
16
- rescue Gem::SystemExitException => e
17
- exit e.exit_code
18
- end
13
+ Gem::GemRunner.new.run args
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ # 2.3.0 (December 21, 2021)
2
+
3
+ ## Features:
4
+
5
+ - Change `bundle install` with a lockfile to respect the `BUNDLED WITH` bundler version [#4076](https://github.com/rubygems/rubygems/pull/4076)
6
+
7
+ ## Enhancements:
8
+
9
+ - Print warning when running Bundler on potentially problematic RubyGems & Ruby combinations [#5177](https://github.com/rubygems/rubygems/pull/5177)
10
+ - Error tracing should be printed to stderr [#5179](https://github.com/rubygems/rubygems/pull/5179)
11
+ - Add `github` and `ref` options to `bundle add` [#5159](https://github.com/rubygems/rubygems/pull/5159)
12
+ - Add require parameter to `bundle add` [#5021](https://github.com/rubygems/rubygems/pull/5021)
13
+ - Enable parallel installation on Windows by default [#4822](https://github.com/rubygems/rubygems/pull/4822)
14
+ - More logging when compact index is not used and we fallback to other APIs [#4546](https://github.com/rubygems/rubygems/pull/4546)
15
+ - `bundle gem` generated MiniTest file and class now start with 'test' [#3893](https://github.com/rubygems/rubygems/pull/3893)
16
+ - Add `Bundler::Definition.no_lock` accessor for skipping lock file creation/update [#3401](https://github.com/rubygems/rubygems/pull/3401)
17
+
18
+ ## Bug fixes:
19
+
20
+ - Fix crash when when no platform specific matches exist and show a proper error [#5168](https://github.com/rubygems/rubygems/pull/5168)
21
+ - Ignore dependencies not actually locked from frozen check [#5152](https://github.com/rubygems/rubygems/pull/5152)
22
+ - Fix `bundle cache --all-platforms` on Windows [#4552](https://github.com/rubygems/rubygems/pull/4552)
23
+
24
+ ## Documentation:
25
+
26
+ - Fix gemspec template typo [#4545](https://github.com/rubygems/rubygems/pull/4545)
27
+
1
28
  # 2.2.33 (December 7, 2021)
2
29
 
3
30
  ## Security fixes:
data/bundler/exe/bundle CHANGED
@@ -18,14 +18,13 @@ end
18
18
  # Workaround for non-activated bundler spec due to missing https://github.com/rubygems/rubygems/commit/4e306d7bcdee924b8d80ca9db6125aa59ee4e5a3
19
19
  gem "bundler", Bundler::VERSION if Gem.rubygems_version < Gem::Version.new("2.6.2")
20
20
 
21
- # Check if an older version of bundler is installed
22
- $LOAD_PATH.each do |path|
23
- next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
24
- err = String.new
25
- err << "Looks like you have a version of bundler that's older than 0.9.\n"
26
- err << "Please remove your old versions.\n"
27
- err << "An easy way to do this is by running `gem cleanup bundler`."
28
- abort(err)
21
+ if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::Version.new("2.6.a") && !ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"]
22
+ Bundler.ui.warn \
23
+ "Your RubyGems version (#{Gem::VERSION})) has a bug that prevents " \
24
+ "`required_ruby_version` from working for Bundler. Any scripts that use " \
25
+ "`gem install bundler` will break as soon as Bundler drops support for " \
26
+ "your Ruby version. Please upgrade RubyGems to avoid future breakage " \
27
+ "and silence this warning by running `gem update --system 3.2.3`"
29
28
  end
30
29
 
31
30
  if File.exist?(base_path)
@@ -4,8 +4,8 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2023-02-06".freeze
8
- @git_commit_sha = "c07c26df9e".freeze
7
+ @built_at = "2021-12-21".freeze
8
+ @git_commit_sha = "e7167b9a42".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -106,7 +106,7 @@ module Bundler
106
106
  when "minitest"
107
107
  templates.merge!(
108
108
  "test/minitest/test_helper.rb.tt" => "test/test_helper.rb",
109
- "test/minitest/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
109
+ "test/minitest/test_newgem.rb.tt" => "test/test_#{namespaced_path}.rb"
110
110
  )
111
111
  config[:test_task] = :test
112
112
  when "test-unit"
@@ -12,6 +12,8 @@ module Bundler
12
12
 
13
13
  warn_if_root
14
14
 
15
+ Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
16
+
15
17
  Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
16
18
 
17
19
  # Disable color in deployment mode
@@ -61,6 +61,8 @@ module Bundler
61
61
  Bundler.reset_settings_and_root!
62
62
  end
63
63
 
64
+ Bundler.self_manager.restart_with_locked_bundler_if_needed
65
+
64
66
  Bundler.settings.set_command_option_if_given :retry, options[:retry]
65
67
 
66
68
  current_cmd = args.last[:current_command].name
@@ -367,8 +369,11 @@ module Bundler
367
369
  method_option "version", :aliases => "-v", :type => :string
368
370
  method_option "group", :aliases => "-g", :type => :string
369
371
  method_option "source", :aliases => "-s", :type => :string
372
+ method_option "require", :aliases => "-r", :type => :string, :banner => "Adds require path to gem. Provide false, or a path as a string."
370
373
  method_option "git", :type => :string
374
+ method_option "github", :type => :string
371
375
  method_option "branch", :type => :string
376
+ method_option "ref", :type => :string
372
377
  method_option "skip-install", :type => :boolean, :banner =>
373
378
  "Adds gem to the Gemfile but does not install it"
374
379
  method_option "optimistic", :type => :boolean, :banner => "Adds optimistic declaration of version to gem"
@@ -6,6 +6,11 @@ module Bundler
6
6
  class Definition
7
7
  include GemHelpers
8
8
 
9
+ class << self
10
+ # Do not create or modify a lockfile (Makes #lock a noop)
11
+ attr_accessor :no_lock
12
+ end
13
+
9
14
  attr_reader(
10
15
  :dependencies,
11
16
  :locked_deps,
@@ -275,6 +280,8 @@ module Bundler
275
280
  end
276
281
 
277
282
  def lock(file, preserve_unknown_sections = false)
283
+ return if Definition.no_lock
284
+
278
285
  contents = to_lock
279
286
 
280
287
  # Convert to \r\n if the existing lock has them
@@ -287,7 +294,7 @@ module Bundler
287
294
 
288
295
  if updating_major = locked_major < current_major
289
296
  Bundler.ui.warn "Warning: the lockfile is being updated to Bundler #{current_major}, " \
290
- "after which you will be unable to return to Bundler #{@locked_bundler_version.segments.first}."
297
+ "after which you will be unable to return to Bundler #{locked_major}."
291
298
  end
292
299
  end
293
300
 
@@ -372,7 +379,12 @@ module Bundler
372
379
 
373
380
  both_sources = Hash.new {|h, k| h[k] = [] }
374
381
  @dependencies.each {|d| both_sources[d.name][0] = d }
375
- locked_dependencies.each {|d| both_sources[d.name][1] = d }
382
+
383
+ locked_dependencies.each do |d|
384
+ next if !Bundler.feature_flag.bundler_3_mode? && @locked_specs[d.name].empty?
385
+
386
+ both_sources[d.name][1] = d
387
+ end
376
388
 
377
389
  both_sources.each do |name, (dep, lock_dep)|
378
390
  next if dep.nil? || lock_dep.nil?
@@ -7,7 +7,7 @@ require_relative "rubygems_ext"
7
7
  module Bundler
8
8
  class Dependency < Gem::Dependency
9
9
  attr_reader :autorequire
10
- attr_reader :groups, :platforms, :gemfile, :git, :branch
10
+ attr_reader :groups, :platforms, :gemfile, :git, :github, :branch, :ref
11
11
 
12
12
  PLATFORM_MAP = {
13
13
  :ruby => Gem::Platform::RUBY,
@@ -82,7 +82,9 @@ module Bundler
82
82
  @groups = Array(options["group"] || :default).map(&:to_sym)
83
83
  @source = options["source"]
84
84
  @git = options["git"]
85
+ @github = options["github"]
85
86
  @branch = options["branch"]
87
+ @ref = options["ref"]
86
88
  @platforms = Array(options["platforms"])
87
89
  @env = options["env"]
88
90
  @should_include = options.fetch("should_include", true)
@@ -96,15 +98,11 @@ module Bundler
96
98
  def gem_platforms(valid_platforms)
97
99
  return valid_platforms if @platforms.empty?
98
100
 
99
- valid_generic_platforms = valid_platforms.map {|p| [p, GemHelpers.generic(p)] }.to_h
100
- @gem_platforms ||= expanded_platforms.compact.uniq
101
-
102
- filtered_generic_platforms = valid_generic_platforms.values & @gem_platforms
103
- valid_generic_platforms.select {|_, v| filtered_generic_platforms.include?(v) }.keys
101
+ valid_platforms.select {|p| expanded_platforms.include?(GemHelpers.generic(p)) }
104
102
  end
105
103
 
106
104
  def expanded_platforms
107
- @platforms.map {|pl| PLATFORM_MAP[pl] }
105
+ @expanded_platforms ||= @platforms.map {|pl| PLATFORM_MAP[pl] }.compact.uniq
108
106
  end
109
107
 
110
108
  def should_include?