rubygems-update 2.7.11 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubygems-update might be problematic. Click here for more details.

Files changed (350) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +66 -0
  3. data/.travis.yml +22 -18
  4. data/CONTRIBUTING.md +141 -0
  5. data/History.txt +289 -19
  6. data/MAINTAINERS.txt +1 -0
  7. data/Manifest.txt +16 -11
  8. data/POLICIES.md +92 -0
  9. data/README.md +47 -26
  10. data/Rakefile +47 -207
  11. data/{UPGRADING.rdoc → UPGRADING.md} +31 -32
  12. data/appveyor.yml +20 -45
  13. data/bin/gem +1 -2
  14. data/bin/update_rubygems +2 -3
  15. data/bundler/CHANGELOG.md +54 -0
  16. data/bundler/bundler.gemspec +7 -1
  17. data/bundler/lib/bundler.rb +26 -8
  18. data/bundler/lib/bundler/build_metadata.rb +2 -2
  19. data/bundler/lib/bundler/cli.rb +63 -21
  20. data/bundler/lib/bundler/cli/add.rb +15 -5
  21. data/bundler/lib/bundler/cli/binstubs.rb +8 -2
  22. data/bundler/lib/bundler/cli/doctor.rb +47 -1
  23. data/bundler/lib/bundler/cli/install.rb +8 -5
  24. data/bundler/lib/bundler/cli/list.rb +41 -5
  25. data/bundler/lib/bundler/cli/outdated.rb +7 -1
  26. data/bundler/lib/bundler/cli/pristine.rb +4 -0
  27. data/bundler/lib/bundler/cli/remove.rb +18 -0
  28. data/bundler/lib/bundler/definition.rb +15 -16
  29. data/bundler/lib/bundler/dependency.rb +2 -2
  30. data/bundler/lib/bundler/dsl.rb +19 -3
  31. data/bundler/lib/bundler/feature_flag.rb +7 -0
  32. data/bundler/lib/bundler/gem_version_promoter.rb +4 -2
  33. data/bundler/lib/bundler/injector.rb +168 -9
  34. data/bundler/lib/bundler/installer.rb +29 -6
  35. data/bundler/lib/bundler/installer/parallel_installer.rb +5 -0
  36. data/bundler/lib/bundler/plugin.rb +10 -3
  37. data/bundler/lib/bundler/plugin/events.rb +61 -0
  38. data/bundler/lib/bundler/resolver.rb +2 -2
  39. data/bundler/lib/bundler/runtime.rb +8 -2
  40. data/bundler/lib/bundler/settings.rb +24 -3
  41. data/bundler/lib/bundler/settings/validator.rb +23 -0
  42. data/bundler/lib/bundler/shared_helpers.rb +19 -3
  43. data/bundler/lib/bundler/source.rb +9 -9
  44. data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +1 -0
  45. data/bundler/lib/bundler/version.rb +1 -1
  46. data/bundler/man/bundle-add.ronn +13 -2
  47. data/bundler/man/bundle-config.ronn +21 -0
  48. data/bundler/man/bundle-install.ronn +1 -1
  49. data/bundler/man/bundle-list.ronn +19 -1
  50. data/bundler/man/bundle-outdated.ronn +4 -0
  51. data/bundler/man/bundle-remove.ronn +23 -0
  52. data/bundler/man/bundle-update.ronn +1 -1
  53. data/lib/rubygems.rb +70 -96
  54. data/lib/rubygems/available_set.rb +1 -1
  55. data/lib/rubygems/basic_specification.rb +12 -12
  56. data/lib/rubygems/bundler_version_finder.rb +3 -3
  57. data/lib/rubygems/command.rb +22 -15
  58. data/lib/rubygems/command_manager.rb +20 -11
  59. data/lib/rubygems/commands/build_command.rb +27 -8
  60. data/lib/rubygems/commands/cert_command.rb +45 -24
  61. data/lib/rubygems/commands/check_command.rb +1 -1
  62. data/lib/rubygems/commands/cleanup_command.rb +14 -7
  63. data/lib/rubygems/commands/contents_command.rb +14 -15
  64. data/lib/rubygems/commands/dependency_command.rb +17 -17
  65. data/lib/rubygems/commands/environment_command.rb +20 -1
  66. data/lib/rubygems/commands/fetch_command.rb +2 -3
  67. data/lib/rubygems/commands/generate_index_command.rb +2 -3
  68. data/lib/rubygems/commands/help_command.rb +12 -13
  69. data/lib/rubygems/commands/info_command.rb +33 -0
  70. data/lib/rubygems/commands/install_command.rb +21 -17
  71. data/lib/rubygems/commands/list_command.rb +0 -1
  72. data/lib/rubygems/commands/lock_command.rb +3 -4
  73. data/lib/rubygems/commands/open_command.rb +16 -10
  74. data/lib/rubygems/commands/owner_command.rb +20 -11
  75. data/lib/rubygems/commands/pristine_command.rb +23 -16
  76. data/lib/rubygems/commands/push_command.rb +17 -8
  77. data/lib/rubygems/commands/query_command.rb +24 -24
  78. data/lib/rubygems/commands/rdoc_command.rb +3 -4
  79. data/lib/rubygems/commands/search_command.rb +0 -1
  80. data/lib/rubygems/commands/server_command.rb +1 -2
  81. data/lib/rubygems/commands/setup_command.rb +78 -38
  82. data/lib/rubygems/commands/signin_command.rb +2 -1
  83. data/lib/rubygems/commands/signout_command.rb +2 -2
  84. data/lib/rubygems/commands/sources_command.rb +11 -12
  85. data/lib/rubygems/commands/specification_command.rb +7 -7
  86. data/lib/rubygems/commands/uninstall_command.rb +41 -19
  87. data/lib/rubygems/commands/unpack_command.rb +16 -7
  88. data/lib/rubygems/commands/update_command.rb +28 -23
  89. data/lib/rubygems/commands/which_command.rb +4 -5
  90. data/lib/rubygems/commands/yank_command.rb +1 -2
  91. data/lib/rubygems/compatibility.rb +1 -21
  92. data/lib/rubygems/config_file.rb +36 -36
  93. data/lib/rubygems/core_ext/kernel_require.rb +6 -6
  94. data/lib/rubygems/core_ext/kernel_warn.rb +45 -0
  95. data/lib/rubygems/defaults.rb +31 -12
  96. data/lib/rubygems/dependency.rb +14 -14
  97. data/lib/rubygems/dependency_installer.rb +29 -31
  98. data/lib/rubygems/dependency_list.rb +8 -9
  99. data/lib/rubygems/deprecate.rb +2 -3
  100. data/lib/rubygems/doctor.rb +5 -6
  101. data/lib/rubygems/errors.rb +3 -3
  102. data/lib/rubygems/exceptions.rb +11 -4
  103. data/lib/rubygems/ext.rb +0 -1
  104. data/lib/rubygems/ext/build_error.rb +0 -1
  105. data/lib/rubygems/ext/builder.rb +50 -23
  106. data/lib/rubygems/ext/cmake_builder.rb +2 -2
  107. data/lib/rubygems/ext/configure_builder.rb +2 -3
  108. data/lib/rubygems/ext/ext_conf_builder.rb +8 -7
  109. data/lib/rubygems/ext/rake_builder.rb +16 -18
  110. data/lib/rubygems/gem_runner.rb +2 -2
  111. data/lib/rubygems/gemcutter_utilities.rb +40 -13
  112. data/lib/rubygems/indexer.rb +19 -12
  113. data/lib/rubygems/install_default_message.rb +0 -1
  114. data/lib/rubygems/install_message.rb +0 -1
  115. data/lib/rubygems/install_update_options.rb +2 -28
  116. data/lib/rubygems/installer.rb +95 -75
  117. data/lib/rubygems/installer_test_case.rb +0 -14
  118. data/lib/rubygems/local_remote_options.rb +5 -4
  119. data/lib/rubygems/mock_gem_ui.rb +3 -4
  120. data/lib/rubygems/name_tuple.rb +4 -4
  121. data/lib/rubygems/package.rb +90 -73
  122. data/lib/rubygems/package/digest_io.rb +3 -4
  123. data/lib/rubygems/package/file_source.rb +3 -4
  124. data/lib/rubygems/package/io_source.rb +1 -2
  125. data/lib/rubygems/package/old.rb +8 -16
  126. data/lib/rubygems/package/source.rb +0 -1
  127. data/lib/rubygems/package/tar_header.rb +2 -2
  128. data/lib/rubygems/package/tar_reader.rb +2 -4
  129. data/lib/rubygems/package/tar_reader/entry.rb +20 -4
  130. data/lib/rubygems/package/tar_test_case.rb +2 -8
  131. data/lib/rubygems/package/tar_writer.rb +13 -15
  132. data/lib/rubygems/package_task.rb +0 -1
  133. data/lib/rubygems/path_support.rb +16 -6
  134. data/lib/rubygems/platform.rb +4 -5
  135. data/lib/rubygems/psych_tree.rb +1 -1
  136. data/lib/rubygems/rdoc.rb +0 -311
  137. data/lib/rubygems/remote_fetcher.rb +34 -48
  138. data/lib/rubygems/request.rb +16 -15
  139. data/lib/rubygems/request/connection_pools.rb +24 -13
  140. data/lib/rubygems/request/http_pool.rb +3 -4
  141. data/lib/rubygems/request/https_pool.rb +1 -3
  142. data/lib/rubygems/request_set.rb +52 -25
  143. data/lib/rubygems/request_set/gem_dependency_api.rb +36 -40
  144. data/lib/rubygems/request_set/lockfile.rb +12 -12
  145. data/lib/rubygems/request_set/lockfile/parser.rb +18 -29
  146. data/lib/rubygems/request_set/lockfile/tokenizer.rb +9 -9
  147. data/lib/rubygems/requirement.rb +16 -16
  148. data/lib/rubygems/resolver.rb +10 -15
  149. data/lib/rubygems/resolver/activation_request.rb +6 -6
  150. data/lib/rubygems/resolver/api_set.rb +5 -6
  151. data/lib/rubygems/resolver/api_specification.rb +2 -3
  152. data/lib/rubygems/resolver/best_set.rb +5 -6
  153. data/lib/rubygems/resolver/composed_set.rb +5 -6
  154. data/lib/rubygems/resolver/conflict.rb +5 -5
  155. data/lib/rubygems/resolver/current_set.rb +1 -2
  156. data/lib/rubygems/resolver/dependency_request.rb +4 -4
  157. data/lib/rubygems/resolver/git_set.rb +5 -6
  158. data/lib/rubygems/resolver/git_specification.rb +4 -5
  159. data/lib/rubygems/resolver/index_set.rb +5 -6
  160. data/lib/rubygems/resolver/index_specification.rb +3 -4
  161. data/lib/rubygems/resolver/installed_specification.rb +3 -4
  162. data/lib/rubygems/resolver/installer_set.rb +12 -12
  163. data/lib/rubygems/resolver/local_specification.rb +1 -2
  164. data/lib/rubygems/resolver/lock_set.rb +5 -6
  165. data/lib/rubygems/resolver/lock_specification.rb +7 -8
  166. data/lib/rubygems/resolver/requirement_list.rb +1 -1
  167. data/lib/rubygems/resolver/set.rb +2 -2
  168. data/lib/rubygems/resolver/source_set.rb +4 -5
  169. data/lib/rubygems/resolver/spec_specification.rb +1 -2
  170. data/lib/rubygems/resolver/specification.rb +10 -7
  171. data/lib/rubygems/resolver/stats.rb +1 -1
  172. data/lib/rubygems/resolver/vendor_set.rb +4 -5
  173. data/lib/rubygems/resolver/vendor_specification.rb +2 -3
  174. data/lib/rubygems/safe_yaml.rb +18 -10
  175. data/lib/rubygems/security.rb +21 -22
  176. data/lib/rubygems/security/policies.rb +1 -2
  177. data/lib/rubygems/security/policy.rb +25 -25
  178. data/lib/rubygems/security/signer.rb +72 -24
  179. data/lib/rubygems/security/trust_dir.rb +10 -10
  180. data/lib/rubygems/server.rb +21 -21
  181. data/lib/rubygems/source.rb +16 -25
  182. data/lib/rubygems/source/git.rb +9 -10
  183. data/lib/rubygems/source/installed.rb +3 -4
  184. data/lib/rubygems/source/local.rb +7 -7
  185. data/lib/rubygems/source/lock.rb +4 -4
  186. data/lib/rubygems/source/specific_file.rb +5 -5
  187. data/lib/rubygems/source/vendor.rb +2 -3
  188. data/lib/rubygems/source_list.rb +2 -2
  189. data/lib/rubygems/source_local.rb +0 -1
  190. data/lib/rubygems/spec_fetcher.rb +5 -6
  191. data/lib/rubygems/specification.rb +199 -536
  192. data/lib/rubygems/specification_policy.rb +407 -0
  193. data/lib/rubygems/ssl_certs/{rubygems.org → index.rubygems.org}/GlobalSignRootCA.pem +0 -0
  194. data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +23 -0
  195. data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +25 -0
  196. data/lib/rubygems/stub_specification.rb +11 -15
  197. data/lib/rubygems/test_case.rb +141 -66
  198. data/lib/rubygems/test_utilities.rb +20 -35
  199. data/lib/rubygems/text.rb +6 -6
  200. data/lib/rubygems/uninstaller.rb +37 -26
  201. data/lib/rubygems/uri_formatter.rb +1 -2
  202. data/lib/rubygems/user_interaction.rb +38 -93
  203. data/lib/rubygems/util.rb +20 -14
  204. data/lib/rubygems/util/licenses.rb +27 -1
  205. data/lib/rubygems/util/list.rb +1 -1
  206. data/lib/rubygems/validator.rb +4 -5
  207. data/lib/rubygems/version.rb +15 -15
  208. data/lib/rubygems/version_option.rb +2 -3
  209. data/rubygems-update.gemspec +43 -0
  210. data/setup.rb +2 -8
  211. data/test/rubygems/rubygems_plugin.rb +0 -1
  212. data/test/rubygems/simple_gem.rb +1 -1
  213. data/test/rubygems/test_bundled_ca.rb +4 -7
  214. data/test/rubygems/test_config.rb +7 -2
  215. data/test/rubygems/test_gem.rb +161 -130
  216. data/test/rubygems/test_gem_command.rb +0 -1
  217. data/test/rubygems/test_gem_command_manager.rb +8 -3
  218. data/test/rubygems/test_gem_commands_build_command.rb +219 -15
  219. data/test/rubygems/test_gem_commands_cert_command.rb +69 -8
  220. data/test/rubygems/test_gem_commands_check_command.rb +1 -1
  221. data/test/rubygems/test_gem_commands_cleanup_command.rb +27 -1
  222. data/test/rubygems/test_gem_commands_contents_command.rb +1 -2
  223. data/test/rubygems/test_gem_commands_dependency_command.rb +33 -34
  224. data/test/rubygems/test_gem_commands_environment_command.rb +1 -0
  225. data/test/rubygems/test_gem_commands_fetch_command.rb +0 -1
  226. data/test/rubygems/test_gem_commands_generate_index_command.rb +0 -1
  227. data/test/rubygems/test_gem_commands_help_command.rb +7 -4
  228. data/test/rubygems/test_gem_commands_info_command.rb +44 -0
  229. data/test/rubygems/test_gem_commands_install_command.rb +79 -12
  230. data/test/rubygems/test_gem_commands_lock_command.rb +0 -1
  231. data/test/rubygems/test_gem_commands_open_command.rb +29 -0
  232. data/test/rubygems/test_gem_commands_outdated_command.rb +0 -1
  233. data/test/rubygems/test_gem_commands_owner_command.rb +93 -57
  234. data/test/rubygems/test_gem_commands_pristine_command.rb +65 -30
  235. data/test/rubygems/test_gem_commands_push_command.rb +39 -0
  236. data/test/rubygems/test_gem_commands_query_command.rb +102 -100
  237. data/test/rubygems/test_gem_commands_search_command.rb +0 -1
  238. data/test/rubygems/test_gem_commands_server_command.rb +0 -1
  239. data/test/rubygems/test_gem_commands_setup_command.rb +39 -8
  240. data/test/rubygems/test_gem_commands_signin_command.rb +1 -1
  241. data/test/rubygems/test_gem_commands_sources_command.rb +0 -1
  242. data/test/rubygems/test_gem_commands_specification_command.rb +2 -3
  243. data/test/rubygems/test_gem_commands_stale_command.rb +3 -2
  244. data/test/rubygems/test_gem_commands_uninstall_command.rb +81 -7
  245. data/test/rubygems/test_gem_commands_unpack_command.rb +17 -1
  246. data/test/rubygems/test_gem_commands_update_command.rb +19 -2
  247. data/test/rubygems/test_gem_commands_which_command.rb +0 -1
  248. data/test/rubygems/test_gem_commands_yank_command.rb +0 -1
  249. data/test/rubygems/test_gem_config_file.rb +4 -2
  250. data/test/rubygems/test_gem_dependency.rb +0 -1
  251. data/test/rubygems/test_gem_dependency_installer.rb +8 -5
  252. data/test/rubygems/test_gem_dependency_list.rb +6 -7
  253. data/test/rubygems/test_gem_dependency_resolution_error.rb +0 -1
  254. data/test/rubygems/test_gem_doctor.rb +1 -2
  255. data/test/rubygems/test_gem_ext_builder.rb +10 -23
  256. data/test/rubygems/test_gem_ext_cmake_builder.rb +5 -4
  257. data/test/rubygems/test_gem_ext_configure_builder.rb +3 -3
  258. data/test/rubygems/test_gem_ext_ext_conf_builder.rb +8 -9
  259. data/test/rubygems/test_gem_ext_rake_builder.rb +20 -5
  260. data/test/rubygems/test_gem_gem_runner.rb +0 -1
  261. data/test/rubygems/test_gem_gemcutter_utilities.rb +32 -6
  262. data/test/rubygems/test_gem_impossible_dependencies_error.rb +0 -1
  263. data/test/rubygems/test_gem_indexer.rb +1 -2
  264. data/test/rubygems/test_gem_install_update_options.rb +1 -20
  265. data/test/rubygems/test_gem_installer.rb +69 -203
  266. data/test/rubygems/test_gem_local_remote_options.rb +3 -3
  267. data/test/rubygems/test_gem_name_tuple.rb +0 -1
  268. data/test/rubygems/test_gem_package.rb +59 -50
  269. data/test/rubygems/test_gem_package_old.rb +0 -1
  270. data/test/rubygems/test_gem_package_tar_header.rb +1 -2
  271. data/test/rubygems/test_gem_package_tar_reader.rb +0 -1
  272. data/test/rubygems/test_gem_package_tar_reader_entry.rb +11 -0
  273. data/test/rubygems/test_gem_package_tar_writer.rb +40 -7
  274. data/test/rubygems/test_gem_package_task.rb +2 -2
  275. data/test/rubygems/test_gem_path_support.rb +28 -11
  276. data/test/rubygems/test_gem_platform.rb +4 -5
  277. data/test/rubygems/test_gem_rdoc.rb +1 -2
  278. data/test/rubygems/test_gem_remote_fetcher.rb +111 -130
  279. data/test/rubygems/test_gem_request.rb +5 -5
  280. data/test/rubygems/test_gem_request_connection_pools.rb +24 -3
  281. data/test/rubygems/test_gem_request_set.rb +5 -5
  282. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +2 -7
  283. data/test/rubygems/test_gem_request_set_lockfile.rb +1 -2
  284. data/test/rubygems/test_gem_request_set_lockfile_parser.rb +4 -9
  285. data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +1 -1
  286. data/test/rubygems/test_gem_requirement.rb +18 -4
  287. data/test/rubygems/test_gem_resolver.rb +13 -17
  288. data/test/rubygems/test_gem_resolver_activation_request.rb +0 -1
  289. data/test/rubygems/test_gem_resolver_api_set.rb +0 -1
  290. data/test/rubygems/test_gem_resolver_api_specification.rb +0 -1
  291. data/test/rubygems/test_gem_resolver_best_set.rb +0 -1
  292. data/test/rubygems/test_gem_resolver_composed_set.rb +0 -1
  293. data/test/rubygems/test_gem_resolver_conflict.rb +0 -1
  294. data/test/rubygems/test_gem_resolver_dependency_request.rb +0 -1
  295. data/test/rubygems/test_gem_resolver_git_set.rb +0 -1
  296. data/test/rubygems/test_gem_resolver_git_specification.rb +0 -1
  297. data/test/rubygems/test_gem_resolver_index_set.rb +0 -1
  298. data/test/rubygems/test_gem_resolver_index_specification.rb +0 -1
  299. data/test/rubygems/test_gem_resolver_installed_specification.rb +0 -1
  300. data/test/rubygems/test_gem_resolver_installer_set.rb +2 -3
  301. data/test/rubygems/test_gem_resolver_local_specification.rb +0 -1
  302. data/test/rubygems/test_gem_resolver_lock_set.rb +0 -1
  303. data/test/rubygems/test_gem_resolver_lock_specification.rb +0 -1
  304. data/test/rubygems/test_gem_resolver_requirement_list.rb +0 -1
  305. data/test/rubygems/test_gem_resolver_specification.rb +1 -2
  306. data/test/rubygems/test_gem_resolver_vendor_set.rb +0 -1
  307. data/test/rubygems/test_gem_resolver_vendor_specification.rb +0 -1
  308. data/test/rubygems/test_gem_security.rb +1 -3
  309. data/test/rubygems/test_gem_security_policy.rb +4 -5
  310. data/test/rubygems/test_gem_security_signer.rb +4 -3
  311. data/test/rubygems/test_gem_security_trust_dir.rb +1 -2
  312. data/test/rubygems/test_gem_server.rb +4 -4
  313. data/test/rubygems/test_gem_source.rb +0 -13
  314. data/test/rubygems/test_gem_source_fetch_problem.rb +0 -1
  315. data/test/rubygems/test_gem_source_git.rb +0 -1
  316. data/test/rubygems/test_gem_source_installed.rb +0 -1
  317. data/test/rubygems/test_gem_source_lock.rb +0 -1
  318. data/test/rubygems/test_gem_source_vendor.rb +0 -1
  319. data/test/rubygems/test_gem_spec_fetcher.rb +0 -1
  320. data/test/rubygems/test_gem_specification.rb +334 -198
  321. data/test/rubygems/test_gem_stream_ui.rb +13 -30
  322. data/test/rubygems/test_gem_stub_specification.rb +0 -2
  323. data/test/rubygems/test_gem_text.rb +4 -5
  324. data/test/rubygems/test_gem_uninstaller.rb +21 -1
  325. data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +0 -1
  326. data/test/rubygems/test_gem_uri_formatter.rb +0 -1
  327. data/test/rubygems/test_gem_util.rb +6 -11
  328. data/test/rubygems/test_gem_validator.rb +0 -1
  329. data/test/rubygems/test_gem_version.rb +11 -11
  330. data/test/rubygems/test_gem_version_option.rb +0 -1
  331. data/test/rubygems/test_remote_fetch_error.rb +0 -1
  332. data/test/rubygems/test_require.rb +67 -52
  333. data/util/CL2notes +1 -2
  334. data/util/ci +15 -12
  335. data/util/create_certs.rb +6 -7
  336. data/util/create_encrypted_key.rb +0 -1
  337. data/util/patch_with_prs.rb +1 -1
  338. data/util/rubocop +8 -0
  339. data/util/update_bundled_ca_certificates.rb +15 -14
  340. data/util/update_changelog.rb +1 -1
  341. metadata +67 -59
  342. data/.autotest +0 -71
  343. data/.document +0 -5
  344. data/CONTRIBUTING.rdoc +0 -130
  345. data/CVE-2013-4287.txt +0 -35
  346. data/CVE-2013-4363.txt +0 -45
  347. data/CVE-2015-3900.txt +0 -40
  348. data/POLICIES.rdoc +0 -74
  349. data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +0 -21
  350. data/test/rubygems/fix_openssl_warnings.rb +0 -13
