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
@@ -1,57 +1,56 @@
1
- = How to upgrade/downgrade Rubygems:
1
+ # How to upgrade/downgrade Rubygems:
2
2
 
3
- == For RubyGems 1.5.0 and 1.5.1:
3
+ ## For RubyGems 1.5.0 and 1.5.1:
4
4
 
5
- RubyGems 1.5.0 and 1.5.1 shipped with a broken <tt>gem update --system</tt>.
6
- You will need to use the Manual Upgrade Recipe below.
5
+ RubyGems 1.5.0 and 1.5.1 shipped with a broken `gem update --system`. You will
6
+ need to use the Manual Upgrade Recipe below.
7
7
 
8
- == On Ruby 1.9.x:
8
+ ## On Ruby 1.9.x:
9
9
 
10
- === From stock ruby shipping with 1.9:
10
+ ### From stock ruby shipping with 1.9:
11
11
 
12
12
  Use the Normal Upgrade Method below. (finally!)
13
13
 
14
- == On Ruby 1.8.x:
14
+ ## On Ruby 1.8.x:
15
15
 
16
- === From rubygems 1.3.x:
16
+ ### From rubygems 1.3.x:
17
17
 
18
18
  Use the Normal Upgrade Recipe below.
19
19
 
20
- === From rubygems 1-1.x through 1.2.x:
20
+ ### From rubygems 1-1.x through 1.2.x:
21
21
 
22
- RubyGems 1.1 and 1.2 have problems upgrading when there is no
23
- rubygems-update installed. You will need to use the following
24
- instructions if you see "Nothing to update".
22
+ RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update
23
+ installed. You will need to use the following instructions if you see "Nothing
24
+ to update".
25
25
 
26
26
  Use the Manual Upgrade Recipe below.
27
27
 
28
- === From rubygems < 1.1.x:
28
+ ### From rubygems < 1.1.x:
29
29
 
30
30
  Use the Normal Upgrade Recipe below.
31
31
 
32
- == Downgrade Recipe
32
+ ## Downgrade Recipe
33
33
 
34
- === Normal Downgrade
34
+ ### Normal Downgrade
35
35
 
36
- ==== With rubygems 1.5.2 and higher:
36
+ #### With rubygems 1.5.2 and higher:
37
37
 
38
38
  $ gem update --system 1.3.7
39
39
 
40
- ==== With rubygems 1.5.1 and lower:
40
+ #### With rubygems 1.5.1 and lower:
41
41
 
42
42
  Use sudo/su as appropriate:
43
43
 
44
44
  $ gem install rubygems-update -v 1.3.7
45
45
  $ update_rubygems _1.3.7_
46
46
 
47
- Replace 1.3.7 with whatever version you want to downgrade to. This
48
- recipe can also be used to upgrade to a specific version instead of
49
- the latest.
47
+ Replace 1.3.7 with whatever version you want to downgrade to. This recipe can
48
+ also be used to upgrade to a specific version instead of the latest.
50
49
 
51
50
  Do make sure that you don't have any other versions of rubygems-update
52
51
  installed when you run the second command.
53
52
 
54
- === 1.9.2 Downgrade from Rubygems 1.4.x+ to stock 1.9 rubygems:
53
+ ### 1.9.2 Downgrade from Rubygems 1.4.x+ to stock 1.9 rubygems:
55
54
 
56
55
  Use sudo/su as appropriate:
57
56
 
@@ -62,31 +61,31 @@ Use sudo/su as appropriate:
62
61
  $ gem -v
63
62
  1.3.7
64
63
 
65
- == Upgrade Recipes
64
+ ## Upgrade Recipes
66
65
 
67
- === Normal Upgrade
66
+ ### Normal Upgrade
68
67
 
69
68
  Use sudo/su as appropriate:
70
69
 
71
70
  $ gem update --system
72
71
 
73
- === Manual Upgrade
72
+ ### Manual Upgrade
74
73
 
75
- If you have an older version of RubyGems installed, then you can still
76
- do it in two steps:
74
+ If you have an older version of RubyGems installed, then you can still do it
75
+ in two steps:
77
76
 
