rubygems-update 3.0.0 → 3.0.9

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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/.travis.yml +2 -0
  4. data/CODE_OF_CONDUCT.md +10 -8
  5. data/CONTRIBUTING.md +7 -0
  6. data/History.txt +180 -0
  7. data/Manifest.txt +5 -3
  8. data/README.md +6 -0
  9. data/Rakefile +33 -7
  10. data/bundler/CHANGELOG.md +11 -0
  11. data/bundler/lib/bundler/build_metadata.rb +2 -2
  12. data/bundler/lib/bundler/rubygems_gem_installer.rb +7 -0
  13. data/bundler/lib/bundler/source/metadata.rb +2 -3
  14. data/bundler/lib/bundler/version.rb +1 -1
  15. data/bundler/man/bundle.ronn +3 -0
  16. data/lib/rubygems/command_manager.rb +12 -4
  17. data/lib/rubygems/commands/build_command.rb +28 -13
  18. data/lib/rubygems/commands/owner_command.rb +6 -1
  19. data/lib/rubygems/commands/push_command.rb +2 -0
  20. data/lib/rubygems/commands/setup_command.rb +14 -16
  21. data/lib/rubygems/commands/uninstall_command.rb +16 -6
  22. data/lib/rubygems/commands/which_command.rb +1 -3
  23. data/lib/rubygems/defaults.rb +1 -8
  24. data/lib/rubygems/dependency.rb +1 -1
  25. data/lib/rubygems/dependency_installer.rb +1 -2
  26. data/lib/rubygems/dependency_list.rb +1 -1
  27. data/lib/rubygems/exceptions.rb +0 -4
  28. data/lib/rubygems/gemcutter_utilities.rb +14 -7
  29. data/lib/rubygems/install_update_options.rb +1 -1
  30. data/lib/rubygems/installer.rb +37 -15
  31. data/lib/rubygems/installer_test_case.rb +2 -2
  32. data/lib/rubygems/package/old.rb +1 -1
  33. data/lib/rubygems/package/tar_header.rb +11 -2
  34. data/lib/rubygems/package.rb +12 -2
  35. data/lib/rubygems/rdoc.rb +2 -2
  36. data/lib/rubygems/remote_fetcher.rb +15 -54
  37. data/lib/rubygems/request.rb +1 -1
  38. data/lib/rubygems/request_set/gem_dependency_api.rb +11 -10
  39. data/lib/rubygems/requirement.rb +16 -5
  40. data/lib/rubygems/resolver.rb +4 -1
  41. data/lib/rubygems/s3_uri_signer.rb +183 -0
  42. data/lib/rubygems/security_option.rb +0 -1
  43. data/lib/rubygems/specification.rb +21 -23
  44. data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
  45. data/lib/rubygems/stub_specification.rb +1 -2
  46. data/lib/rubygems/test_case.rb +23 -12
  47. data/lib/rubygems/uninstaller.rb +1 -1
  48. data/lib/rubygems/user_interaction.rb +4 -1
  49. data/lib/rubygems/util.rb +13 -1
  50. data/lib/rubygems.rb +8 -13
  51. data/rubygems-update.gemspec +1 -1
  52. data/test/rubygems/ca_cert.pem +74 -65
  53. data/test/rubygems/client.pem +103 -45
  54. data/test/rubygems/ssl_cert.pem +78 -17
  55. data/test/rubygems/ssl_key.pem +25 -13
  56. data/test/rubygems/test_bundled_ca.rb +8 -5
  57. data/test/rubygems/test_gem.rb +55 -13
  58. data/test/rubygems/test_gem_bundler_version_finder.rb +4 -0
  59. data/test/rubygems/test_gem_command_manager.rb +10 -0
  60. data/test/rubygems/test_gem_commands_build_command.rb +1 -0
  61. data/test/rubygems/test_gem_commands_push_command.rb +15 -0
  62. data/test/rubygems/test_gem_commands_setup_command.rb +11 -7
  63. data/test/rubygems/test_gem_commands_uninstall_command.rb +80 -1
  64. data/test/rubygems/test_gem_ext_cmake_builder.rb +1 -1
  65. data/test/rubygems/test_gem_indexer.rb +15 -8
  66. data/test/rubygems/test_gem_installer.rb +191 -22
  67. data/test/rubygems/test_gem_package.rb +37 -0
  68. data/test/rubygems/test_gem_package_tar_header.rb +41 -0
  69. data/test/rubygems/test_gem_package_tar_writer.rb +3 -0
  70. data/test/rubygems/test_gem_rdoc.rb +1 -135
  71. data/test/rubygems/test_gem_remote_fetcher.rb +133 -14
  72. data/test/rubygems/test_gem_request.rb +4 -4
  73. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +80 -57
  74. data/test/rubygems/test_gem_requirement.rb +6 -0
  75. data/test/rubygems/test_gem_security_policy.rb +1 -1
  76. data/test/rubygems/test_gem_specification.rb +32 -0
  77. data/test/rubygems/test_gem_stream_ui.rb +2 -2
  78. data/test/rubygems/test_gem_text.rb +5 -0
  79. data/test/rubygems/test_gem_uninstaller.rb +21 -2
  80. data/test/rubygems/test_gem_util.rb +25 -0
  81. data/util/ci +6 -1
  82. data/util/cops/deprecations.rb +52 -0
  83. data/util/create_certs.sh +27 -0
  84. data/util/create_encrypted_key.rb +4 -4
  85. data/util/update_bundled_ca_certificates.rb +1 -3
  86. metadata +12 -10
  87. data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
  88. data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
  89. /data/lib/rubygems/ssl_certs/{index.rubygems.org → rubygems.org}/GlobalSignRootCA.pem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ea50377cd0dc10d97b35b8cb30469ec43cee296cdc017ec49ef7b8869128d8c
