rubygems-update 3.3.15 → 3.3.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/Manifest.txt +5 -2
  4. data/bundler/CHANGELOG.md +6 -0
  5. data/bundler/lib/bundler/build_metadata.rb +2 -2
  6. data/bundler/lib/bundler/cli/cache.rb +1 -1
  7. data/bundler/lib/bundler/cli/install.rb +0 -2
  8. data/bundler/lib/bundler/cli.rb +2 -6
  9. data/bundler/lib/bundler/definition.rb +16 -20
  10. data/bundler/lib/bundler/dependency.rb +2 -0
  11. data/bundler/lib/bundler/dsl.rb +1 -3
  12. data/bundler/lib/bundler/errors.rb +2 -0
  13. data/bundler/lib/bundler/fetcher/base.rb +6 -8
  14. data/bundler/lib/bundler/fetcher.rb +4 -0
  15. data/bundler/lib/bundler/plugin/api/source.rb +3 -3
  16. data/bundler/lib/bundler/resolver.rb +10 -12
  17. data/bundler/lib/bundler/rubygems_gem_installer.rb +8 -0
  18. data/bundler/lib/bundler/rubygems_integration.rb +3 -21
  19. data/bundler/lib/bundler/source/git.rb +5 -7
  20. data/bundler/lib/bundler/source/rubygems.rb +77 -76
  21. data/bundler/lib/bundler/version.rb +1 -1
  22. data/lib/rubygems/commands/install_command.rb +1 -1
  23. data/lib/rubygems/commands/sources_command.rb +1 -1
  24. data/lib/rubygems/core_ext/kernel_require.rb +1 -1
  25. data/lib/rubygems/errors.rb +1 -1
  26. data/lib/rubygems/ext/builder.rb +3 -3
  27. data/lib/rubygems/ext/cargo_builder/link_flag_converter.rb +23 -0
  28. data/lib/rubygems/ext/cargo_builder.rb +87 -64
  29. data/lib/rubygems/gemcutter_utilities.rb +1 -1
  30. data/lib/rubygems/request.rb +1 -1
  31. data/lib/rubygems/source/git.rb +2 -2
  32. data/lib/rubygems/source.rb +2 -9
  33. data/lib/rubygems/source_list.rb +1 -5
  34. data/lib/rubygems/specification.rb +28 -4
  35. data/lib/rubygems/specification_policy.rb +1 -1
  36. data/lib/rubygems/uri.rb +41 -26
  37. data/lib/rubygems/util.rb +1 -1
  38. data/lib/rubygems.rb +1 -2
  39. data/rubygems-update.gemspec +1 -1
  40. data/test/rubygems/data/excon-0.7.7.gemspec.rz +0 -0
  41. data/test/rubygems/data/{null-type.gemspec.rz → pry-0.4.7.gemspec.rz} +0 -0
  42. data/test/rubygems/helper.rb +2 -2
  43. data/test/rubygems/test_gem.rb +1 -1
  44. data/test/rubygems/test_gem_commands_sources_command.rb +50 -0
  45. data/test/rubygems/test_gem_config_file.rb +3 -3
  46. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +86 -74
  47. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +1 -2
  48. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +86 -74
  49. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -2
  50. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb +2 -2
  51. data/test/rubygems/test_gem_ext_cargo_builder.rb +50 -19
  52. data/test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb +33 -0
  53. data/test/rubygems/test_gem_ext_cargo_builder_unit.rb +75 -0
  54. data/test/rubygems/test_gem_gemcutter_utilities.rb +1 -1
  55. data/test/rubygems/test_gem_package.rb +1 -1
  56. data/test/rubygems/test_gem_remote_fetcher.rb +15 -15
  57. data/test/rubygems/test_gem_resolver.rb +1 -1
  58. data/test/rubygems/test_gem_specification.rb +14 -6
  59. data/test/rubygems/test_require.rb +10 -10
  60. data/test/rubygems/test_rubygems.rb +3 -3
  61. metadata +8 -5
  62. data/lib/rubygems/psych_additions.rb +0 -10
@@ -202,6 +202,56 @@ Error fetching http://beta-gems.example.com:
202
202
  assert_equal '', @ui.error
203
203
  end
204
204
 
