rubygems-update 3.3.10 → 3.3.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/Manifest.txt +14 -0
  4. data/bundler/CHANGELOG.md +11 -0
  5. data/bundler/exe/bundler +1 -1
  6. data/bundler/lib/bundler/build_metadata.rb +3 -3
  7. data/bundler/lib/bundler/cli/info.rb +1 -1
  8. data/bundler/lib/bundler/cli/init.rb +1 -1
  9. data/bundler/lib/bundler/cli/show.rb +1 -1
  10. data/bundler/lib/bundler/cli.rb +1 -1
  11. data/bundler/lib/bundler/installer.rb +2 -2
  12. data/bundler/lib/bundler/man/bundle-config.1 +3 -3
  13. data/bundler/lib/bundler/man/bundle-config.1.ronn +8 -6
  14. data/bundler/lib/bundler/shared_helpers.rb +4 -4
  15. data/bundler/lib/bundler/source/metadata.rb +1 -1
  16. data/bundler/lib/bundler/templates/Executable +2 -4
  17. data/bundler/lib/bundler/templates/Executable.bundler +1 -1
  18. data/bundler/lib/bundler/templates/Executable.standalone +2 -4
  19. data/bundler/lib/bundler/templates/newgem/github/workflows/main.yml.tt +1 -1
  20. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +1 -1
  21. data/bundler/lib/bundler/version.rb +1 -1
  22. data/bundler/lib/bundler.rb +1 -1
  23. data/lib/rubygems/commands/setup_command.rb +1 -1
  24. data/lib/rubygems/ext/builder.rb +3 -0
  25. data/lib/rubygems/ext/cargo_builder.rb +305 -0
  26. data/lib/rubygems/ext/ext_conf_builder.rb +1 -1
  27. data/lib/rubygems/ext.rb +1 -0
  28. data/lib/rubygems/gemcutter_utilities.rb +34 -5
  29. data/lib/rubygems/request.rb +1 -1
  30. data/lib/rubygems/source/git.rb +1 -0
  31. data/lib/rubygems.rb +2 -2
  32. data/rubygems-update.gemspec +1 -1
  33. data/setup.rb +1 -1
  34. data/test/rubygems/helper.rb +5 -5
  35. data/test/rubygems/test_gem.rb +1 -1
  36. data/test/rubygems/test_gem_command_manager.rb +1 -1
  37. data/test/rubygems/test_gem_commands_help_command.rb +1 -1
  38. data/test/rubygems/test_gem_commands_push_command.rb +5 -0
  39. data/test/rubygems/test_gem_commands_setup_command.rb +1 -1
  40. data/test/rubygems/test_gem_commands_signin_command.rb +100 -11
  41. data/test/rubygems/test_gem_dependency_installer.rb +2 -2
  42. data/test/rubygems/test_gem_ext_builder.rb +1 -1
  43. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/.gitignore +1 -0
  44. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +374 -0
  45. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +10 -0
  46. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb +21 -0
  47. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +10 -0
  48. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/src/lib.rs +30 -0
  49. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/.gitignore +1 -0
  50. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +374 -0
  51. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +10 -0
  52. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb +21 -0
  53. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/rust_ruby_example.gemspec +8 -0
  54. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs +42 -0
  55. data/test/rubygems/test_gem_ext_cargo_builder.rb +148 -0
  56. data/test/rubygems/test_gem_ext_cmake_builder.rb +2 -0
  57. data/test/rubygems/test_gem_gemcutter_utilities.rb +4 -2
  58. data/test/rubygems/test_gem_source_git.rb +1 -0
  59. data/test/rubygems/test_gem_specification.rb +1 -1
  60. data/test/rubygems/test_project_sanity.rb +1 -1
  61. data/test/rubygems/test_require.rb +1 -1
  62. data/test/test_changelog_generator.rb +1 -0
  63. metadata +17 -3