4
- data.tar.gz: 0e21b6e7dc4bc5fdc11beaa64077b8c3e3f429d3c9b39ecc25354dda2beff52c
3
+ metadata.gz: 0e1fcd26ebdb712316751bc03f488cc9d81bec96aa3e2a05be9744daea7a0c9f
4
+ data.tar.gz: d54a3231c23976e9c5d1fe04ffeb2f0924706c4d5aebfa0f5d367fd8c94a805b
5
5
  SHA512:
6
- metadata.gz: 66d9e042e9559a895006fc702ad47a6cadfd2525c7bdab0635dbb14ee84e426e44f65380c6c3984a0e71aeaf6fa6d962e1d7391949aeacd2a087401080f71b2f
7
- data.tar.gz: 6c803e3b8b719d8df12fda6857654680ecfa6719c35f66559380daaf2c0141ab3f15ea737e285a06389d4d2fe1ae5edc6e5f0c1f22c5c8e7904100df7238ff5f
6
+ metadata.gz: 9603fa015ec2c7a56aa30512366bbb3d16246d12084ae01424b94505b41c71886d3676055d81ecb3bc3b3a4c39fa2e330e00117a457cdeb957cb4e0877d67970
7
+ data.tar.gz: 796d607c5e7b69cd9f7e3886c2d1705e9d4df0ded3bf24f0648c2cd29cf52d9f4a284721abd74a62a2598e7a67b055b8d58c096db574ee6ba271d6adfba5d196
data/.rubocop.yml CHANGED
@@ -3,6 +3,7 @@ AllCops:
3
3
  Exclude:
4
4
  - 'bundler/**/*'
5
5
  - 'lib/rubygems/resolver/molinillo/**/*'
6
+ - 'pkg/**/*'
6
7
  TargetRubyVersion: 2.3
7
8
 
8
9
  Layout/AccessModifierIndentation:
data/.travis.yml CHANGED
@@ -34,5 +34,7 @@ matrix:
34
34
  allow_failures:
35
35
  - rvm: ruby-head
36
36
  env: "TEST_TOOL=rubygems YAML=psych"
37
+ - rvm: 2.3.8
38
+ env: "TEST_TOOL=bundler RGV=master"
37
39
  - rvm: ruby-head
38
40
  env: "TEST_TOOL=bundler RGV=master"
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Contributor Code of Conduct
2
2
 
3
- ### Our Pledge
3
+ ## Our Pledge
4
4
 
5
- In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
6
 
7
- ### Our Standards
7
+ ## Our Standards
8
8
 
9
9
  Examples of behavior that contributes to creating a positive environment include:
10
10
 
@@ -22,22 +22,24 @@ Examples of unacceptable behavior by participants include:
22
22
  * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
23
  * Other conduct which could reasonably be considered inappropriate in a professional setting
24
24
 
25
- ### Our Responsibilities
25
+ ## Our Responsibilities
26
26
 