205
+ def test_execute_add_existent_source_invalid_uri
206
+ spec_fetcher
207
+
208
+ uri = "https://u:p@example.com/specs.#{@marshal_version}.gz"
209
+
210
+ @cmd.handle_options %w[--add https://u:p@example.com]
211
+ @fetcher.data[uri] = proc do
212
+ raise Gem::RemoteFetcher::FetchError.new('it died', uri)
213
+ end
214
+
215
+ use_ui @ui do
216
+ assert_raise Gem::MockGemUi::TermError do
217
+ @cmd.execute
218
+ end
219
+ end
220
+
221
+ expected = <<-EOF
222
+ Error fetching https://u:REDACTED@example.com:
223
+ \tit died (https://u:REDACTED@example.com/specs.#{@marshal_version}.gz)
224
+ EOF
225
+
226
+ assert_equal expected, @ui.output
227
+ assert_equal '', @ui.error
228
+ end
229
+
230
+ def test_execute_add_existent_source_invalid_uri_with_error_by_chance_including_the_uri_password
231
+ spec_fetcher
232
+
233
+ uri = "https://u:secret@example.com/specs.#{@marshal_version}.gz"
234
+
235
+ @cmd.handle_options %w[--add https://u:secret@example.com]
236
+ @fetcher.data[uri] = proc do
237
+ raise Gem::RemoteFetcher::FetchError.new('it secretly died', uri)
238
+ end
239
+
240
+ use_ui @ui do
241
+ assert_raise Gem::MockGemUi::TermError do
242
+ @cmd.execute
243
+ end
244
+ end
245
+
246
+ expected = <<-EOF
247
+ Error fetching https://u:REDACTED@example.com:
248
+ \tit secretly died (https://u:REDACTED@example.com/specs.#{@marshal_version}.gz)
249
+ EOF
250
+
251
+ assert_equal expected, @ui.output
252
+ assert_equal '', @ui.error
253
+ end
254
+
205
255
  def test_execute_add_redundant_source
206
256
  spec_fetcher
207
257
 
@@ -190,7 +190,7 @@ class TestGemConfigFile < Gem::TestCase
190
190
 
191
191
  util_config_file
192
192
 
193
- assert_equal({:rubygems => '701229f217cdf23b1344c7b4b54ca97'},
193
+ assert_equal({ :rubygems => '701229f217cdf23b1344c7b4b54ca97' },
194
194
  @cfg.api_keys)
195
195
  end
196
196
 
@@ -317,8 +317,8 @@ if you believe they were disclosed to a third party.
317
317
 
318
318
  util_config_file
319
319
 
320
- assert_equal({:rubygems => '701229f217cdf23b1344c7b4b54ca97',
321
- :other => 'a5fdbb6ba150cbb83aad2bb2fede64c'}, @cfg.api_keys)
320
+ assert_equal({ :rubygems => '701229f217cdf23b1344c7b4b54ca97',
321
+ :other => 'a5fdbb6ba150cbb83aad2bb2fede64c' }, @cfg.api_keys)
322
322
  end
323
323
 
324
324
  def test_load_api_keys_bad_permission
@@ -11,6 +11,15 @@ dependencies = [
11
11
  "memchr",
12
12
  ]
13
13
 
14
+ [[package]]
15
+ name = "ansi_term"
16
+ version = "0.12.1"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
19
+ dependencies = [
20
+ "winapi",
21
+ ]
22
+
14
23
  [[package]]
15
24
  name = "atty"
16
25
  version = "0.2.14"
@@ -22,16 +31,11 @@ dependencies = [
22
31
  "winapi",
23
32
  ]
24
33
 
25
- [[package]]
26
- name = "autocfg"
27
- version = "1.1.0"
28
- source = "registry+https://github.com/rust-lang/crates.io-index"
29
- checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
30
-
31
34
  [[package]]
32
35
  name = "bindgen"
33
36
  version = "0.59.2"
34
- source = "git+https://github.com/rust-lang/rust-bindgen?rev=f34e4103f304500c96d332f5cecc9067c980d0f9#f34e4103f304500c96d332f5cecc9067c980d0f9"
37
+ source = "registry+https://github.com/rust-lang/crates.io-index"
38
+ checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8"
35
39
  dependencies = [
36
40
  "bitflags",
37
41
  "cexpr",
@@ -56,6 +60,12 @@ version = "1.3.2"
56
60
  source = "registry+https://github.com/rust-lang/crates.io-index"
57
61
  checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
58
62
 
63
+ [[package]]
64
+ name = "cc"
65
+ version = "1.0.73"
66
+ source = "registry+https://github.com/rust-lang/crates.io-index"
67
+ checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
68
+
59
69
  [[package]]
60
70
  name = "cexpr"
61
71
  version = "0.6.0"
@@ -73,9 +83,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
73
83
 
74
84
  [[package]]
75
85
  name = "clang-sys"
76
- version = "1.3.1"
86
+ version = "1.3.3"
77
87
  source = "registry+https://github.com/rust-lang/crates.io-index"
78
- checksum = "4cc00842eed744b858222c4c9faf7243aafc6d33f92f96935263ef4d8a41ce21"
88
+ checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b"
79
89
  dependencies = [
80
90
  "glob",
81
91
  "libc",
@@ -84,17 +94,17 @@ dependencies = [
84
94
 
85
95
  [[package]]
86
96
  name = "clap"
87
- version = "3.1.5"
97
+ version = "2.34.0"
88
98
  source = "registry+https://github.com/rust-lang/crates.io-index"
89
- checksum = "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312"
99
+ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
90
100
  dependencies = [
101
+ "ansi_term",
91
102
  "atty",
92
103
  "bitflags",
93
- "indexmap",
94
- "os_str_bytes",
95
104
  "strsim",
96
- "termcolor",
97
105
  "textwrap",
106
+ "unicode-width",
107
+ "vec_map",
98
108
  ]
99
109
 
100
110
  [[package]]
@@ -129,12 +139,6 @@ version = "0.3.0"
129
139
  source = "registry+https://github.com/rust-lang/crates.io-index"
130
140
  checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
131
141
 
132
- [[package]]
133
- name = "hashbrown"
134
- version = "0.11.2"
135
- source = "registry+https://github.com/rust-lang/crates.io-index"
136
- checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
137
-
138
142
  [[package]]
139
143
  name = "hermit-abi"
140
144
  version = "0.1.19"
@@ -150,16 +154,6 @@ version = "2.1.0"
150
154
  source = "registry+https://github.com/rust-lang/crates.io-index"
151
155
  checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
152
156
 
153
- [[package]]
154
- name = "indexmap"
155
- version = "1.8.0"
156
- source = "registry+https://github.com/rust-lang/crates.io-index"
157
- checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
158
- dependencies = [
159
- "autocfg",
160
- "hashbrown",
161
- ]
162
-
163
157
  [[package]]
164
158
  name = "lazy_static"
165
159
  version = "1.4.0"
@@ -174,9 +168,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
174
168
 
175
169
  [[package]]
176
170
  name = "libc"
177
- version = "0.2.119"
171
+ version = "0.2.126"
178
172
  source = "registry+https://github.com/rust-lang/crates.io-index"
179
- checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
173
+ checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
180
174
 
181
175
  [[package]]
182
176
  name = "libloading"
@@ -188,20 +182,29 @@ dependencies = [
188
182
  "winapi",
189
183
  ]
190
184
 
185
+ [[package]]
186
+ name = "linkify"
187
+ version = "0.8.1"
188
+ source = "registry+https://github.com/rust-lang/crates.io-index"
189
+ checksum = "28d9967eb7d0bc31c39c6f52e8fce42991c0cd1f7a2078326f0b7a399a584c8d"
190
+ dependencies = [
191
+ "memchr",
192
+ ]
193
+
191
194
  [[package]]
192
195
  name = "log"
193
- version = "0.4.14"
196
+ version = "0.4.17"
194
197
  source = "registry+https://github.com/rust-lang/crates.io-index"
195
- checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
198
+ checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
196
199
  dependencies = [
197
200
  "cfg-if",
198
201
  ]
199
202
 
200
203
  [[package]]
201
204
  name = "memchr"
202
- version = "2.4.1"
205
+ version = "2.5.0"
203
206
  source = "registry+https://github.com/rust-lang/crates.io-index"
204
- checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
207
+ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
205
208
 
206
209
  [[package]]
207
210
  name = "minimal-lexical"
@@ -211,22 +214,12 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
211
214
 
212
215
  [[package]]
213
216
  name = "nom"
214
- version = "7.1.0"
217
+ version = "7.1.1"
215
218
  source = "registry+https://github.com/rust-lang/crates.io-index"
216
- checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109"
219
+ checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36"
217
220
  dependencies = [
218
221
  "memchr",
219
222
  "minimal-lexical",
220
- "version_check",
221
- ]
222
-
223
- [[package]]
224
- name = "os_str_bytes"
225
- version = "6.0.0"
226
- source = "registry+https://github.com/rust-lang/crates.io-index"
227
- checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
228
- dependencies = [
229
- "memchr",
230
223
  ]
231
224
 
232
225
  [[package]]
@@ -237,43 +230,47 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
237
230
 
238
231
  [[package]]
239
232
  name = "pkg-config"
240
- version = "0.3.24"
233
+ version = "0.3.25"
241
234
  source = "registry+https://github.com/rust-lang/crates.io-index"
242
- checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
235
+ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
243
236
 
244
237
  [[package]]
245
238
  name = "proc-macro2"
246
- version = "1.0.36"
239
+ version = "1.0.39"
247
240
  source = "registry+https://github.com/rust-lang/crates.io-index"
248
- checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
241
+ checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f"
249
242
  dependencies = [
250
- "unicode-xid",
243
+ "unicode-ident",
251
244
  ]
252
245
 
253
246
  [[package]]
254
247
  name = "quote"
255
- version = "1.0.15"
248
+ version = "1.0.18"
256
249
  source = "registry+https://github.com/rust-lang/crates.io-index"
257
- checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
250
+ checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
258
251
  dependencies = [
259
252
  "proc-macro2",
260
253
  ]
261
254
 
262
255
  [[package]]
263
256
  name = "rb-sys"
264
- version = "0.6.0"
265
- source = "git+https://github.com/ianks/rb-sys?tag=v0.6.0#1aa5b589e86a14e01aba806511818c19f85d71f6"
257
+ version = "0.9.4"
258
+ source = "registry+https://github.com/rust-lang/crates.io-index"
259
+ checksum = "f5465c5bd695ef70959b91b4ca9cfd515e9af012f6d9f0ae46f09fa4bcc3b722"
266
260
  dependencies = [
267
261
  "bindgen",
268
- "libc",
262
+ "cc",
263
+ "lazy_static",
264
+ "linkify",
269
265
  "pkg-config",
266
+ "shell-words",
270
267
  ]
271
268
 
272
269
  [[package]]
273
270
  name = "regex"
274
- version = "1.5.5"
271
+ version = "1.5.6"
275
272
  source = "registry+https://github.com/rust-lang/crates.io-index"
276
- checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
273
+ checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
277
274
  dependencies = [
278
275
  "aho-corasick",
279
276
  "memchr",
@@ -282,9 +279,9 @@ dependencies = [
282
279
 
283
280
  [[package]]
284
281
  name = "regex-syntax"
285
- version = "0.6.25"
282
+ version = "0.6.26"
286
283
  source = "registry+https://github.com/rust-lang/crates.io-index"
287
- checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
284
+ checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
288
285
 
289
286
  [[package]]
290
287
  name = "rustc-hash"
@@ -292,6 +289,12 @@ version = "1.1.0"
292
289
  source = "registry+https://github.com/rust-lang/crates.io-index"
293
290
  checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
294
291
 
292
+ [[package]]
293
+ name = "shell-words"
294
+ version = "1.1.0"
295
+ source = "registry+https://github.com/rust-lang/crates.io-index"
296
+ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
297
+
295
298
  [[package]]
296
299
  name = "shlex"
297
300
  version = "1.1.0"
@@ -300,9 +303,9 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
300
303
 
301
304
  [[package]]
302
305
  name = "strsim"
303
- version = "0.10.0"
306
+ version = "0.8.0"
304
307
  source = "registry+https://github.com/rust-lang/crates.io-index"
305
- checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
308
+ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
306
309
 
307
310
  [[package]]
308
311
  name = "termcolor"
@@ -315,27 +318,36 @@ dependencies = [
315
318
 
316
319
  [[package]]
317
320
  name = "textwrap"
318
- version = "0.15.0"
321
+ version = "0.11.0"
322
+ source = "registry+https://github.com/rust-lang/crates.io-index"
323
+ checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
324
+ dependencies = [
325
+ "unicode-width",
326
+ ]
327
+
328
+ [[package]]
329
+ name = "unicode-ident"
330
+ version = "1.0.0"
319
331
  source = "registry+https://github.com/rust-lang/crates.io-index"
320
- checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
332
+ checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
321
333
 
322
334
  [[package]]
323
- name = "unicode-xid"
324
- version = "0.2.2"
335
+ name = "unicode-width"
336
+ version = "0.1.9"
325
337
  source = "registry+https://github.com/rust-lang/crates.io-index"
326
- checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
338
+ checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
327
339
 
328
340
  [[package]]
329
- name = "version_check"
330
- version = "0.9.4"
341
+ name = "vec_map"
342
+ version = "0.8.2"
331
343
  source = "registry+https://github.com/rust-lang/crates.io-index"
332
- checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
344
+ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
333
345
 
334
346
  [[package]]
335
347
  name = "which"
336
- version = "4.2.4"
348
+ version = "4.2.5"
337
349
  source = "registry+https://github.com/rust-lang/crates.io-index"
338
- checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
350
+ checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae"
339
351
  dependencies = [
340
352
  "either",
341
353
  "lazy_static",
@@ -6,5 +6,4 @@ version = "0.1.0"
6
6
  crate-type = ["cdylib"]
7
7
 
8
8
  [dependencies]
9
- # Needed until bindgen has the `allowlist_file` feature
10
- rb-sys = { git = "https://github.com/ianks/rb-sys", tag = "v0.6.0" }
9
+ rb-sys = "0.9.4"