@@ -0,0 +1,374 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "aho-corasick"
7
+ version = "0.7.18"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
10
+ dependencies = [
11
+ "memchr",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "atty"
16
+ version = "0.2.14"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
19
+ dependencies = [
20
+ "hermit-abi",
21
+ "libc",
22
+ "winapi",
23
+ ]
24
+
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
+ [[package]]
32
+ name = "bindgen"
33
+ version = "0.59.2"
34
+ source = "git+https://github.com/rust-lang/rust-bindgen?rev=f34e4103f304500c96d332f5cecc9067c980d0f9#f34e4103f304500c96d332f5cecc9067c980d0f9"
35
+ dependencies = [
36
+ "bitflags",
37
+ "cexpr",
38
+ "clang-sys",
39
+ "clap",
40
+ "env_logger",
41
+ "lazy_static",
42
+ "lazycell",
43
+ "log",
44
+ "peeking_take_while",
45
+ "proc-macro2",
46
+ "quote",
47
+ "regex",
48
+ "rustc-hash",
49
+ "shlex",
50
+ "which",
51
+ ]
52
+
53
+ [[package]]
54
+ name = "bitflags"
55
+ version = "1.3.2"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
58
+
59
+ [[package]]
60
+ name = "cexpr"
61
+ version = "0.6.0"
62
+ source = "registry+https://github.com/rust-lang/crates.io-index"
63
+ checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
64
+ dependencies = [
65
+ "nom",
66
+ ]
67
+
68
+ [[package]]
69
+ name = "cfg-if"
70
+ version = "1.0.0"
71
+ source = "registry+https://github.com/rust-lang/crates.io-index"
72
+ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
73
+
74
+ [[package]]
75
+ name = "clang-sys"
76
+ version = "1.3.1"
77
+ source = "registry+https://github.com/rust-lang/crates.io-index"
78
+ checksum = "4cc00842eed744b858222c4c9faf7243aafc6d33f92f96935263ef4d8a41ce21"
79
+ dependencies = [
80
+ "glob",
81
+ "libc",
82
+ "libloading",
83
+ ]
84
+
85
+ [[package]]
86
+ name = "clap"
87
+ version = "3.1.5"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ checksum = "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312"
90
+ dependencies = [
91
+ "atty",
92
+ "bitflags",
93
+ "indexmap",
94
+ "os_str_bytes",
95
+ "strsim",
96
+ "termcolor",
97
+ "textwrap",
98
+ ]
99
+
100
+ [[package]]
101
+ name = "custom-name-ext"
102
+ version = "0.1.0"
103
+ dependencies = [
104
+ "rb-sys",
105
+ ]
106
+
107
+ [[package]]
108
+ name = "either"
109
+ version = "1.6.1"
110
+ source = "registry+https://github.com/rust-lang/crates.io-index"
111
+ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
112
+
113
+ [[package]]
114
+ name = "env_logger"
115
+ version = "0.9.0"
116
+ source = "registry+https://github.com/rust-lang/crates.io-index"
117
+ checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
118
+ dependencies = [
119
+ "atty",
120
+ "humantime",
121
+ "log",
122
+ "regex",
123
+ "termcolor",
124
+ ]
125
+
126
+ [[package]]
127
+ name = "glob"
128
+ version = "0.3.0"
129
+ source = "registry+https://github.com/rust-lang/crates.io-index"
130
+ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
131
+
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
+ [[package]]
139
+ name = "hermit-abi"
140
+ version = "0.1.19"
141
+ source = "registry+https://github.com/rust-lang/crates.io-index"
142
+ checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
143
+ dependencies = [
144
+ "libc",
145
+ ]
146
+
147
+ [[package]]
148
+ name = "humantime"
149
+ version = "2.1.0"
150
+ source = "registry+https://github.com/rust-lang/crates.io-index"
151
+ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
152
+
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
+ [[package]]
164
+ name = "lazy_static"
165
+ version = "1.4.0"
166
+ source = "registry+https://github.com/rust-lang/crates.io-index"
167
+ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
168
+
169
+ [[package]]
170
+ name = "lazycell"
171
+ version = "1.3.0"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
174
+
175
+ [[package]]
176
+ name = "libc"
177
+ version = "0.2.119"
178
+ source = "registry+https://github.com/rust-lang/crates.io-index"
179
+ checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
180
+
181
+ [[package]]
182
+ name = "libloading"
183
+ version = "0.7.3"
184
+ source = "registry+https://github.com/rust-lang/crates.io-index"
185
+ checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
186
+ dependencies = [
187
+ "cfg-if",
188
+ "winapi",
189
+ ]
190
+
191
+ [[package]]
192
+ name = "log"
193
+ version = "0.4.14"
194
+ source = "registry+https://github.com/rust-lang/crates.io-index"
195
+ checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
196
+ dependencies = [
197
+ "cfg-if",
198
+ ]
199
+
200
+ [[package]]
201
+ name = "memchr"
202
+ version = "2.4.1"
203
+ source = "registry+https://github.com/rust-lang/crates.io-index"
204
+ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
205
+
206
+ [[package]]
207
+ name = "minimal-lexical"
208
+ version = "0.2.1"
209
+ source = "registry+https://github.com/rust-lang/crates.io-index"
210
+ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
211
+
212
+ [[package]]
213
+ name = "nom"
214
+ version = "7.1.0"
215
+ source = "registry+https://github.com/rust-lang/crates.io-index"
216
+ checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109"
217
+ dependencies = [
218
+ "memchr",
219
+ "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
+ ]
231
+
232
+ [[package]]
233
+ name = "peeking_take_while"
234
+ version = "0.1.2"
235
+ source = "registry+https://github.com/rust-lang/crates.io-index"
236
+ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
237
+
238
+ [[package]]
239
+ name = "pkg-config"
240
+ version = "0.3.24"
241
+ source = "registry+https://github.com/rust-lang/crates.io-index"
242
+ checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
243
+
244
+ [[package]]
245
+ name = "proc-macro2"
246
+ version = "1.0.36"
247
+ source = "registry+https://github.com/rust-lang/crates.io-index"
248
+ checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
249
+ dependencies = [
250
+ "unicode-xid",
251
+ ]
252
+
253
+ [[package]]
254
+ name = "quote"
255
+ version = "1.0.15"
256
+ source = "registry+https://github.com/rust-lang/crates.io-index"
257
+ checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
258
+ dependencies = [
259
+ "proc-macro2",
260
+ ]
261
+
262
+ [[package]]
263
+ name = "rb-sys"
264
+ version = "0.6.0"
265
+ source = "git+https://github.com/ianks/rb-sys?tag=v0.6.0#1aa5b589e86a14e01aba806511818c19f85d71f6"
266
+ dependencies = [
267
+ "bindgen",
268
+ "libc",
269
+ "pkg-config",
270
+ ]
271
+
272
+ [[package]]
273
+ name = "regex"
274
+ version = "1.5.4"
275
+ source = "registry+https://github.com/rust-lang/crates.io-index"
276
+ checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
277
+ dependencies = [
278
+ "aho-corasick",
279
+ "memchr",
280
+ "regex-syntax",
281
+ ]
282
+
283
+ [[package]]
284
+ name = "regex-syntax"
285
+ version = "0.6.25"
286
+ source = "registry+https://github.com/rust-lang/crates.io-index"
287
+ checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
288
+
289
+ [[package]]
290
+ name = "rustc-hash"
291
+ version = "1.1.0"
292
+ source = "registry+https://github.com/rust-lang/crates.io-index"
293
+ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
294
+
295
+ [[package]]
296
+ name = "shlex"
297
+ version = "1.1.0"
298
+ source = "registry+https://github.com/rust-lang/crates.io-index"
299
+ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
300
+
301
+ [[package]]
302
+ name = "strsim"
303
+ version = "0.10.0"
304
+ source = "registry+https://github.com/rust-lang/crates.io-index"
305
+ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
306
+
307
+ [[package]]
308
+ name = "termcolor"
309
+ version = "1.1.3"
310
+ source = "registry+https://github.com/rust-lang/crates.io-index"
311
+ checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
312
+ dependencies = [
313
+ "winapi-util",
314
+ ]
315
+
316
+ [[package]]
317
+ name = "textwrap"
318
+ version = "0.15.0"
319
+ source = "registry+https://github.com/rust-lang/crates.io-index"
320
+ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
321
+
322
+ [[package]]
323
+ name = "unicode-xid"
324
+ version = "0.2.2"
325
+ source = "registry+https://github.com/rust-lang/crates.io-index"
326
+ checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
327
+
328
+ [[package]]
329
+ name = "version_check"
330
+ version = "0.9.4"
331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
332
+ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
333
+
334
+ [[package]]
335
+ name = "which"
336
+ version = "4.2.4"
337
+ source = "registry+https://github.com/rust-lang/crates.io-index"
338
+ checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
339
+ dependencies = [
340
+ "either",
341
+ "lazy_static",
342
+ "libc",
343
+ ]
344
+
345
+ [[package]]
346
+ name = "winapi"
347
+ version = "0.3.9"
348
+ source = "registry+https://github.com/rust-lang/crates.io-index"
349
+ checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
350
+ dependencies = [
351
+ "winapi-i686-pc-windows-gnu",
352
+ "winapi-x86_64-pc-windows-gnu",
353
+ ]
354
+
355
+ [[package]]
356
+ name = "winapi-i686-pc-windows-gnu"
357
+ version = "0.4.0"
358
+ source = "registry+https://github.com/rust-lang/crates.io-index"
359
+ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
360
+
361
+ [[package]]
362
+ name = "winapi-util"
363
+ version = "0.1.5"
364
+ source = "registry+https://github.com/rust-lang/crates.io-index"
365
+ checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
366
+ dependencies = [
367
+ "winapi",
368
+ ]
369
+
370
+ [[package]]
371
+ name = "winapi-x86_64-pc-windows-gnu"
372
+ version = "0.4.0"
373
+ source = "registry+https://github.com/rust-lang/crates.io-index"
374
+ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
@@ -0,0 +1,10 @@
1
+ [package]
2
+ name = "custom-name-ext"
3
+ version = "0.1.0"
4
+
5
+ [lib]
6
+ crate-type = ["cdylib"]
7
+
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" }
@@ -0,0 +1,21 @@
1
+ if ENV['RUBYOPT'] or defined? Gem
2
+ ENV.delete 'RUBYOPT'
3
+
4
+ require 'rbconfig'
5
+ cmd = [RbConfig.ruby, '--disable-gems', 'build.rb', *ARGV]
6
+
7
+ exec(*cmd)
8
+ end
9
+
10
+ require 'tmpdir'
11
+
12
+ lp = File.expand_path('../../../../lib', __dir__)
13
+ gem = ["ruby", "-I#{lp}", File.expand_path('../../../../bin/gem', __dir__)]
14
+ gemspec = File.expand_path('custom_name.gemspec', __dir__)
15
+
16
+ Dir.mktmpdir("custom_name") do |dir|
17
+ built_gem = File.expand_path(File.join(dir, "custom_name.gem"))
18
+ system *gem, "build", gemspec, "--output", built_gem
19
+ system *gem, "install", "--verbose", "--local", built_gem, *ARGV
20
+ system %q(ruby -rcustom_name -e "puts 'Result: ' + CustomName.say_hello")
21
+ end
@@ -0,0 +1,10 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "custom_name"
3
+ s.version = "0.1.0"
4
+ s.summary = "A Rust extension for Ruby"
5
+ s.extensions = ["Cargo.toml"]
6
+ s.authors = ["Ian Ker-Seymer"]
7
+ s.files = ["Cargo.toml", "Cargo.lock", "src/lib.rs"]
8
+
9
+ s.metadata['cargo_crate_name'] = 'custom-name-ext'
10
+ end
@@ -0,0 +1,30 @@
1
+ #[macro_use]
2
+ extern crate rb_sys;
3
+
4
+ use rb_sys::{rb_define_module, rb_define_module_function, rb_utf8_str_new, VALUE};
5
+ use std::ffi::CString;
6
+
7
+ ruby_extension!();
8
+
9
+ #[no_mangle]
10
+ unsafe extern "C" fn say_hello(_klass: VALUE) -> VALUE {
11
+ let cstr = CString::new("Hello world!").unwrap();
12
+
13
+ rb_utf8_str_new(cstr.as_ptr(), 12)
14
+ }
15
+
16
+ #[allow(non_snake_case)]
17
+ #[no_mangle]
18
+ pub extern "C" fn Init_custom_name() {
19
+ let name = CString::new("CustomName").unwrap();
20
+ let function_name = CString::new("say_hello").unwrap();
21
+ // bindgen does not properly detect the arity of the ruby callback function, so we have to transmute
22
+ let callback = unsafe {
23
+ std::mem::transmute::<unsafe extern "C" fn(VALUE) -> VALUE, unsafe extern "C" fn() -> VALUE>(
24
+ say_hello,
25
+ )
26
+ };
27
+ let klass = unsafe { rb_define_module(name.as_ptr()) };
28
+
29
+ unsafe { rb_define_module_function(klass, function_name.as_ptr(), Some(callback), 0) }
30
+ }