78
77
  Use sudo/su as appropriate:
79
78
 
80
79
  $ gem install rubygems-update
81
80
  $ update_rubygems
82
81
 
83
- === Manual Install
82
+ ### Manual Install
84
83
 
85
- If you don't have any RubyGems install, there is still the pre-gem
86
- approach to getting software, doing it manually:
84
+ If you don't have any RubyGems install, there is still the pre-gem approach to
85
+ getting software, doing it manually:
87
86
 
88
87
  Use sudo/su as appropriate:
89
88
 
90
- * Download from: https://rubygems.org/pages/download
91
- * Unpack into a directory and cd there
92
- * Install with: ruby setup.rb
89
+ * Download from: https://rubygems.org/pages/download
90
+ * Unpack into a directory and cd there
91
+ * Install with: ruby setup.rb
@@ -7,62 +7,37 @@ branches:
7
7
  skip_tags: true
8
8
  clone_depth: 10
9
9
 
10
- init:
11
- - mklink /d C:\git "C:\Program Files\Git"
12
- - if %ruby_version%==_trunk (
13
- appveyor DownloadFile https://ci.appveyor.com/api/projects/MSP-Greg/ruby-loco/artifacts/ruby_trunk.7z -FileName C:\ruby_trunk.7z &
14
- 7z x C:\ruby_trunk.7z -oC:\ruby_trunk )
15
-
16
10
  environment:
17
- PATH: C:/ruby%ruby_version%/bin;C:/Program Files/7-Zip;C:/Program Files/AppVeyor/BuildAgent;C:/git/cmd;C:/Program Files (x86)/GNU/GnuPG/pub;C:/Windows/system32;C:\Windows;
18
- WINDIR: C:\Windows
19
11
  matrix:
20
- - ruby_version: 193
21
- - ruby_version: 200
22
- - ruby_version: 200-x64
23
- - ruby_version: 21
24
- - ruby_version: 21-x64
25
- - ruby_version: 22
26
- - ruby_version: 22-x64
27
12
  - ruby_version: 23-x64
28
- GIT: C:/git/cmd/git.exe
29
13
  - ruby_version: 24-x64
30
- GIT: C:/git/cmd/git.exe
14
+ - ruby_version: 25-x64
31
15
  - ruby_version: _trunk
32
- GIT: C:/git/cmd/git.exe
33
16
 
34
- matrix:
35
- allow_failures:
36
- - ruby_version: _trunk
17
+ init:
18
+ - set PATH=C:/Ruby%ruby_version%/bin;C:/Program Files/7-Zip;C:/Program Files/AppVeyor/BuildAgent;C:/git/cmd;C:/Program Files (x86)/GNU/GnuPG/pub;C:/Windows/system32;C:\Windows;
19
+ - mklink /j C:\git "C:\Program Files\Git"
20
+ - set GIT=C:/git/cmd/git.exe
21
+ - ps: >-
22
+ if ($env:ruby_version -eq '_trunk') {
23
+ $trunk_uri = 'https://ci.appveyor.com/api/projects/MSP-Greg/ruby-loco/artifacts/ruby_trunk.7z'
24
+ (New-Object Net.WebClient).DownloadFile($trunk_uri, 'C:\ruby_trunk.7z')
25
+ 7z.exe x C:\ruby_trunk.7z -oC:\Ruby_trunk
26
+ }
37
27
 
38
28
  install:
39
- - ps: >-
40
- git submodule update --init --recursive
41
-
42
- $env:path = 'C:\Ruby' + $env:ruby_version + '\bin;' + $env:path
43
-
44
- if ((gem query -i rake) -eq $False){ gem install rake --no-document }
29
+ - git submodule update --init --recursive
30
+ - gem install "rake:>=10.4.2" "minitest:>=5.4.3" --conservative --no-document
45
31
 
46
- if ((gem query -i hoe) -eq $False){ gem install hoe --no-document }
47
-
48
- gem install minitest -v "~> 4.7" --no-document
32
+ test_script:
33
+ - rake test
49
34
 
50
- ruby -v
35
+ on_finish:
36
+ - ruby -v
51
37
 