27
27
  Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
28
 
29
29
  Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
30
 
31
- ### Scope
31
+ ## Scope
32
32
 
33
33
  This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
34
 
35
- ### Enforcement
35
+ ## Enforcement
36
36
 
37
37
  Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the [project team](MAINTAINERS.txt). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
38
 
39
39
  Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
40
 
41
- ### Attribution
41
+ ## Attribution
42
42
 
43
- This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4.
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
44
+
45
+ [homepage]: https://www.contributor-covenant.org
data/CONTRIBUTING.md CHANGED
@@ -37,6 +37,13 @@ To run commands like `gem install` from the repo:
37
37
 
38
38
  $ ruby -Ilib bin/gem install
39
39
 
40
+ To run bundler test:
41
+
42
+ $ cd bundler
43
+ $ git submodule update --init --recursive
44
+ $ bin/rake spec:deps
45
+ $ bin/rspec spec
46
+
40
47
  ## Issues
41
48
 
42
49
  RubyGems uses labels to track all issues and pull requests. In order to
data/History.txt CHANGED
@@ -1,5 +1,185 @@
1
1
  # coding: UTF-8
2
2
 
3
+ === 3.0.9 / 2020-12-09
4
+
5
+ Minor enhancements:
6
+
7
+ * Add GlobalSign Root CA - R3 cert and remove outdated certs. Pull request #4100
8
+ by Aditya Prakash.
9
+
10
+ === 3.0.8 / 2020-02-19
11
+
12
+ Bug fixes:
13
+
14
+ * Gem::Specification#to_ruby needs OpenSSL. Pull request #2937 by
15
+ Nobuyoshi Nakada.
16
+
17
+ === 3.0.7 / 2020-02-18
18
+
19
+ Bug fixes:
20
+
21
+ * Fix underscore version selection for bundler #2908 by David Rodríguez.
22
+ * Add missing wrapper. Pull request #2690 by David Rodríguez.
23
+ * Make Gem::Specification#ruby_code handle OpenSSL::PKey::RSA objects.
24
+ Pull request #2782 by Luis Sagastume.
25
+ * Installer.rb - fix #windows_stub_script. Pull request #2876 by MSP-Greg.
26
+ * Use IAM role to extract security-credentials for EC2 instance. Pull
27
+ request #2894 by Alexander Pakulov.
28
+
29
+ === 3.0.6 / 2019-08-17
30
+
31
+ Bug fixes:
32
+
33
+ * Revert #2813. It broke the compatibility with 3.0.x versions.
34
+
35
+ === 3.0.5 / 2019-08-16
36
+
37
+ Minor enhancements:
38
+
39
+ * Use env var to configure api key on push. Pull request #2559 by Luis
40
+ Sagastume.
41
+ * Unswallow uninstall error. Pull request #2707 by David Rodríguez.
42
+ * Expose windows path normalization utility. Pull request #2767 by David
43
+ Rodríguez.
44
+ * Clean which command. Pull request #2801 by Luis Sagastume.
45
+ * Upgrading S3 source signature to AWS SigV4. Pull request #2807 by
46
+ Alexander Pakulov.
47
+ * Remove missleading comment, no reason to move Gem.host to Gem::Util.
48
+ Pull request #2811 by Luis Sagastume.
49
+ * Drop support for 'gem env packageversion'. Pull request #2813 by Luis
50
+ Sagastume.
51
+ * Take into account just git tracked files in update_manifest rake task.
52
+ Pull request #2816 by Luis Sagastume.
53
+ * Remove TODO comment, there's no Gem::Dirs constant. Pull request #2819
54
+ by Luis Sagastume.
55
+ * Remove unused 'raise' from test_case. Pull request #2820 by Luis
56
+ Sagastume.
57
+ * Move TODO comment to an information comment. Pull request #2821 by Luis
58
+ Sagastume.
59
+ * Use File#open instead of Kernel#open in stub_specification.rb. Pull
60
+ request #2834 by Luis Sagastume.
61
+ * Make error code a gemcutter_utilities a constant. Pull request #2844 by
62
+ Luis Sagastume.
63
+ * Remove FIXME comment related to PathSupport. Pull request #2854 by Luis
64
+ Sagastume.
65
+ * Use gsub with Hash. Pull request #2860 by Kazuhiro NISHIYAMA.
66
+ * Use the standard RUBY_ENGINE_VERSION instead of JRUBY_VERSION. Pull
67
+ request #2864 by Benoit Daloze.
68
+ * Do not mutate uri.query during s3 signature creation. Pull request #2874
69
+ by Alexander Pakulov.
70
+ * Fixup #2844. Pull request #2878 by SHIBATA Hiroshi.
71
+
72
+ Bug fixes:
73
+
74
+ * Fix intermittent test error on Appveyor & Travis. Pull request #2568 by
75
+ MSP-Greg.
76
+ * Extend timeout on assert_self_install_permissions. Pull request #2605 by
77
+ SHIBATA Hiroshi.
78
+ * Better folder assertions. Pull request #2644 by David Rodríguez.
79
+ * Fix default gem executable installation when folder is not `bin/`. Pull
80
+ request #2649 by David Rodríguez.
81
+ * Fix gem uninstall behavior. Pull request #2663 by Luis Sagastume.
82
+ * Fix for large values in UID/GID fields in tar archives. Pull request
83
+ #2780 by Alexey Shein.
84
+ * Fixed task order for release. Pull request #2792 by SHIBATA Hiroshi.
85
+ * Ignore GEMRC variable for test suite. Pull request #2837 by SHIBATA
86
+ Hiroshi.
87
+
88
+ === 3.0.4 / 2019-06-14
89
+
90
+ Minor enhancements:
91
+
92
+ * Add support for TruffleRuby #2612 by Benoit Daloze
93
+ * Serve a more descriptive error when --no-ri or --no-rdoc are used #2572
94
+ by Grey Baker
95
+ * Improve test compatibility with CMake 2.8. Pull request #2590 by Vít
96
+ Ondruch.
97
+ * Restore gem build behavior and introduce the "-C" flag to gem build.
98
+ Pull request #2596 by Luis Sagastume.
99
+ * Enabled block call with util_set_arch. Pull request #2603 by SHIBATA
100
+ Hiroshi.
101
+ * Avoid rdoc hook when it's failed to load rdoc library. Pull request
102
+ #2604 by SHIBATA Hiroshi.
103
+ * Drop tests for legacy RDoc. Pull request #2608 by Nobuyoshi Nakada.
104
+ * Update TODO comment. Pull request #2658 by Luis Sagastume.
105
+ * Skip malicious extension test with mswin platform. Pull request #2670 by
106
+ SHIBATA Hiroshi.
107
+ * Check deprecated methods on release. Pull request #2673 by David
108
+ Rodríguez.
109
+ * Add steps to run bundler tests. Pull request #2680 by Aditya Prakash.
110
+ * Skip temporary "No such host is known" error. Pull request #2684 by
111
+ Takashi Kokubun.
112
+ * Replaced aws-sdk-s3 instead of s3cmd. Pull request #2688 by SHIBATA
113
+ Hiroshi.
114
+ * Allow uninstall from symlinked GEM_HOME. Pull request #2720 by David
115
+ Rodríguez.
116
+ * Use current checkout in CI to uninstall RVM related gems. Pull request
117
+ #2729 by David Rodríguez.
118
+ * Update Contributor Covenant v1.4.1. Pull request #2751 by SHIBATA
119
+ Hiroshi.
120
+ * Added supported versions of Ruby. Pull request #2756 by SHIBATA Hiroshi.
121
+ * Fix shadowing outer local variable warning. Pull request #2763 by Luis
122
+ Sagastume.
123
+ * Update the certificate files to make the test pass on Debian 10. Pull
124
+ request #2777 by Yusuke Endoh.
125
+ * Backport ruby core changes. Pull request #2778 by SHIBATA Hiroshi.
126
+
127
+ Bug fixes:
128
+
129
+ * Test_gem.rb - intermittent failure fix. Pull request #2613 by MSP-Greg.
130
+ * Fix sporadic CI failures. Pull request #2617 by David Rodríguez.
131
+ * Fix flaky bundler version finder tests. Pull request #2624 by David
132
+ Rodríguez.
133
+ * Fix gem indexer tests leaking utility gems. Pull request #2625 by David
134
+ Rodríguez.
135
+ * Clean up default spec dir too. Pull request #2639 by David Rodríguez.
136
+ * Fix 2.6.1 build against vendored bundler. Pull request #2645 by David
137
+ Rodríguez.
138
+ * Fix comment typo. Pull request #2664 by Luis Sagastume.
139
+ * Fix comment of Gem::Specification#required_ruby_version=. Pull request
140
+ #2732 by Alex Junger.
141
+ * Fix TODOs. Pull request #2748 by David Rodríguez.
142
+
143
+ === 3.0.3 / 2019-03-05
144
+
145
+ Security fixes:
146
+
147
+ * Fixed following vulnerabilities:
148
+ * CVE-2019-8320: Delete directory using symlink when decompressing tar
149
+ * CVE-2019-8321: Escape sequence injection vulnerability in `verbose`
150
+ * CVE-2019-8322: Escape sequence injection vulnerability in `gem owner`
151
+ * CVE-2019-8323: Escape sequence injection vulnerability in API response handling
152
+ * CVE-2019-8324: Installing a malicious gem may lead to arbitrary code execution
153
+ * CVE-2019-8325: Escape sequence injection vulnerability in errors
154
+
155
+ === 3.0.2 / 2019-01-01
156
+
157
+ Minor enhancements:
158
+
159
+ * Use Bundler-1.17.3. Pull request #2556 by SHIBATA Hiroshi.
160
+ * Fix document flag description. Pull request #2555 by Luis Sagastume.
161
+
162
+ Bug fixes:
163
+
164
+ * Fix tests when ruby --program-suffix is used without rubygems
165
+ --format-executable. Pull request #2549 by Jeremy Evans.
166
+ * Fix Gem::Requirement equality comparison when ~> operator is used. Pull
167
+ request #2554 by Grey Baker.
168
+ * Unset SOURCE_DATE_EPOCH in the test cases. Pull request #2558 by Sorah
169
+ Fukumori.
170
+ * Restore SOURCE_DATE_EPOCH. Pull request #2560 by SHIBATA Hiroshi.
171
+
172
+ === 3.0.1 / 2018-12-23
173
+
174
+ Bug fixes:
175
+
176
+ * Ensure globbed files paths are expanded. Pull request #2536 by Tony Ta.
177
+ * Dup the Dir.home string before passing it on. Pull request #2545 by
178
+ Charles Oliver Nutter.
179
+ * Added permissions to installed files for non-owners. Pull request #2546
180
+ by SHIBATA Hiroshi.
181
+ * Restore release task without hoe. Pull request #2547 by SHIBATA Hiroshi.
182
+
3
183
  === 3.0.0 / 2018-12-19