@@ -9,7 +9,7 @@ def format_text(text, wrap, indent=0)
9
9
  work = text.dup
10
10
 
11
11
  while work.length > wrap
12
- if work =~ /^(.{0,#{wrap}})[ \n]/o then
12
+ if work =~ /^(.{0,#{wrap}})[ \n]/o
13
13
  result << $1
14
14
  work.slice!(0, $&.length)
15
15
  else
@@ -53,4 +53,3 @@ entries.sort_by { |file, | file }.each do |file, file_entries|
53
53
  puts file_entry
54
54
  end
55
55
  end
56
-
data/util/ci CHANGED
@@ -47,25 +47,28 @@ end
47
47
  case ARGV
48
48
  when %w(before_script)
49
49
  if TOOL.rubygems?
50
- run('gem', %W(uninstall executable-hooks gem-wrappers -x --force -i #{`gem env home`.strip}@global))
51
- run('gem', %W(install rake -v #{'~> 10.5'} --no-document))
52
- run('gem', %W(install bundler -v #{'1.16.6'} --no-document))
53
- run('gem', %W(install hoe -v #{'3.15.0'} --no-document))
54
- run('gem', %w(install hoe-travis --no-document))
55
- run('gem', %W(install minitest -v #{'~> 4.7'} --no-document))
56
- run('rake', %w(_10.5.0_ travis:before -t))
50
+ run('gem', %W(uninstall executable-hooks gem-wrappers bundler-unload -x --force -i #{`gem env home`.strip}@global))
51
+
52
+ if RUBY_VERSION >= "2.6.0"
53
+ run('gem', %w(install minitest -v 5.4.3))
54
+ end
55
+
56
+ # 2.5 images of Travis was broken about bundler installation.
57
+ if RUBY_VERSION >= "2.5.0" && RUBY_VERSION < "2.6.0"
58
+ run('gem', %w(install bundler -v 1.16.2))
59
+ end
60
+
57
61
  run('gem', %w(list --details))
58
62
  run('gem', %w(env))
59
63
  else
60
64
  with_retries { run('rake', %w(spec:travis:deps)) }
61
65
  end
62
- when %w(after_script)
63
- if TOOL.rubygems?
64
- run('rake', %w(_10.5.0_ travis:after -t))
65
- end
66
+ when %w(rubocop)
67
+ run('gem', %w(install rubocop -v ~>0.60.0))
68
+ run('util/rubocop')
66
69
  when %w(script)
67
70
  if TOOL.rubygems?
68
- run('rake', %w(_10.5.0_ travis))
71
+ run('rake test')
69
72
  else
70
73
  run('rake', %w(spec:travis -t))
71
74
  end
@@ -6,7 +6,7 @@ class CertificateBuilder
6
6
 
7
7
  attr_reader :start
8
8
 
9
- def initialize key_size = 2048
9
+ def initialize(key_size = 2048)
10
10
  @start = Time.utc 2012, 01, 01, 00, 00, 00
11
11
  @end_of_time = Time.utc 9999, 12, 31, 23, 59, 59
12
12
  @end_of_time_32 = Time.utc 2038, 01, 19, 03, 14, 07
@@ -59,11 +59,11 @@ class CertificateBuilder
59
59
  ef.create_extension('subjectKeyIdentifier', 'hash')
60
60
  ]
61
61
 
62
- if cert != issuer_cert then # not self-signed cert
62
+ if cert != issuer_cert # not self-signed cert
63
63
  cert.add_extension ef.create_extension('authorityKeyIdentifier', 'keyid:always')
64
64
  end
65
65
 
66
- if is_ca then
66
+ if is_ca
67
67
  cert.add_extension ef.create_extension('basicConstraints', 'CA:TRUE', true)
68
68
  cert.add_extension ef.create_extension('keyUsage', 'keyCertSign', true)
69
69
  end
@@ -79,7 +79,7 @@ class CertificateBuilder
79
79
  OpenSSL::PKey::RSA.new @key_size
80
80
  end
81
81
 
82
- def create_keys names
82
+ def create_keys(names)
83
83
  keys = {}
84
84
 
85
85
  names.each do |name|
@@ -95,8 +95,8 @@ class CertificateBuilder
95
95
  serial
96
96
  end
97
97
 
98
- def validity_for time
99
- if time == :end_of_time then
98
+ def validity_for(time)
99
+ if time == :end_of_time
100
100
  validity = @end_of_time
101
101
  validity_32 = @end_of_time_32
102
102
  else
@@ -169,4 +169,3 @@ certs.each do |name, (cert, cert_32)|
169
169
  dest = File.join base_dir, "#{name}_cert_32.pem"
170
170
  File.write dest, cert_32.to_pem
171
171
  end
172
-
@@ -14,4 +14,3 @@ encrypted_key_path = File.expand_path encrypted_key_path, __FILE__
14
14
  open encrypted_key_path, 'w' do |io|
15
15
  io.write key.to_pem cipher, 'Foo bar'
16
16
  end
17
-
@@ -50,7 +50,7 @@ sh("git", "checkout", branch)
50
50
  sh("git", "submodule", "update", "--init", "--recursive")
51
51
 
52
52
  commits = `git log --oneline origin/master --`.split("\n").map {|l| l.split(/\s/, 2) }.reverse
53
- commits.select! {|_sha, message| message =~ /(Auto merge of|Merge pull request) ##{Regexp.union(*prs)}/ }
53
+ commits.select! {|_sha, message| message =~ /(Auto merge of|Merge pull request|Merge) ##{Regexp.union(*prs)}/ }
54
54
 
55
55
  unless system("git", "cherry-pick", "-x", "-m", "1", *commits.map(&:first))
56
56
  abort unless system("zsh")
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ begin
5
+ load Gem.bin_path("rubocop", "rubocop", "~> 0.60.0")
6
+ rescue Gem::GemNotFoundException
7
+ abort "Install the rubocop gem (~> 0.60.0) to run a static analysis"
8
+ end
@@ -5,17 +5,19 @@ require 'fileutils'
5
5
 
6
6
  URIS = [
7
7
  URI('https://rubygems.org'),
8
- URI('https://www.rubygems.org'),
9
8
  URI('https://index.rubygems.org'),
10
9
  URI('https://staging.rubygems.org'),
11
- ]
10
+ URI('https://fastly.rubygems.org'),
11
+ URI('https://rubygems.global.ssl.fastly.net'),
12
+ ].freeze
12
13
 
13
14
  HOSTNAMES_TO_MAP = [
15
+ 'rubygems.global.ssl.fastly.net',
14
16
  'rubygems.org',
15
17
  'index.rubygems.org'
16
- ]
18
+ ].freeze
17
19
 
18
- def connect_to uri, store
20
+ def connect_to(uri, store)
19
21
  # None of the URIs are IPv6, so URI::Generic#hostname(ruby 1.9.3+) isn't needed
20
22
  http = Net::HTTP.new uri.host, uri.port
21
23
 
@@ -31,7 +33,7 @@ rescue OpenSSL::SSL::SSLError
31
33
  false
32
34
  end
33
35
 
34
- def load_certificates io
36
+ def load_certificates(io)
35
37
  cert_texts =
36
38
  io.read.scan(/^-{5}BEGIN CERTIFICATE-{5}.*?^-{5}END CERTIFICATE-{5}/m)
37
39
 
@@ -40,13 +42,13 @@ def load_certificates io
40
42
  end
41
43
  end
42
44
 
43
- def show_certificates certificates
45
+ def show_certificates(certificates)
44
46
  certificates.each do |certificate|
45
47
  p certificate.subject.to_a
46
48
  end
47
49
  end
48
50
 
49
- def store_for certificates
51
+ def store_for(certificates)
50
52
  store = OpenSSL::X509::Store.new
51
53
  certificates.each do |certificate|
52
54
  store.add_cert certificate
@@ -55,13 +57,13 @@ def store_for certificates
55
57
  store
56
58
  end
57
59
 
58
- def test_certificates certificates, uri
60
+ def test_certificates(certificates, uri)
59
61
  1.upto certificates.length do |n|
60
62
  puts "combinations of #{n} certificates"
61
63
  certificates.combination(n).each do |combination|
62
64
  match = test_uri uri, combination
63
65
 
64
- if match then
66
+ if match
65
67
  $needed_combinations << match
66
68
  puts
67
69
  puts match.map { |certificate| certificate.subject }
@@ -74,7 +76,7 @@ def test_certificates certificates, uri
74
76
  end
75
77
  end
76
78
 
77
- def test_uri uri, certificates
79
+ def test_uri(uri, certificates)
78
80
  store = store_for certificates
79
81
 
80
82
  verified = connect_to uri, store
@@ -84,7 +86,7 @@ def test_uri uri, certificates
84
86
  nil
85
87
  end
86
88
 
87
- def hostname_certificate_mapping certificates
89
+ def hostname_certificate_mapping(certificates)
88
90
  mapping = {}
89
91
  HOSTNAMES_TO_MAP.each do |hostname|
90
92
  uri = URI("https://#{hostname}")
@@ -96,7 +98,7 @@ def hostname_certificate_mapping certificates
96
98
  mapping
97
99
  end
98
100
 
99
- def write_certificates certificates
101
+ def write_certificates(certificates)
100
102
  mapping = hostname_certificate_mapping(certificates)
101
103
  mapping.each do |hostname, certificate|
102
104
  subject = certificate.subject.to_a
@@ -115,7 +117,7 @@ def write_certificates certificates
115
117
  end
116
118
 
117
119
  io =
118
- if ARGV.empty? then
120
+ if ARGV.empty?
119
121
  open OpenSSL::X509::DEFAULT_CERT_FILE
120
122
  else
121
123
  ARGF
@@ -135,4 +137,3 @@ end
135
137
  needed = $needed_combinations.flatten.uniq
136
138
 
137
139
  write_certificates needed
138
-
@@ -52,7 +52,7 @@ history = File.read(File.expand_path('../../History.txt', __FILE__))
52
52
 
53
53
  File.open(File.expand_path('../../ChangeLog', __FILE__), 'w') do |changelog|
54
54
  commits = `git log --oneline v#{Gem::VERSION}..#{branch}`.split("\n")
55
- prs = commits.reverse_each.map { |c| c =~ /(Auto merge of|Merge pull request) #(\d+)/ && $2 }.compact
55
+ prs = commits.reverse_each.map { |c| c =~ /(Auto merge of|Merge pull request|Merge) #(\d+)/ && $2 }.compact.uniq.sort!
56
56
  prs.each do |pr|
57
57
  next if history =~ /Pull\srequest\s##{pr}/m
58
58
  details = github_api "/repos/rubygems/rubygems/pulls/#{pr}"
metadata CHANGED
@@ -1,16 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-update
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.11
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
8
8
  - Chad Fowler
9
9
  - Eric Hodel
10
- autorequire:
10
+ - Luis Lavena
11
+ - Aaron Patterson
12
+ - Samuel Giddins
13
+ - André Arko
14
+ - Evan Phoenix
15
+ - Hiroshi SHIBATA
16
+ autorequire:
11
17
  bindir: bin
12
18
  cert_chain: []
13
- date: 2020-12-09 00:00:00.000000000 Z
19
+ date: 2018-12-19 00:00:00.000000000 Z
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: builder
@@ -18,118 +24,115 @@ dependencies:
18
24
  requirements:
19
25
  - - "~>"
20
26
  - !ruby/object:Gem::Version
21
- version: '2.1'
27
+ version: '3.0'
22
28
  type: :development
23
29
  prerelease: false
24
30
  version_requirements: !ruby/object:Gem::Requirement
25
31
  requirements:
26
32
  - - "~>"
27
33
  - !ruby/object:Gem::Version
28
- version: '2.1'
29
- - !ruby/object:Gem::Dependency
30
- name: hoe-seattlerb
31
- requirement: !ruby/object:Gem::Requirement
32
- requirements:
33
- - - "~>"
34
- - !ruby/object:Gem::Version
35
- version: '1.2'
36
- type: :development
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: '1.2'
34
+ version: '3.0'
43
35
  - !ruby/object:Gem::Dependency
44
36
  name: rdoc
45
37
  requirement: !ruby/object:Gem::Requirement
46
38
  requirements:
47
39
  - - "~>"
48
40
  - !ruby/object:Gem::Version
49
- version: '4.0'
41
+ version: '6.0'
50
42
  type: :development
51
43
  prerelease: false
52
44
  version_requirements: !ruby/object:Gem::Requirement
53
45
  requirements:
54
46
  - - "~>"
55
47
  - !ruby/object:Gem::Version
56
- version: '4.0'
48
+ version: '6.0'
57
49
  - !ruby/object:Gem::Dependency
58
- name: ZenTest
50
+ name: rake
59
51
  requirement: !ruby/object:Gem::Requirement
60
52
  requirements:
61
53
  - - "~>"
62
54
  - !ruby/object:Gem::Version
63
- version: '4.5'
55
+ version: '12.0'
64
56
  type: :development
65
57
  prerelease: false
66
58
  version_requirements: !ruby/object:Gem::Requirement
67
59
  requirements:
68
60
  - - "~>"
69
61
  - !ruby/object:Gem::Version
70
- version: '4.5'
62
+ version: '12.0'
71
63
  - !ruby/object:Gem::Dependency
72
- name: rake
64
+ name: minitest
73
65
  requirement: !ruby/object:Gem::Requirement
74
66
  requirements:
75
67
  - - "~>"
76
68
  - !ruby/object:Gem::Version
77
- version: '10.5'
69
+ version: '5.0'
78
70
  type: :development
79
71
  prerelease: false
80
72
  version_requirements: !ruby/object:Gem::Requirement
81
73
  requirements:
82
74
  - - "~>"
83
75
  - !ruby/object:Gem::Version
84
- version: '10.5'
76
+ version: '5.0'
85
77
  - !ruby/object:Gem::Dependency
86
- name: minitest
78
+ name: simplecov
87
79
  requirement: !ruby/object:Gem::Requirement
88
80
  requirements:
89
81
  - - "~>"
90
82
  - !ruby/object:Gem::Version
91
- version: '4.0'
83
+ version: '0'
92
84
  type: :development
93
85
  prerelease: false
94
86
  version_requirements: !ruby/object:Gem::Requirement
95
87
  requirements:
96
88
  - - "~>"
97
89
  - !ruby/object:Gem::Version
98
- version: '4.0'
90
+ version: '0'
99
91
  - !ruby/object:Gem::Dependency
100
- name: hoe
92
+ name: rubocop
101
93
  requirement: !ruby/object:Gem::Requirement
102
94
  requirements:
103
95
  - - "~>"
104
96
  - !ruby/object:Gem::Version
105
- version: '3.15'
97
+ version: 0.60.0
106
98
  type: :development
107
99
  prerelease: false
108
100
  version_requirements: !ruby/object:Gem::Requirement
109
101
  requirements:
110
102
  - - "~>"
111
103
  - !ruby/object:Gem::Version
112
- version: '3.15'
113
- description: ''
104
+ version: 0.60.0
105
+ description: |-
106
+ A package (also known as a library) contains a set of functionality
107
+ that can be invoked by a Ruby program, such as reading and parsing an XML file. We call
108
+ these packages 'gems' and RubyGems is a tool to install, create, manage and load these
109
+ packages in your Ruby environment. RubyGems is also a client for RubyGems.org, a public
110
+ repository of Gems that allows you to publish a Gem that can be shared and used by other
111
+ developers. See our guide on publishing a Gem at guides.rubygems.org
114
112
  email:
115
- - rubygems-developers@rubyforge.org
113
+ - ''
114
+ - ''
115
+ - drbrain@segment7.net
116
+ - luislavena@gmail.com
117
+ - aaron@tenderlovemaking.com
118
+ - segiddins@segiddins.me
119
+ - andre@arko.net
120
+ - evan@phx.io
121
+ - hsbt@ruby-lang.org
116
122
  executables:
117
123
  - update_rubygems
118
124
  extensions: []
119
125
  extra_rdoc_files:
120
- - CODE_OF_CONDUCT.md
121
- - CONTRIBUTING.rdoc
122
- - CVE-2013-4287.txt
123
- - CVE-2013-4363.txt
124
- - CVE-2015-3900.txt
125
126
  - History.txt
126
127
  - LICENSE.txt
127
128
  - MAINTAINERS.txt
128
129
  - MIT.txt
129
130
  - Manifest.txt
130
- - POLICIES.rdoc
131
131
  - README.md
132
- - UPGRADING.rdoc
132
+ - UPGRADING.md
133
+ - POLICIES.md
134
+ - CODE_OF_CONDUCT.md
135
+ - CONTRIBUTING.md
133
136
  - bundler/CHANGELOG.md
134
137
  - bundler/CODE_OF_CONDUCT.md
135
138
  - bundler/CONTRIBUTING.md
@@ -137,23 +140,19 @@ extra_rdoc_files:
137
140
  - bundler/README.md
138
141
  - hide_lib_for_update/note.txt
139
142
  files:
140
- - ".autotest"
141
- - ".document"
143
+ - ".rubocop.yml"
142
144
  - ".travis.yml"
143
145
  - CODE_OF_CONDUCT.md
144
- - CONTRIBUTING.rdoc
145
- - CVE-2013-4287.txt
146
- - CVE-2013-4363.txt
147
- - CVE-2015-3900.txt
146
+ - CONTRIBUTING.md
148
147
  - History.txt
149
148
  - LICENSE.txt
150
149
  - MAINTAINERS.txt
151
150
  - MIT.txt
152
151
  - Manifest.txt
153
- - POLICIES.rdoc
152
+ - POLICIES.md
154
153
  - README.md
155
154
  - Rakefile
156
- - UPGRADING.rdoc
155
+ - UPGRADING.md
157
156
  - appveyor.yml
158
157
  - bin/gem
159
158
  - bin/update_rubygems
@@ -194,6 +193,7 @@ files:
194
193
  - bundler/lib/bundler/cli/platform.rb
195
194
  - bundler/lib/bundler/cli/plugin.rb
196
195
  - bundler/lib/bundler/cli/pristine.rb
196
+ - bundler/lib/bundler/cli/remove.rb
197
197
  - bundler/lib/bundler/cli/show.rb
198
198
  - bundler/lib/bundler/cli/update.rb
199
199
  - bundler/lib/bundler/cli/viz.rb
@@ -244,6 +244,7 @@ files:
244
244
  - bundler/lib/bundler/plugin/api.rb
245
245
  - bundler/lib/bundler/plugin/api/source.rb
246
246
  - bundler/lib/bundler/plugin/dsl.rb
247
+ - bundler/lib/bundler/plugin/events.rb
247
248
  - bundler/lib/bundler/plugin/index.rb
248
249
  - bundler/lib/bundler/plugin/installer.rb
249
250
  - bundler/lib/bundler/plugin/installer/git.rb
@@ -400,6 +401,7 @@ files:
400
401
  - bundler/man/bundle-package.ronn
401
402
  - bundler/man/bundle-platform.ronn
402
403
  - bundler/man/bundle-pristine.ronn
404
+ - bundler/man/bundle-remove.ronn
403
405
  - bundler/man/bundle-show.ronn
404
406
  - bundler/man/bundle-update.ronn
405
407
  - bundler/man/bundle-viz.ronn
@@ -422,6 +424,7 @@ files:
422
424
  - lib/rubygems/commands/fetch_command.rb
423
425
  - lib/rubygems/commands/generate_index_command.rb
424
426
  - lib/rubygems/commands/help_command.rb
427
+ - lib/rubygems/commands/info_command.rb
425
428
  - lib/rubygems/commands/install_command.rb
426
429
  - lib/rubygems/commands/list_command.rb
427
430
  - lib/rubygems/commands/lock_command.rb
@@ -450,6 +453,7 @@ files:
450
453
  - lib/rubygems/config_file.rb
451
454
  - lib/rubygems/core_ext/kernel_gem.rb
452
455
  - lib/rubygems/core_ext/kernel_require.rb
456
+ - lib/rubygems/core_ext/kernel_warn.rb
453
457
  - lib/rubygems/defaults.rb
454
458
  - lib/rubygems/dependency.rb
455
459
  - lib/rubygems/dependency_installer.rb
@@ -571,9 +575,11 @@ files:
571
575
  - lib/rubygems/source_specific_file.rb
572
576
  - lib/rubygems/spec_fetcher.rb
573
577
  - lib/rubygems/specification.rb
578
+ - lib/rubygems/specification_policy.rb
574
579
  - lib/rubygems/ssl_certs/.document
575
- - lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem
576
- - lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
580
+ - lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem
581
+ - lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem
582
+ - lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem
577
583
  - lib/rubygems/stub_specification.rb
578
584
  - lib/rubygems/syck_hack.rb
579
585
  - lib/rubygems/test_case.rb
@@ -589,6 +595,7 @@ files:
589
595
  - lib/rubygems/version.rb
590
596
  - lib/rubygems/version_option.rb
591
597
  - lib/ubygems.rb
598
+ - rubygems-update.gemspec
592
599
  - setup.rb
593
600
  - test/rubygems/alternate_cert.pem
594
601
  - test/rubygems/alternate_cert_32.pem
@@ -606,7 +613,6 @@ files:
606
613
  - test/rubygems/encrypted_private_key.pem
607
614
  - test/rubygems/expired_cert.pem
608
615
  - test/rubygems/fake_certlib/openssl.rb
609
- - test/rubygems/fix_openssl_warnings.rb
610
616
  - test/rubygems/foo/discover.rb
611
617
  - test/rubygems/future_cert.pem
612
618
  - test/rubygems/future_cert_32.pem
@@ -658,6 +664,7 @@ files:
658
664
  - test/rubygems/test_gem_commands_fetch_command.rb
659
665
  - test/rubygems/test_gem_commands_generate_index_command.rb
660
666
  - test/rubygems/test_gem_commands_help_command.rb
667
+ - test/rubygems/test_gem_commands_info_command.rb
661
668
  - test/rubygems/test_gem_commands_install_command.rb
662
669
  - test/rubygems/test_gem_commands_list_command.rb
663
670
  - test/rubygems/test_gem_commands_lock_command.rb
@@ -778,6 +785,7 @@ files:
778
785
  - util/create_encrypted_key.rb
779
786
  - util/generate_spdx_license_list.rb
780
787
  - util/patch_with_prs.rb
788
+ - util/rubocop
781
789
  - util/update_bundled_ca_certificates.rb
782
790
  - util/update_changelog.rb
783
791
  homepage: https://rubygems.org
@@ -785,7 +793,7 @@ licenses:
785
793
  - Ruby
786
794
  - MIT
787
795
  metadata: {}
788
- post_install_message:
796
+ post_install_message:
789
797
  rdoc_options:
790
798
  - "--main"
791
799
  - README.md
@@ -796,16 +804,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
796
804
  requirements:
797
805
  - - ">="
798
806
  - !ruby/object:Gem::Version
799
- version: 1.8.7
807
+ version: 2.3.0
800
808
  required_rubygems_version: !ruby/object:Gem::Requirement
801
809
  requirements:
802
810
  - - ">="
803
811
  - !ruby/object:Gem::Version
804
812
  version: '0'
805
813
  requirements: []
806
- rubyforge_project:
807
- rubygems_version: 2.7.6.2
808
- signing_key:
814
+ rubyforge_project:
815
+ rubygems_version: 2.7.6
816
+ signing_key:
809
817
  specification_version: 4
810
- summary: ''
818
+ summary: RubyGems is a package management framework for Ruby.
811
819
  test_files: []