52
- cache:
53
- - C:\Ruby193\lib\ruby\gems\1.9.1
54
- - C:\Ruby200\lib\ruby\gems\2.0.0
55
- - C:\Ruby200-x64\lib\ruby\gems\2.0.0
56
- - C:\Ruby21\lib\ruby\gems\2.1.0
57
- - C:\Ruby21-x64\lib\ruby\gems\2.1.0
58
- - C:\Ruby22\lib\ruby\gems\2.2.0
59
- - C:\Ruby22-x64\lib\ruby\gems\2.2.0
60
- - C:\Ruby23-x64\lib\ruby\gems\2.3.0
61
- - C:\Ruby24-x64\lib\ruby\gems\2.4.0
38
+ matrix:
39
+ allow_failures:
40
+ - ruby_version: _trunk
62
41
 
63
42
  build: off
64
- test_script:
65
- - rake -rdevkit test
66
- on_finish:
67
- - ruby -v
68
43
  deploy: off
data/bin/gem CHANGED
@@ -11,7 +11,7 @@ require 'rubygems/exceptions'
11
11
 
12
12
  required_version = Gem::Requirement.new ">= 1.8.7"
13
13
 
14
- unless required_version.satisfied_by? Gem.ruby_version then
14
+ unless required_version.satisfied_by? Gem.ruby_version
15
15
  abort "Expected Ruby version #{required_version}, is #{Gem.ruby_version}"
16
16
  end
17
17
 
@@ -22,4 +22,3 @@ begin
22
22
  rescue Gem::SystemExitException => e
23
23
  exit e.exit_code
24
24
  end
25
-
@@ -7,7 +7,7 @@
7
7
 
8
8
  require 'rubygems'
9
9
 
10
- if ARGV.include? '-h' or ARGV.include? '--help' then
10
+ if ARGV.include? '-h' or ARGV.include? '--help'
11
11
  $stderr.puts "rubygems_update [options]"
12
12
  $stderr.puts
13
13
  $stderr.puts "This will install the latest version of RubyGems."
@@ -16,7 +16,7 @@ if ARGV.include? '-h' or ARGV.include? '--help' then
16
16
  exit
17
17
  end
18
18
 
19
- unless ARGV.grep(/--version=([\d\.]*)/).empty? then
19
+ unless ARGV.grep(/--version=([\d\.]*)/).empty?
20
20
  exec Gem.ruby, '-S', $PROGRAM_NAME, "_#{$1}_"
21
21
  end
22
22
 
@@ -34,4 +34,3 @@ else
34
34
  ENV["GEM_PREV_VER"] = Gem::VERSION
35
35
  system(Gem.ruby, 'setup.rb', *ARGV)
36
36
  end