4
184
 
5
185
  Major enhancements:
data/Manifest.txt CHANGED
@@ -413,6 +413,7 @@ lib/rubygems/resolver/specification.rb
413
413
  lib/rubygems/resolver/stats.rb
414
414
  lib/rubygems/resolver/vendor_set.rb
415
415
  lib/rubygems/resolver/vendor_specification.rb
416
+ lib/rubygems/s3_uri_signer.rb
416
417
  lib/rubygems/safe_yaml.rb
417
418
  lib/rubygems/security.rb
418
419
  lib/rubygems/security/policies.rb
@@ -435,9 +436,8 @@ lib/rubygems/spec_fetcher.rb
435
436
  lib/rubygems/specification.rb
436
437
  lib/rubygems/specification_policy.rb
437
438
  lib/rubygems/ssl_certs/.document
438
- lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem
439
- lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem
440
- lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem
439
+ lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem
440
+ lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
441
441
  lib/rubygems/stub_specification.rb
442
442
  lib/rubygems/syck_hack.rb
443
443
  lib/rubygems/test_case.rb
@@ -639,7 +639,9 @@ test/rubygems/wrong_key_cert.pem
639
639
  test/rubygems/wrong_key_cert_32.pem
640
640
  util/CL2notes
641
641
  util/ci