37
-
@@ -1,3 +1,57 @@
1
+ ## 1.17.2 (2018-12-11)
2
+
3
+ - Add compatibility for bundler merge with Ruby 2.6
4
+
5
+ ## 1.17.1 (2018-10-25)
6
+
7
+ - Convert `Pathname`s to `String`s before sorting them, fixing #6760 and #6758 ([#6761](https://github.com/bundler/bundler/pull/6761), @alexggordon)
8
+
9
+ ## 1.17.0 (2018-10-25)
10
+
11
+ No new changes.
12
+
13
+ ## 1.17.0.pre.2 (2018-10-13)
14
+
15
+ Features:
16
+
17
+ - Configure Bundler home, cache, config and plugin directories with `BUNDLE_USER_HOME`, `BUNDLE_USER_CACHE`, `BUNDLE_USER_CONFIG` and `BUNDLE_USER_PLUGIN` env vars ([#4333](https://github.com/bundler/bundler/issues/4333), @gwerbin)
18
+ - Add `--all` option to `bundle binstubs` that will generate an executable file for all gems with commands in the bundle
19
+ - Add `bundle remove` command to remove gems from the Gemfile via the CLI
20
+ - Improve checking file permissions and asking for `sudo` in Bundler when it doesn't need to
21
+ - Add error message to `bundle add` to check adding duplicate gems to the Gemfile
22
+ - When asking for `sudo`, Bundler will show a list of folders/files that require elevated permissions to write to.
23
+
24
+ The following new features are available but are not enabled by default. These are intended to be tested by users for the upcoming release of Bundler 2.
25
+
26
+ - Improve deprecation warning message for `bundle show` command
27
+ - Improve deprecation warning message for the `--force` option in `bundle install`
28
+
29
+ ## 1.17.0.pre.1 (2018-09-24)
30
+
31
+ Features:
32
+
33
+ - Check folder/file permissions of the Bundle home directory in the `bundle doctor` command ([#5786](https://github.com/bundler/bundler/issues/5786), @ajwann)
34
+ - Remove compiled gem extensions when running `bundle clean` ([#5596](https://github.com/bundler/bundler/issues/5596), @akhramov)
35
+ - Add `--paths` option to `bundle list` command ([#6172](https://github.com/bundler/bundler/issues/6172), @colby-swandale)
36
+ - Add base error class to gems generated from `bundle gem` ([#6260](https://github.com/bundler/bundler/issues/6260), @christhekeele)
37
+ - Correctly re-install gem extensions with a git source when running `bundle pristine` ([#6294](https://github.com/bundler/bundler/issues/6294), @wagenet)
38
+ - Add config option to disable platform warnings ([#6124](https://github.com/bundler/bundler/issues/6124), @agrim123)
39
+ - Add `--skip-install` option to `bundle add` command to add gems to the Gemfile without installation ([#6511](https://github.com/bundler/bundler/issues/6511), @agrim123)
40
+ - Add `--only-explicit` option to `bundle outdated` to list only outdated gems in the Gemfile ([#5366](https://github.com/bundler/bundler/issues/5366), @peret)
41
+ - Support adding multiple gems to the Gemfile with `bundle add` ([#6543](https://github.com/bundler/bundler/issues/6543), @agrim123)
42
+ - Make registered plugin events easier to manage in the Plugin API (@jules2689)
43
+ - Add new gem install hooks to the Plugin API (@jules2689)
44
+ - Add `--optimistic` and `--strict` options to `bundle add` ([#6553](https://github.com/bundler/bundler/issues/6553), @agrim123)
45
+ - Add `--without-group` and `--only-group` options to `bundle list` ([#6564](https://github.com/bundler/bundler/issues/6564), @agrim123)
46
+ - Add `--gemfile` option to the `bundle exec` command ([#5924](https://github.com/bundler/bundler/issues/5924), @ankitkataria)
47
+
48
+ The following new features are available but are not enabled by default. These are intended to be tested by users for the upcoming release of Bundler 2.
49
+
50
+ - Make `install --path` relative to the current working directory ([#2048](https://github.com/bundler/bundler/issues/2048), @igorbozato)
51
+ - Auto-configure job count ([#5808](https://github.com/bundler/bundler/issues/5808), @segiddins)
52
+ - Use the Gem Version Promoter for major gem updates ([#5993](https://github.com/bundler/bundler/issues/5993), @segiddins)
53
+ - Add config option to add the Ruby scope to `bundle config path` when configured globally (@segiddins)
54
+
1
55
  ## 1.16.6 (2018-10-05)
2
56
 
3
57
  Changes:
@@ -1,7 +1,13 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require File.expand_path("../lib/bundler/version", __FILE__)
4
+ begin
5
+ require File.expand_path("../lib/bundler/version", __FILE__)
6
+ rescue LoadError
7
+ # for Ruby core repository
8
+ require File.expand_path("../bundler/version", __FILE__)
9
+ end
10
+
5
11
  require "shellwords"
6
12
 
7
13
  Gem::Specification.new do |s|
@@ -195,8 +195,26 @@ module Bundler
195
195
  raise e.exception("#{warning}\nBundler also failed to create a temporary home directory at `#{path}':\n#{e}")
196
196
  end
197
197
 
198
- def user_bundle_path
199
- Pathname.new(user_home).join(".bundle")
198
+ def user_bundle_path(dir = "home")
199
+ env_var, fallback = case dir
200
+ when "home"
201
+ ["BUNDLE_USER_HOME", Pathname.new(user_home).join(".bundle")]
202
+ when "cache"
203
+ ["BUNDLE_USER_CACHE", user_bundle_path.join("cache")]
204
+ when "config"
205
+ ["BUNDLE_USER_CONFIG", user_bundle_path.join("config")]
206
+ when "plugin"
207
+ ["BUNDLE_USER_PLUGIN", user_bundle_path.join("plugin")]
208
+ else
209
+ raise BundlerError, "Unknown user path requested: #{dir}"
210
+ end
211
+ # `fallback` will already be a Pathname, but Pathname.new() is
212
+ # idempotent so it's OK
213
+ Pathname.new(ENV.fetch(env_var, fallback))
214
+ end
215
+
216
+ def user_cache
217
+ user_bundle_path("cache")
200
218
  end
201
219
 
202
220
  def home
@@ -211,10 +229,6 @@ module Bundler
211
229
  bundle_path.join("specifications")
212
230
  end
213
231
 
214
- def user_cache
215
- user_bundle_path.join("cache")
216
- end
217
-
218
232
  def root
219
233
  @root ||= begin
220
234
  SharedHelpers.root
@@ -353,8 +367,12 @@ EOF
353
367
  bin_dir = bin_dir.parent until bin_dir.exist?
354
368
 
355
369
  # if any directory is not writable, we need sudo
356
- files = [path, bin_dir] | Dir[path.join("build_info/*").to_s] | Dir[path.join("*").to_s]
357
- sudo_needed = files.any? {|f| !File.writable?(f) }
370
+ files = [path, bin_dir] | Dir[bundle_path.join("build_info/*").to_s] | Dir[bundle_path.join("*").to_s]
371
+ unwritable_files = files.reject {|f| File.writable?(f) }
372
+ sudo_needed = !unwritable_files.empty?
373
+ if sudo_needed
374
+ Bundler.ui.warn "Following files may not be writable, so sudo is needed:\n #{unwritable_files.map(&:to_s).sort.join("\n ")}"
375
+ end
358
376
  end
359
377
 
360
378
  @requires_sudo_ran = true
@@ -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 = "2020-12-09".freeze
8
- @git_commit_sha = "8a789f00bf".freeze
7
+ @built_at = "2018-12-19".freeze
8
+ @git_commit_sha = "3fc4de72b".freeze
9
9
  @release = false
10
10
  # end ivars
11
11
 
@@ -166,6 +166,17 @@ module Bundler
166
166
  Check.new(options).run
167
167
  end
168
168
 
169
+ desc "remove [GEM [GEM ...]]", "Removes gems from the Gemfile"
170
+ long_desc <<-D
171
+ Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If the gem is not found, Bundler prints a error message and if gem could not be removed due to any reason Bundler will display a warning.
172
+ D
173
+ method_option "install", :type => :boolean, :banner =>
174
+ "Runs 'bundle install' after removing the gems from the Gemfile"
175
+ def remove(*gems)
176
+ require "bundler/cli/remove"
177
+ Remove.new(gems, options).run
178
+ end
179
+
169
180
  desc "install [OPTIONS]", "Install the current environment to the system"
170
181
  long_desc <<-D
171
182
  Install will install all of the gems in the current bundle, making them available
@@ -195,8 +206,7 @@ module Bundler
195
206
  "Do not attempt to fetch gems remotely and use the gem cache instead"
196
207
  deprecated_option "no-cache", :type => :boolean, :banner =>
197
208
  "Don't update the existing gem cache."
198
- method_option "redownload", :type => :boolean, :aliases =>
199
- [Bundler.feature_flag.forget_cli_options? ? nil : "--force"].compact, :banner =>
209
+ method_option "redownload", :type => :boolean, :aliases => "--force", :banner =>
200
210
  "Force downloading every gem."
201
211
  deprecated_option "no-prune", :type => :boolean, :banner =>
202
212
  "Don't remove stale gems from the cache."
@@ -219,6 +229,7 @@ module Bundler
219
229
  "Include gems that are part of the specified named group."
220
230
  map "i" => "install"
221
231
  def install
232
+ SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
222
233
  require "bundler/cli/install"
223
234
  Bundler.settings.temporary(:no_install => false) do
224
235
  Install.new(options.dup).run
@@ -233,6 +244,8 @@ module Bundler
233
244
  D
234
245
  method_option "full-index", :type => :boolean, :banner =>
235
246
  "Fall back to using the single-file index of all gems"
247
+ method_option "gemfile", :type => :string, :banner =>
248
+ "Use the specified gemfile instead of Gemfile"
236
249
  method_option "group", :aliases => "-g", :type => :array, :banner =>
237
250
  "Update a specific group"
238
251
  method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
@@ -243,7 +256,7 @@ module Bundler
243
256
  "Only output warnings and errors."
244
257
  method_option "source", :type => :array, :banner =>
245
258
  "Update a specific source (and all gems associated with it)"
246
- method_option "force", :type => :boolean, :banner =>
259
+ method_option "redownload", :type => :boolean, :aliases => "--force", :banner =>
247
260
  "Force downloading every gem."
248
261
  method_option "ruby", :type => :boolean, :banner =>
249
262
  "Update ruby specified in Gemfile.lock"
@@ -262,6 +275,7 @@ module Bundler
262
275
  method_option "all", :type => :boolean, :banner =>
263
276
  "Update everything."
264
277
  def update(*gems)
278
+ SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
265
279
  require "bundler/cli/update"
266
280
  Update.new(options, gems).run
267
281
  end
@@ -276,7 +290,21 @@ module Bundler
276
290
  method_option "outdated", :type => :boolean,
277
291
  :banner => "Show verbose output including whether gems are outdated."
278
292
  def show(gem_name = nil)
279
- Bundler::SharedHelpers.major_deprecation(2, "use `bundle list` instead of `bundle show`") if ARGV[0] == "show"
293
+ if ARGV[0] == "show"
294
+ rest = ARGV[1..-1]
295
+
296
+ new_command = rest.find {|arg| !arg.start_with?("--") } ? "info" : "list"
297
+
298
+ new_arguments = rest.map do |arg|
299
+ next arg if arg != "--paths"
300
+ next "--path" if new_command == "info"
301
+ end
302
+
303
+ old_argv = ARGV.join(" ")
304
+ new_argv = [new_command, *new_arguments.compact].join(" ")
305
+
306
+ Bundler::SharedHelpers.major_deprecation(2, "use `bundle #{new_argv}` instead of `bundle #{old_argv}`")
307
+ end
280
308
  require "bundler/cli/show"
281
309
  Show.new(options, gem_name).run
282
310
  end
@@ -285,6 +313,9 @@ module Bundler
285
313
  if Bundler.feature_flag.list_command?
286
314
  desc "list", "List all gems in the bundle"
287
315
  method_option "name-only", :type => :boolean, :banner => "print only the gem names"
316
+ method_option "only-group", :type => :string, :banner => "print gems from a particular group"
317
+ method_option "without-group", :type => :string, :banner => "print all gems expect from a group"
318
+ method_option "paths", :type => :boolean, :banner => "print the path to each gem in the bundle"
288
319
  def list
289
320
  require "bundler/cli/list"
290
321
  List.new(options).run
@@ -316,6 +347,8 @@ module Bundler
316
347
  "Specify a different shebang executable name than the default (usually 'ruby')"
317
348
  method_option "standalone", :type => :boolean, :banner =>
318
349
  "Make binstubs that can work without the Bundler runtime"
350
+ method_option "all", :type => :boolean, :banner =>
351
+ "Install binstubs for all gems"
319
352
  def binstubs(*gems)
320
353
  require "bundler/cli/binstubs"
321
354
  Binstubs.new(options, gems).run
@@ -328,10 +361,13 @@ module Bundler
328
361
  method_option "version", :aliases => "-v", :type => :string
329
362
  method_option "group", :aliases => "-g", :type => :string
330
363
  method_option "source", :aliases => "-s", :type => :string
331
-
332
- def add(gem_name)
364
+ method_option "skip-install", :type => :boolean, :banner =>
365
+ "Adds gem to the Gemfile but does not install it"
366
+ method_option "optimistic", :type => :boolean, :banner => "Adds optimistic declaration of version to gem"
367
+ method_option "strict", :type => :boolean, :banner => "Adds strict declaration of version to gem"
368
+ def add(*gems)
333
369
  require "bundler/cli/add"
334
- Add.new(options.dup, gem_name).run
370
+ Add.new(options.dup, gems).run
335
371
  end
336
372
 
337
373
  desc "outdated GEM [OPTIONS]", "List installed gems with newer versions available"
@@ -362,6 +398,8 @@ module Bundler
362
398
  method_option "filter-patch", :type => :boolean, :banner => "Only list patch newer versions"
363
399
  method_option "parseable", :aliases => "--porcelain", :type => :boolean, :banner =>
364
400
  "Use minimal formatting for more parseable output"
401
+ method_option "only-explicit", :type => :boolean, :banner =>
402
+ "Only list gems specified in your Gemfile, not their dependencies"
365
403
  def outdated(*gems)
366
404
  require "bundler/cli/outdated"
367
405
  Outdated.new(options, gems).run
@@ -413,6 +451,7 @@ module Bundler
413
451
 
414
452
  desc "exec [OPTIONS]", "Run the command in context of the bundle"
415
453
  method_option :keep_file_descriptors, :type => :boolean, :default => false
454
+ method_option :gemfile, :type => :string, :required => false
416
455
  long_desc <<-D
417
456
  Exec runs a command, providing it access to the gems in the bundle. While using
418
457
  bundle exec you can require and call the bundled gems as if they were installed
@@ -485,20 +524,23 @@ module Bundler
485
524
  end
486
525
  end
487
526
 
488
- desc "viz [OPTIONS]", "Generates a visual dependency graph", :hide => true
489
- long_desc <<-D
490
- Viz generates a PNG file of the current Gemfile as a dependency graph.
491
- Viz requires the ruby-graphviz gem (and its dependencies).
492
- The associated gems must also be installed via 'bundle install'.
493
- D
494
- method_option :file, :type => :string, :default => "gem_graph", :aliases => "-f", :desc => "The name to use for the generated file. see format option"
495
- method_option :format, :type => :string, :default => "png", :aliases => "-F", :desc => "This is output format option. Supported format is png, jpg, svg, dot ..."
496
- method_option :requirements, :type => :boolean, :default => false, :aliases => "-R", :desc => "Set to show the version of each required dependency."
497
- method_option :version, :type => :boolean, :default => false, :aliases => "-v", :desc => "Set to show each gem version."
498
- method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
499
- def viz
500
- require "bundler/cli/viz"
501
- Viz.new(options.dup).run
527
+ if Bundler.feature_flag.viz_command?
528
+ desc "viz [OPTIONS]", "Generates a visual dependency graph", :hide => true
529
+ long_desc <<-D
530
+ Viz generates a PNG file of the current Gemfile as a dependency graph.
531
+ Viz requires the ruby-graphviz gem (and its dependencies).
532
+ The associated gems must also be installed via 'bundle install'.
533
+ D
534
+ method_option :file, :type => :string, :default => "gem_graph", :aliases => "-f", :desc => "The name to use for the generated file. see format option"
535
+ method_option :format, :type => :string, :default => "png", :aliases => "-F", :desc => "This is output format option. Supported format is png, jpg, svg, dot ..."
536
+ method_option :requirements, :type => :boolean, :default => false, :aliases => "-R", :desc => "Set to show the version of each required dependency."
537
+ method_option :version, :type => :boolean, :default => false, :aliases => "-v", :desc => "Set to show each gem version."
538
+ method_option :without, :type => :array, :default => [], :aliases => "-W", :banner => "GROUP[ GROUP...]", :desc => "Exclude gems that are part of the specified named group."
539
+ def viz
540
+ SharedHelpers.major_deprecation 2, "The `viz` command has been moved to the `bundle-viz` gem, see https://github.com/bundler/bundler-viz"
541
+ require "bundler/cli/viz"
542
+ Viz.new(options.dup).run
543
+ end
502
544
  end
503
545
 
504
546
  old_gem = instance_method(:gem)