642
+ util/cops/deprecations.rb
642
643
  util/create_certs.rb
644
+ util/create_certs.sh
643
645
  util/create_encrypted_key.rb
644
646
  util/generate_spdx_license_list.rb
645
647
  util/patch_with_prs.rb
data/README.md CHANGED
@@ -25,6 +25,12 @@ Finally, inside your Ruby program, load the Nokogiri gem and start parsing your
25
25
 
26
26
  For more information about how to use RubyGems, see our RubyGems basics guide at [guides.rubygems.org](http://guides.rubygems.org/rubygems-basics/)
27
27
 
28
+ ## Requirements
29
+
30
+ * RubyGems 2.6 supports Ruby 2.4 or lower.
31
+ * RubyGems 2.7 supports Ruby 2.5 or lower.
32
+ * RubyGems 3.0 supports Ruby 2.3 or later.
33
+
28
34
  ## Installation
29
35
 
30
36
  RubyGems is likely already installed in your Ruby environment, you can check by running `gem --version` in your terminal emulator.
data/Rakefile CHANGED
@@ -79,10 +79,25 @@ end
79
79
  # --------------------------------------------------------------------
80
80
  # Creating a release
81
81
 
82
- task :prerelease => %w[clobber test bundler:build_metadata]
83
-
82
+ task :prerelease => %w[clobber test bundler:build_metadata check_deprecations]
84
83
  task :postrelease => %w[bundler:build_metadata:clean upload guides:publish blog:publish]
85
84
 
85
+ desc "Check for deprecated methods with expired deprecation horizon"
86
+ task :check_deprecations do
87
+ if v.segments[1] == 0 && v.segments[2] == 0
88
+ sh("util/rubocop -r ./util/cops/deprecations --only Rubygems/Deprecations")
89
+ else
90
+ puts "Skipping deprecation checks since not releasing a major version."
91
+ end
92
+ end
93
+
94
+ desc "Release rubygems-#{v}"
95
+ task :release => :prerelease do
96
+ Rake::Task["package"].invoke
97
+ sh "gem push pkg/rubygems-update-#{v}.gem"
98
+ Rake::Task["postrelease"].invoke
99
+ end
100
+
86
101
  Gem::PackageTask.new(spec) {}
87
102
 
88
103
  Rake::Task["package"].enhance ["pkg/rubygems-#{v}.tgz", "pkg/rubygems-#{v}.zip"]
@@ -114,13 +129,23 @@ end
114
129
 
115
130
  file "pkg/rubygems-#{v}.tgz" => "pkg/rubygems-#{v}" do
116
131
  cd 'pkg' do
117
- sh "tar -czf rubygems-#{v}.tgz rubygems-#{v}"
132
+ sh "tar -czf rubygems-#{v}.tgz --owner=rubygems:0 --group=rubygems:0 rubygems-#{v}"
118
133
  end
119
134
  end
120
135
 
121
136
  desc "Upload release to S3"
122
137
  task :upload_to_s3 do
123
- sh "s3cmd put -P pkg/rubygems-#{v}.zip pkg/rubygems-#{v}.tgz s3://oregon.production.s3.rubygems.org/rubygems/"
138
+ begin
139
+ require "aws-sdk-s3"
140
+ rescue LoadError
141
+ abort "Install the aws-sdk-s3 gem to be able to upload gems to rubygems.org."
142
+ end
143
+
144
+ s3 = Aws::S3::Resource.new(region:'us-west-2')
145
+ %w[zip tgz].each do |ext|
146
+ obj = s3.bucket('oregon.production.s3.rubygems.org').object("rubygems/rubygems-#{v}.#{ext}")
147
+ obj.upload_file("pkg/rubygems-#{v}.#{ext}")
148
+ end
124
149
  end
125
150
 
126
151
  desc "Upload release to rubygems.org"
@@ -338,9 +363,10 @@ end
338
363
  desc "Update the manifest to reflect what's on disk"
339
364
  task :update_manifest do
340
365
  files = []
341
- require 'find'
342
- exclude = %r[/\/tmp\/|\/pkg\/|CVS|\.DS_Store|\/doc\/|\/coverage\/|\.svn|\.git|TAGS|extconf.h|\.bundle$|\.o$|\.log$/|\./bundler/(?!lib|man|exe|[^/]+\.md|bundler.gemspec)]ox
343
- Find.find(".") do |path|
366
+ exclude = %r[\.git|\./bundler/(?!lib|man|exe|[^/]+\.md|bundler.gemspec)]ox
367
+ tracked_files = `git ls-files --recurse-submodules`.split("\n").map {|f| "./#{f}" }
368
+
369
+ tracked_files.each do |path|
344
370
  next unless File.file?(path)
345
371
  next if path =~ exclude
346
372
  files << path[2..-1]
data/bundler/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 1.17.3 (2018-12-27)
2
+
3
+ Bugfixes:
4
+
5
+ - Fix a Bundler error when installing gems on old versions of RubyGems ([#6839](https://github.com/bundler/bundler/issues/6839), @colby-swandale)
6
+ - Fix a rare issue where Bundler was removing itself after a `bundle clean` ([#6829](https://github.com/bundler/bundler/issues/6829), @colby-swandale)
7
+
8
+ Documentation:
9
+
10
+ - Add entry for the `bundle remove` command to the main Bundler manual page
11
+
1
12
  ## 1.17.2 (2018-12-11)
2
13
 
3
14
  - Add compatibility for bundler merge with Ruby 2.6
@@ -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 = "2018-12-19".freeze
8
- @git_commit_sha = "3fc4de72b".freeze
7
+ @built_at = "2020-12-09".freeze
8
+ @git_commit_sha = "d7089abb6a".freeze
9
9
  @release = false
10
10
  # end ivars
11
11
 
@@ -10,6 +10,13 @@ module Bundler
10
10
  end
11
11
  end
12
12
 
13
+ attr_reader :options
14
+
15
+ def initialize(gem, options = {})
16
+ @options = {}
17
+ super
18
+ end
19
+
13
20
  def check_executable_overwrite(filename)
14
21
  # Bundler needs to install gems regardless of binstub overwriting
15
22
  end
@@ -19,9 +19,8 @@ module Bundler
19
19
  # can't point to the actual gemspec or else the require paths will be wrong
20
20
  s.loaded_from = File.expand_path("..", __FILE__)
21
21
  end
22
- if loaded_spec = Bundler.rubygems.loaded_specs("bundler")
23
- idx << loaded_spec # this has to come after the fake gemspec, to override it
24
- elsif local_spec = Bundler.rubygems.find_name("bundler").find {|s| s.version.to_s == VERSION }
22
+
23
+ if local_spec = Bundler.rubygems.find_name("bundler").find {|s| s.version.to_s == VERSION }
25
24
  idx << local_spec
26
25
  end
27
26
 
@@ -7,7 +7,7 @@ module Bundler
7
7
  # We're doing this because we might write tests that deal
8
8
  # with other versions of bundler and we are unsure how to
9
9
  # handle this better.
10
- VERSION = "1.17.2" unless defined?(::Bundler::VERSION)
10
+ VERSION = "1.17.3" unless defined?(::Bundler::VERSION)
11
11
 
12
12
  def self.overwrite_loaded_gem_version
13
13
  begin
@@ -94,6 +94,9 @@ We divide `bundle` subcommands into primary commands and utilities:
94
94
  * [`bundle doctor(1)`](bundle-doctor.1.html):
95
95
  Display warnings about common problems
96
96
 
97
+ * [`bundle remove(1)`](bundle-remove.1.html):
98
+ Removes gems from the Gemfile
99
+
97
100
  ## PLUGINS
98
101
 
99
102
  When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,
@@ -7,6 +7,7 @@
7
7
 
8
8
  require 'rubygems/command'
9
9
  require 'rubygems/user_interaction'
10
+ require 'rubygems/text'
10
11
 
11
12
  ##
12
13
  # The command manager registers and installs all the individual sub-commands
@@ -32,6 +33,7 @@ require 'rubygems/user_interaction'
32
33
 
33
34
  class Gem::CommandManager
34
35
 
36
+ include Gem::Text
35
37
  include Gem::UserInteraction
36
38
 
37
39
  BUILTIN_COMMANDS = [ # :nodoc:
@@ -145,12 +147,12 @@ class Gem::CommandManager
145
147
  def run(args, build_args=nil)
146
148
  process_args(args, build_args)
147
149
  rescue StandardError, Timeout::Error => ex
148
- alert_error "While executing gem ... (#{ex.class})\n #{ex}"
150
+ alert_error clean_text("While executing gem ... (#{ex.class})\n #{ex}")
149
151
  ui.backtrace ex
150
152
 
151
153
  terminate_interaction(1)
152
154
  rescue Interrupt
153
- alert_error "Interrupted"
155
+ alert_error clean_text("Interrupted")
154
156
  terminate_interaction(1)
155
157
  end
156
158
 
@@ -167,8 +169,14 @@ class Gem::CommandManager
167
169
  when '-v', '--version' then
168
170
  say Gem::VERSION
169
171
  terminate_interaction 0
172
+ when '--no-ri', '--no-rdoc' then
173
+ # This was added to compensate for a deprecation warning not being shown
174
+ # in Rubygems 2.x.x.
175
+ # TODO: Remove when Rubygems 3.1 is released.
176
+ alert_error "Invalid option: #{args.first}. Use --no-document instead."
177
+ terminate_interaction 1
170
178
  when /^-/ then
171
- alert_error "Invalid option: #{args.first}. See 'gem --help'."
179
+ alert_error clean_text("Invalid option: #{args.first}. See 'gem --help'.")
172
180
  terminate_interaction 1
173
181
  else
174
182
  cmd_name = args.shift.downcase
@@ -224,7 +232,7 @@ class Gem::CommandManager
224
232
  rescue Exception => e
225
233
  e = load_error if load_error
226
234
 
227
- alert_error "Loading command: #{command_name} (#{e.class})\n\t#{e}"
235
+ alert_error clean_text("Loading command: #{command_name} (#{e.class})\n\t#{e}")
228
236
  ui.backtrace e
229
237
  end
230
238
  end
@@ -18,6 +18,10 @@ class Gem::Commands::BuildCommand < Gem::Command
18
18
  add_option '-o', '--output FILE', 'output gem with the given filename' do |value, options|
19
19
  options[:output] = value
20
20
  end
21
+
22
+ add_option '-C PATH', '', 'Run as if gem build was started in <PATH> instead of the current working directory.' do |value, options|
23
+ options[:build_path] = value
24
+ end
21
25
  end
22
26
 
23
27
  def arguments # :nodoc:
@@ -60,25 +64,36 @@ Gems can be saved to a specified filename with the output option:
60
64
  end
61
65
 
62
66
  if File.exist? gemspec
63
- Dir.chdir(File.dirname(gemspec)) do
64
- spec = Gem::Specification.load File.basename(gemspec)
65
-
66
- if spec
67
- Gem::Package.build(
68
- spec,
69
- options[:force],
70
- options[:strict],
71
- options[:output]
72
- )
73
- else
74
- alert_error "Error loading gemspec. Aborting."
75
- terminate_interaction 1
67
+ spec = Gem::Specification.load(gemspec)
68
+
69
+ if options[:build_path]
70
+ Dir.chdir(File.dirname(gemspec)) do
71
+ spec = Gem::Specification.load File.basename(gemspec)
72
+ build_package(spec)
76
73
  end
74
+ else
75
+ build_package(spec)
77
76
  end
77
+
78
78
  else
79
79
  alert_error "Gemspec file not found: #{gemspec}"
80
80
  terminate_interaction 1
81
81
  end
82
82
  end
83
83
 
84
+ private
85
+
86
+ def build_package(spec)
87
+ if spec
88
+ Gem::Package.build(
89
+ spec,
90
+ options[:force],
91
+ options[:strict],
92
+ options[:output]
93
+ )
94
+ else
95
+ alert_error "Error loading gemspec. Aborting."
96
+ terminate_interaction 1
97
+ end
98
+ end
84
99
  end
@@ -2,8 +2,11 @@
2
2
  require 'rubygems/command'
3
3
  require 'rubygems/local_remote_options'
4
4
  require 'rubygems/gemcutter_utilities'
5
+ require 'rubygems/text'
5
6
 
6
7
  class Gem::Commands::OwnerCommand < Gem::Command
8
+
9
+ include Gem::Text
7
10
  include Gem::LocalRemoteOptions
8
11
  include Gem::GemcutterUtilities
9
12
 
@@ -60,12 +63,14 @@ permission to.
60
63
  end
61
64
 
62
65
  def show_owners(name)
66
+ Gem.load_yaml
67
+
63
68
  response = rubygems_api_request :get, "api/v1/gems/#{name}/owners.yaml" do |request|
64
69
  request.add_field "Authorization", api_key
65
70
  end
66
71
 
67
72
  with_response response do |resp|
68
- owners = Gem::SafeYAML.load resp.body
73
+ owners = Gem::SafeYAML.load clean_text(resp.body)
69
74
 
70
75
  say "Owners for gem: #{name}"
71
76
  owners.each do |owner|
@@ -15,6 +15,8 @@ https://rubygems.org) and adds it to the index.
15
15
 
16
16
  The gem can be removed from the index and deleted from the server using the yank
17
17
  command. For further discussion see the help for the yank command.
18
+
19
+ The push command will use ~/.gem/credentials to authenticate to a server, but you can use the RubyGems environment variable GEM_HOST_API_KEY to set the api key to authenticate.
18
20
  EOF
19
21
  end
20
22