rubygems-update 3.3.18 → 3.3.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (345) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/Manifest.txt +1 -0
  4. data/bin/gem +2 -2
  5. data/bin/update_rubygems +4 -4
  6. data/bundler/CHANGELOG.md +29 -0
  7. data/bundler/lib/bundler/build_metadata.rb +2 -2
  8. data/bundler/lib/bundler/cli/common.rb +1 -0
  9. data/bundler/lib/bundler/definition.rb +31 -12
  10. data/bundler/lib/bundler/dsl.rb +2 -2
  11. data/bundler/lib/bundler/incomplete_specification.rb +12 -0
  12. data/bundler/lib/bundler/index.rb +10 -12
  13. data/bundler/lib/bundler/lazy_specification.rb +15 -6
  14. data/bundler/lib/bundler/man/bundle-add.1 +1 -1
  15. data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
  16. data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
  17. data/bundler/lib/bundler/man/bundle-check.1 +1 -1
  18. data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
  19. data/bundler/lib/bundler/man/bundle-config.1 +13 -3
  20. data/bundler/lib/bundler/man/bundle-config.1.ronn +9 -2
  21. data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
  22. data/bundler/lib/bundler/man/bundle-exec.1 +2 -2
  23. data/bundler/lib/bundler/man/bundle-exec.1.ronn +1 -1
  24. data/bundler/lib/bundler/man/bundle-gem.1 +1 -1
  25. data/bundler/lib/bundler/man/bundle-info.1 +1 -1
  26. data/bundler/lib/bundler/man/bundle-init.1 +1 -1
  27. data/bundler/lib/bundler/man/bundle-inject.1 +5 -2
  28. data/bundler/lib/bundler/man/bundle-inject.1.ronn +3 -1
  29. data/bundler/lib/bundler/man/bundle-install.1 +1 -1
  30. data/bundler/lib/bundler/man/bundle-list.1 +1 -1
  31. data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
  32. data/bundler/lib/bundler/man/bundle-open.1 +1 -1
  33. data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
  34. data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
  35. data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
  36. data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
  37. data/bundler/lib/bundler/man/bundle-show.1 +1 -1
  38. data/bundler/lib/bundler/man/bundle-update.1 +1 -1
  39. data/bundler/lib/bundler/man/bundle-viz.1 +4 -1
  40. data/bundler/lib/bundler/man/bundle-viz.1.ronn +2 -0
  41. data/bundler/lib/bundler/man/bundle.1 +3 -3
  42. data/bundler/lib/bundler/man/bundle.1.ronn +2 -2
  43. data/bundler/lib/bundler/man/gemfile.5 +16 -10
  44. data/bundler/lib/bundler/man/gemfile.5.ronn +23 -16
  45. data/bundler/lib/bundler/remote_specification.rb +5 -4
  46. data/bundler/lib/bundler/resolver.rb +5 -6
  47. data/bundler/lib/bundler/rubygems_gem_installer.rb +19 -12
  48. data/bundler/lib/bundler/settings.rb +1 -0
  49. data/bundler/lib/bundler/spec_set.rb +29 -21
  50. data/bundler/lib/bundler/version.rb +1 -1
  51. data/bundler/lib/bundler.rb +1 -0
  52. data/lib/rubygems/basic_specification.rb +2 -2
  53. data/lib/rubygems/command.rb +19 -19
  54. data/lib/rubygems/command_manager.rb +9 -9
  55. data/lib/rubygems/commands/build_command.rb +8 -8
  56. data/lib/rubygems/commands/cert_command.rb +32 -32
  57. data/lib/rubygems/commands/check_command.rb +20 -20
  58. data/lib/rubygems/commands/cleanup_command.rb +16 -16
  59. data/lib/rubygems/commands/contents_command.rb +12 -12
  60. data/lib/rubygems/commands/dependency_command.rb +12 -12
  61. data/lib/rubygems/commands/environment_command.rb +5 -5
  62. data/lib/rubygems/commands/fetch_command.rb +6 -6
  63. data/lib/rubygems/commands/generate_index_command.rb +15 -15
  64. data/lib/rubygems/commands/help_command.rb +3 -3
  65. data/lib/rubygems/commands/info_command.rb +3 -3
  66. data/lib/rubygems/commands/install_command.rb +13 -13
  67. data/lib/rubygems/commands/list_command.rb +3 -3
  68. data/lib/rubygems/commands/lock_command.rb +4 -4
  69. data/lib/rubygems/commands/mirror_command.rb +3 -3
  70. data/lib/rubygems/commands/open_command.rb +9 -9
  71. data/lib/rubygems/commands/outdated_command.rb +5 -5
  72. data/lib/rubygems/commands/owner_command.rb +11 -11
  73. data/lib/rubygems/commands/pristine_command.rb +31 -31
  74. data/lib/rubygems/commands/push_command.rb +8 -8
  75. data/lib/rubygems/commands/query_command.rb +8 -8
  76. data/lib/rubygems/commands/rdoc_command.rb +17 -17
  77. data/lib/rubygems/commands/search_command.rb +3 -3
  78. data/lib/rubygems/commands/server_command.rb +3 -3
  79. data/lib/rubygems/commands/setup_command.rb +92 -102
  80. data/lib/rubygems/commands/signin_command.rb +9 -9
  81. data/lib/rubygems/commands/signout_command.rb +7 -7
  82. data/lib/rubygems/commands/sources_command.rb +19 -19
  83. data/lib/rubygems/commands/specification_command.rb +11 -11
  84. data/lib/rubygems/commands/stale_command.rb +2 -2
  85. data/lib/rubygems/commands/uninstall_command.rb +36 -36
  86. data/lib/rubygems/commands/unpack_command.rb +12 -12
  87. data/lib/rubygems/commands/update_command.rb +35 -51
  88. data/lib/rubygems/commands/which_command.rb +6 -6
  89. data/lib/rubygems/commands/yank_command.rb +11 -11
  90. data/lib/rubygems/config_file.rb +14 -14
  91. data/lib/rubygems/core_ext/kernel_gem.rb +1 -1
  92. data/lib/rubygems/core_ext/kernel_require.rb +1 -1
  93. data/lib/rubygems/core_ext/kernel_warn.rb +1 -1
  94. data/lib/rubygems/core_ext/tcpsocket_init.rb +1 -1
  95. data/lib/rubygems/defaults.rb +15 -15
  96. data/lib/rubygems/dependency.rb +4 -4
  97. data/lib/rubygems/dependency_installer.rb +8 -8
  98. data/lib/rubygems/dependency_list.rb +2 -2
  99. data/lib/rubygems/doctor.rb +16 -16
  100. data/lib/rubygems/errors.rb +2 -2
  101. data/lib/rubygems/exceptions.rb +4 -4
  102. data/lib/rubygems/ext/build_error.rb +1 -1
  103. data/lib/rubygems/ext/builder.rb +16 -16
  104. data/lib/rubygems/ext/cargo_builder.rb +7 -7
  105. data/lib/rubygems/ext/cmake_builder.rb +2 -2
  106. data/lib/rubygems/ext/configure_builder.rb +1 -1
  107. data/lib/rubygems/ext/ext_conf_builder.rb +6 -6
  108. data/lib/rubygems/ext/rake_builder.rb +3 -3
  109. data/lib/rubygems/ext.rb +7 -7
  110. data/lib/rubygems/gem_runner.rb +5 -5
  111. data/lib/rubygems/gemcutter_utilities.rb +30 -27
  112. data/lib/rubygems/indexer.rb +24 -24
  113. data/lib/rubygems/install_default_message.rb +2 -2
  114. data/lib/rubygems/install_message.rb +2 -2
  115. data/lib/rubygems/install_update_options.rb +55 -55
  116. data/lib/rubygems/installer.rb +27 -27
  117. data/lib/rubygems/installer_uninstaller_utils.rb +2 -2
  118. data/lib/rubygems/local_remote_options.rb +18 -20
  119. data/lib/rubygems/mock_gem_ui.rb +2 -2
  120. data/lib/rubygems/name_tuple.rb +1 -1
  121. data/lib/rubygems/optparse.rb +1 -1
  122. data/lib/rubygems/package/file_source.rb +2 -2
  123. data/lib/rubygems/package/old.rb +8 -8
  124. data/lib/rubygems/package/tar_header.rb +33 -33
  125. data/lib/rubygems/package/tar_reader/entry.rb +2 -2
  126. data/lib/rubygems/package/tar_reader.rb +1 -1
  127. data/lib/rubygems/package/tar_writer.rb +6 -6
  128. data/lib/rubygems/package.rb +35 -35
  129. data/lib/rubygems/package_task.rb +4 -4
  130. data/lib/rubygems/platform.rb +42 -42
  131. data/lib/rubygems/psych_tree.rb +1 -1
  132. data/lib/rubygems/query_utils.rb +27 -27
  133. data/lib/rubygems/rdoc.rb +2 -2
  134. data/lib/rubygems/remote_fetcher.rb +19 -19
  135. data/lib/rubygems/request/connection_pools.rb +2 -2
  136. data/lib/rubygems/request.rb +21 -21
  137. data/lib/rubygems/request_set/gem_dependency_api.rb +15 -15
  138. data/lib/rubygems/request_set/lockfile/parser.rb +14 -14
  139. data/lib/rubygems/request_set/lockfile/tokenizer.rb +2 -2
  140. data/lib/rubygems/request_set/lockfile.rb +5 -5
  141. data/lib/rubygems/request_set.rb +14 -14
  142. data/lib/rubygems/requirement.rb +5 -5
  143. data/lib/rubygems/resolver/activation_request.rb +3 -3
  144. data/lib/rubygems/resolver/api_set.rb +4 -4
  145. data/lib/rubygems/resolver/api_specification.rb +2 -2
  146. data/lib/rubygems/resolver/best_set.rb +2 -2
  147. data/lib/rubygems/resolver/conflict.rb +7 -7
  148. data/lib/rubygems/resolver/dependency_request.rb +2 -2
  149. data/lib/rubygems/resolver/git_set.rb +2 -2
  150. data/lib/rubygems/resolver/git_specification.rb +3 -3
  151. data/lib/rubygems/resolver/index_set.rb +3 -3
  152. data/lib/rubygems/resolver/index_specification.rb +3 -3
  153. data/lib/rubygems/resolver/installed_specification.rb +2 -2
  154. data/lib/rubygems/resolver/installer_set.rb +4 -4
  155. data/lib/rubygems/resolver/local_specification.rb +2 -2
  156. data/lib/rubygems/resolver/lock_set.rb +3 -3
  157. data/lib/rubygems/resolver/lock_specification.rb +3 -3
  158. data/lib/rubygems/resolver/molinillo.rb +1 -1
  159. data/lib/rubygems/resolver/specification.rb +1 -1
  160. data/lib/rubygems/resolver/vendor_set.rb +1 -1
  161. data/lib/rubygems/resolver.rb +35 -35
  162. data/lib/rubygems/s3_uri_signer.rb +6 -6
  163. data/lib/rubygems/safe_yaml.rb +2 -2
  164. data/lib/rubygems/security/policies.rb +11 -11
  165. data/lib/rubygems/security/policy.rb +12 -12
  166. data/lib/rubygems/security/signer.rb +4 -4
  167. data/lib/rubygems/security/trust_dir.rb +3 -3
  168. data/lib/rubygems/security.rb +27 -27
  169. data/lib/rubygems/security_option.rb +5 -5
  170. data/lib/rubygems/source/git.rb +17 -17
  171. data/lib/rubygems/source/installed.rb +1 -1
  172. data/lib/rubygems/source/local.rb +2 -2
  173. data/lib/rubygems/source/specific_file.rb +1 -1
  174. data/lib/rubygems/source.rb +15 -15
  175. data/lib/rubygems/spec_fetcher.rb +8 -8
  176. data/lib/rubygems/specification.rb +37 -38
  177. data/lib/rubygems/specification_policy.rb +13 -13
  178. data/lib/rubygems/stub_specification.rb +5 -5
  179. data/lib/rubygems/tsort.rb +1 -1
  180. data/lib/rubygems/uninstaller.rb +14 -14
  181. data/lib/rubygems/uri.rb +4 -4
  182. data/lib/rubygems/uri_formatter.rb +1 -1
  183. data/lib/rubygems/user_interaction.rb +31 -17
  184. data/lib/rubygems/util/licenses.rb +3 -3
  185. data/lib/rubygems/util.rb +10 -10
  186. data/lib/rubygems/validator.rb +5 -5
  187. data/lib/rubygems/version.rb +3 -5
  188. data/lib/rubygems/version_option.rb +3 -3
  189. data/lib/rubygems.rb +59 -58
  190. data/rubygems-update.gemspec +2 -2
  191. data/setup.rb +9 -9
  192. data/test/rubygems/helper.rb +127 -127
  193. data/test/rubygems/installer_test_case.rb +13 -13
  194. data/test/rubygems/package/tar_test_case.rb +2 -2
  195. data/test/rubygems/plugin/exception/rubygems_plugin.rb +1 -1
  196. data/test/rubygems/plugin/standarderror/rubygems_plugin.rb +1 -1
  197. data/test/rubygems/rubygems_plugin.rb +2 -2
  198. data/test/rubygems/specifications/rubyforge-0.0.1.gemspec +4 -4
  199. data/test/rubygems/test_bundled_ca.rb +10 -10
  200. data/test/rubygems/test_config.rb +3 -3
  201. data/test/rubygems/test_deprecate.rb +3 -3
  202. data/test/rubygems/test_exit.rb +2 -2
  203. data/test/rubygems/test_gem.rb +342 -342
  204. data/test/rubygems/test_gem_available_set.rb +21 -21
  205. data/test/rubygems/test_gem_bundler_version_finder.rb +1 -1
  206. data/test/rubygems/test_gem_command.rb +44 -44
  207. data/test/rubygems/test_gem_command_manager.rb +29 -29
  208. data/test/rubygems/test_gem_commands_build_command.rb +63 -63
  209. data/test/rubygems/test_gem_commands_cert_command.rb +97 -99
  210. data/test/rubygems/test_gem_commands_check_command.rb +4 -4
  211. data/test/rubygems/test_gem_commands_cleanup_command.rb +40 -40
  212. data/test/rubygems/test_gem_commands_contents_command.rb +27 -27
  213. data/test/rubygems/test_gem_commands_dependency_command.rb +36 -36
  214. data/test/rubygems/test_gem_commands_environment_command.rb +16 -16
  215. data/test/rubygems/test_gem_commands_fetch_command.rb +37 -37
  216. data/test/rubygems/test_gem_commands_generate_index_command.rb +7 -7
  217. data/test/rubygems/test_gem_commands_help_command.rb +13 -13
  218. data/test/rubygems/test_gem_commands_info_command.rb +2 -2
  219. data/test/rubygems/test_gem_commands_install_command.rb +131 -131
  220. data/test/rubygems/test_gem_commands_list_command.rb +4 -4
  221. data/test/rubygems/test_gem_commands_lock_command.rb +10 -10
  222. data/test/rubygems/test_gem_commands_mirror.rb +2 -2
  223. data/test/rubygems/test_gem_commands_open_command.rb +4 -4
  224. data/test/rubygems/test_gem_commands_outdated_command.rb +9 -9
  225. data/test/rubygems/test_gem_commands_owner_command.rb +41 -41
  226. data/test/rubygems/test_gem_commands_pristine_command.rb +92 -92
  227. data/test/rubygems/test_gem_commands_push_command.rb +54 -54
  228. data/test/rubygems/test_gem_commands_query_command.rb +73 -73
  229. data/test/rubygems/test_gem_commands_search_command.rb +2 -2
  230. data/test/rubygems/test_gem_commands_server_command.rb +2 -2
  231. data/test/rubygems/test_gem_commands_setup_command.rb +119 -85
  232. data/test/rubygems/test_gem_commands_signin_command.rb +45 -31
  233. data/test/rubygems/test_gem_commands_signout_command.rb +3 -3
  234. data/test/rubygems/test_gem_commands_sources_command.rb +28 -29
  235. data/test/rubygems/test_gem_commands_specification_command.rb +32 -32
  236. data/test/rubygems/test_gem_commands_stale_command.rb +4 -4
  237. data/test/rubygems/test_gem_commands_uninstall_command.rb +75 -75
  238. data/test/rubygems/test_gem_commands_unpack_command.rb +31 -31
  239. data/test/rubygems/test_gem_commands_update_command.rb +89 -89
  240. data/test/rubygems/test_gem_commands_which_command.rb +6 -6
  241. data/test/rubygems/test_gem_commands_yank_command.rb +40 -40
  242. data/test/rubygems/test_gem_config_file.rb +77 -77
  243. data/test/rubygems/test_gem_dependency.rb +73 -73
  244. data/test/rubygems/test_gem_dependency_installer.rb +165 -165
  245. data/test/rubygems/test_gem_dependency_list.rb +47 -47
  246. data/test/rubygems/test_gem_dependency_resolution_error.rb +4 -4
  247. data/test/rubygems/test_gem_doctor.rb +26 -26
  248. data/test/rubygems/test_gem_ext_builder.rb +59 -59
  249. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock +6 -6
  250. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml +1 -1
  251. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb +8 -8
  252. data/test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec +1 -1
  253. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock +6 -6
  254. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml +1 -1
  255. data/test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb +8 -8
  256. data/test/rubygems/test_gem_ext_cargo_builder.rb +26 -26
  257. data/test/rubygems/test_gem_ext_cargo_builder_link_flag_converter.rb +3 -3
  258. data/test/rubygems/test_gem_ext_cargo_builder_unit.rb +23 -23
  259. data/test/rubygems/test_gem_ext_cmake_builder.rb +15 -15
  260. data/test/rubygems/test_gem_ext_configure_builder.rb +13 -13
  261. data/test/rubygems/test_gem_ext_ext_conf_builder.rb +51 -52
  262. data/test/rubygems/test_gem_ext_rake_builder.rb +15 -15
  263. data/test/rubygems/test_gem_gem_runner.rb +7 -7
  264. data/test/rubygems/test_gem_gemcutter_utilities.rb +66 -66
  265. data/test/rubygems/test_gem_impossible_dependencies_error.rb +4 -4
  266. data/test/rubygems/test_gem_indexer.rb +48 -48
  267. data/test/rubygems/test_gem_install_update_options.rb +16 -16
  268. data/test/rubygems/test_gem_installer.rb +297 -297
  269. data/test/rubygems/test_gem_local_remote_options.rb +10 -10
  270. data/test/rubygems/test_gem_name_tuple.rb +4 -4
  271. data/test/rubygems/test_gem_package.rb +206 -206
  272. data/test/rubygems/test_gem_package_old.rb +13 -13
  273. data/test/rubygems/test_gem_package_tar_header.rb +42 -42
  274. data/test/rubygems/test_gem_package_tar_reader.rb +7 -7
  275. data/test/rubygems/test_gem_package_tar_reader_entry.rb +10 -10
  276. data/test/rubygems/test_gem_package_tar_writer.rb +76 -76
  277. data/test/rubygems/test_gem_package_task.rb +18 -18
  278. data/test/rubygems/test_gem_path_support.rb +14 -14
  279. data/test/rubygems/test_gem_platform.rb +227 -227
  280. data/test/rubygems/test_gem_rdoc.rb +14 -14
  281. data/test/rubygems/test_gem_remote_fetcher.rb +149 -149
  282. data/test/rubygems/test_gem_request.rb +55 -55
  283. data/test/rubygems/test_gem_request_connection_pools.rb +29 -29
  284. data/test/rubygems/test_gem_request_set.rb +99 -99
  285. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +204 -206
  286. data/test/rubygems/test_gem_request_set_lockfile.rb +86 -86
  287. data/test/rubygems/test_gem_request_set_lockfile_parser.rb +56 -56
  288. data/test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +62 -62
  289. data/test/rubygems/test_gem_requirement.rb +38 -38
  290. data/test/rubygems/test_gem_resolver.rb +98 -98
  291. data/test/rubygems/test_gem_resolver_activation_request.rb +6 -6
  292. data/test/rubygems/test_gem_resolver_api_set.rb +33 -33
  293. data/test/rubygems/test_gem_resolver_api_specification.rb +47 -47
  294. data/test/rubygems/test_gem_resolver_best_set.rb +22 -22
  295. data/test/rubygems/test_gem_resolver_composed_set.rb +1 -1
  296. data/test/rubygems/test_gem_resolver_conflict.rb +12 -12
  297. data/test/rubygems/test_gem_resolver_dependency_request.rb +15 -15
  298. data/test/rubygems/test_gem_resolver_git_set.rb +21 -21
  299. data/test/rubygems/test_gem_resolver_git_specification.rb +21 -21
  300. data/test/rubygems/test_gem_resolver_index_set.rb +12 -12
  301. data/test/rubygems/test_gem_resolver_index_specification.rb +15 -15
  302. data/test/rubygems/test_gem_resolver_installed_specification.rb +5 -5
  303. data/test/rubygems/test_gem_resolver_installer_set.rb +34 -34
  304. data/test/rubygems/test_gem_resolver_local_specification.rb +7 -7
  305. data/test/rubygems/test_gem_resolver_lock_set.rb +12 -12
  306. data/test/rubygems/test_gem_resolver_lock_specification.rb +17 -17
  307. data/test/rubygems/test_gem_resolver_requirement_list.rb +1 -1
  308. data/test/rubygems/test_gem_resolver_specification.rb +8 -8
  309. data/test/rubygems/test_gem_resolver_vendor_set.rb +6 -6
  310. data/test/rubygems/test_gem_resolver_vendor_specification.rb +10 -10
  311. data/test/rubygems/test_gem_security.rb +67 -67
  312. data/test/rubygems/test_gem_security_policy.rb +62 -62
  313. data/test/rubygems/test_gem_security_signer.rb +28 -28
  314. data/test/rubygems/test_gem_security_trust_dir.rb +4 -4
  315. data/test/rubygems/test_gem_silent_ui.rb +38 -32
  316. data/test/rubygems/test_gem_source.rb +44 -44
  317. data/test/rubygems/test_gem_source_fetch_problem.rb +9 -9
  318. data/test/rubygems/test_gem_source_git.rb +59 -59
  319. data/test/rubygems/test_gem_source_installed.rb +16 -16
  320. data/test/rubygems/test_gem_source_list.rb +5 -5
  321. data/test/rubygems/test_gem_source_local.rb +14 -14
  322. data/test/rubygems/test_gem_source_lock.rb +31 -31
  323. data/test/rubygems/test_gem_source_specific_file.rb +17 -17
  324. data/test/rubygems/test_gem_source_subpath_problem.rb +7 -7
  325. data/test/rubygems/test_gem_source_vendor.rb +13 -13
  326. data/test/rubygems/test_gem_spec_fetcher.rb +72 -72
  327. data/test/rubygems/test_gem_specification.rb +434 -435
  328. data/test/rubygems/test_gem_stream_ui.rb +19 -19
  329. data/test/rubygems/test_gem_stub_specification.rb +32 -32
  330. data/test/rubygems/test_gem_text.rb +1 -1
  331. data/test/rubygems/test_gem_uninstaller.rb +112 -112
  332. data/test/rubygems/test_gem_unsatisfiable_dependency_error.rb +3 -3
  333. data/test/rubygems/test_gem_uri.rb +4 -4
  334. data/test/rubygems/test_gem_uri_formatter.rb +14 -14
  335. data/test/rubygems/test_gem_util.rb +23 -23
  336. data/test/rubygems/test_gem_validator.rb +8 -8
  337. data/test/rubygems/test_gem_version.rb +13 -13
  338. data/test/rubygems/test_gem_version_option.rb +15 -15
  339. data/test/rubygems/test_kernel.rb +31 -31
  340. data/test/rubygems/test_project_sanity.rb +1 -1
  341. data/test/rubygems/test_remote_fetch_error.rb +6 -6
  342. data/test/rubygems/test_require.rb +42 -42
  343. data/test/rubygems/test_rubygems.rb +8 -8
  344. data/test/rubygems/utilities.rb +17 -17
  345. metadata +4 -3
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- require_relative 'installer_test_case'
2
+ require_relative "installer_test_case"
3
3
 
4
4
  class TestGemInstaller < Gem::InstallerTestCase
5
5
  def setup
@@ -21,7 +21,7 @@ class TestGemInstaller < Gem::InstallerTestCase
21
21
  load_relative "no" do
22
22
  installer = setup_base_installer
23
23
 
24
- util_make_exec @spec, ''
24
+ util_make_exec @spec, ""
25
25
 
26
26
  expected = <<-EOF
27
27
  #!#{Gem.ruby}
@@ -55,7 +55,7 @@ load Gem.bin_path("a", "executable", version)
55
55
  end
56
56
  EOF
57
57
 
58
- wrapper = installer.app_script_text 'executable'
58
+ wrapper = installer.app_script_text "executable"
59
59
  assert_equal expected, wrapper
60
60
  end
61
61
  end
@@ -66,12 +66,12 @@ end
66
66
  installer.generate_bin
67
67
 
68
68
  @spec = Gem::Specification.new do |s|
69
- s.files = ['lib/code.rb']
69
+ s.files = ["lib/code.rb"]
70
70
  s.name = "a"
71
71
  s.version = "3"
72
72
  s.summary = "summary"
73
73
  s.description = "desc"
74
- s.require_path = 'lib'
74
+ s.require_path = "lib"
75
75
  end
76
76
 
77
77
  util_make_exec
@@ -79,7 +79,7 @@ end
79
79
  installer.wrappers = true
80
80
  installer.generate_bin
81
81
 
82
- installed_exec = File.join util_inst_bindir, 'executable'
82
+ installed_exec = File.join util_inst_bindir, "executable"
83
83
  assert_path_exist installed_exec
84
84
 
85
85
  wrapper = File.read installed_exec
@@ -98,7 +98,7 @@ end
98
98
  installer.generate_bin
99
99
  end
100
100
 
101
- conflicted = File.join @gemhome, 'bin', 'executable'
101
+ conflicted = File.join @gemhome, "bin", "executable"
102
102
  assert_match %r{\A"executable" from a conflicts with (?:#{Regexp.quote(conflicted)}|installed executable from conflict)\z},
103
103
  e.message
104
104
  end
@@ -111,15 +111,15 @@ end
111
111
  installer.generate_bin
112
112
 
113
113
  @spec = Gem::Specification.new do |s|
114
- s.files = ['lib/code.rb']
114
+ s.files = ["lib/code.rb"]
115
115
  s.name = "a"
116
116
  s.version = "3"
117
117
  s.summary = "summary"
118
118
  s.description = "desc"
119
- s.require_path = 'lib'
119
+ s.require_path = "lib"
120
120
  end
121
121
 
122
- File.open File.join(util_inst_bindir, 'executable'), 'w' do |io|
122
+ File.open File.join(util_inst_bindir, "executable"), "w" do |io|
123
123
  io.write <<-EXEC
124
124
  #!/usr/local/bin/ruby
125
125
  #
@@ -130,14 +130,14 @@ gem 'other', version
130
130
  end
131
131
 
132
132
  util_make_exec
133
- Gem::Installer.exec_format = 'foo-%s-bar'
133
+ Gem::Installer.exec_format = "foo-%s-bar"
134
134
  installer.gem_dir = @spec.gem_dir
135
135
  installer.wrappers = true
136
136
  installer.format_executable = true
137
137
 
138
138
  installer.generate_bin # should not raise
139
139
 
140
- installed_exec = File.join util_inst_bindir, 'foo-executable-bar'
140
+ installed_exec = File.join util_inst_bindir, "foo-executable-bar"
141
141
  assert_path_exist installed_exec
142
142
 
143
143
  wrapper = File.read installed_exec
@@ -172,7 +172,7 @@ gem 'other', version
172
172
 
173
173
  installer.generate_bin
174
174
 
175
- installed_exec = File.join util_inst_bindir, 'executable'
175
+ installed_exec = File.join util_inst_bindir, "executable"
176
176
  assert_path_exist installed_exec
177
177
 
178
178
  wrapper = File.read installed_exec
@@ -187,7 +187,7 @@ gem 'other', version
187
187
 
188
188
  installer.generate_bin
189
189
 
190
- installed_exec = File.join util_inst_bindir, 'executable'
190
+ installed_exec = File.join util_inst_bindir, "executable"
191
191
  assert_path_exist installed_exec
192
192
 
193
193
  wrapper = File.read installed_exec
@@ -203,8 +203,8 @@ gem 'other', version
203
203
  bin_dir = bin_dir.downcase
204
204
  end
205
205
 
206
- orig_PATH, ENV['PATH'] =
207
- ENV['PATH'], [ENV['PATH'], bin_dir].join(File::PATH_SEPARATOR)
206
+ orig_PATH, ENV["PATH"] =
207
+ ENV["PATH"], [ENV["PATH"], bin_dir].join(File::PATH_SEPARATOR)
208
208
 
209
209
  use_ui @ui do
210
210
  installer.check_that_user_bin_dir_is_in_path
@@ -214,7 +214,7 @@ gem 'other', version
214
214
 
215
215
  return unless win_platform?
216
216
 
217
- ENV['PATH'] = [orig_PATH, bin_dir.tr(File::SEPARATOR, File::ALT_SEPARATOR)].join(File::PATH_SEPARATOR)
217
+ ENV["PATH"] = [orig_PATH, bin_dir.tr(File::SEPARATOR, File::ALT_SEPARATOR)].join(File::PATH_SEPARATOR)
218
218
 
219
219
  use_ui @ui do
220
220
  installer.check_that_user_bin_dir_is_in_path
@@ -222,17 +222,17 @@ gem 'other', version
222
222
 
223
223
  assert_empty @ui.error
224
224
  ensure
225
- ENV['PATH'] = orig_PATH
225
+ ENV["PATH"] = orig_PATH
226
226
  end
227
227
 
228
228
  def test_check_that_user_bin_dir_is_in_path_tilde
229
229
  pend "Tilde is PATH is not supported under MS Windows" if win_platform?
230
230
 
231
- orig_PATH, ENV['PATH'] =
232
- ENV['PATH'], [ENV['PATH'], '~/bin'].join(File::PATH_SEPARATOR)
231
+ orig_PATH, ENV["PATH"] =
232
+ ENV["PATH"], [ENV["PATH"], "~/bin"].join(File::PATH_SEPARATOR)
233
233
 
234
234
  installer = setup_base_installer
235
- installer.bin_dir.replace File.join @userhome, 'bin'
235
+ installer.bin_dir.replace File.join @userhome, "bin"
236
236
 
237
237
  use_ui @ui do
238
238
  installer.check_that_user_bin_dir_is_in_path
@@ -240,7 +240,7 @@ gem 'other', version
240
240
 
241
241
  assert_empty @ui.error
242
242
  ensure
243
- ENV['PATH'] = orig_PATH unless win_platform?
243
+ ENV["PATH"] = orig_PATH unless win_platform?
244
244
  end
245
245
 
246
246
  def test_check_that_user_bin_dir_is_in_path_not_in_path
@@ -262,22 +262,22 @@ gem 'other', version
262
262
  def test_ensure_dependency
263
263
  installer = setup_base_installer
264
264
 
265
- util_spec 'a'
265
+ util_spec "a"
266
266
 
267
- dep = Gem::Dependency.new 'a', '>= 2'
267
+ dep = Gem::Dependency.new "a", ">= 2"
268
268
  assert installer.ensure_dependency(@spec, dep)
269
269
 
270
- dep = Gem::Dependency.new 'b', '> 2'
270
+ dep = Gem::Dependency.new "b", "> 2"
271
271
  e = assert_raise Gem::InstallError do
272
272
  installer.ensure_dependency @spec, dep
273
273
  end
274
274
 
275
- assert_equal 'a requires b (> 2)', e.message
275
+ assert_equal "a requires b (> 2)", e.message
276
276
  end
277
277
 
278
278
  def test_ensure_loadable_spec
279
- a, a_gem = util_gem 'a', 2 do |s|
280
- s.add_dependency 'garbage ~> 5'
279
+ a, a_gem = util_gem "a", 2 do |s|
280
+ s.add_dependency "garbage ~> 5"
281
281
  end
282
282
 
283
283
  installer = Gem::Installer.at a_gem
@@ -291,10 +291,10 @@ gem 'other', version
291
291
  end
292
292
 
293
293
  def test_ensure_loadable_spec_security_policy
294
- pend 'openssl is missing' unless Gem::HAVE_OPENSSL
294
+ pend "openssl is missing" unless Gem::HAVE_OPENSSL
295
295
 
296
- _, a_gem = util_gem 'a', 2 do |s|
297
- s.add_dependency 'garbage ~> 5'
296
+ _, a_gem = util_gem "a", 2 do |s|
297
+ s.add_dependency "garbage ~> 5"
298
298
  end
299
299
 
300
300
  policy = Gem::Security::HighSecurity
@@ -310,7 +310,7 @@ gem 'other', version
310
310
 
311
311
  installer.extract_files
312
312
 
313
- assert_path_exist File.join @spec.gem_dir, 'bin/executable'
313
+ assert_path_exist File.join @spec.gem_dir, "bin/executable"
314
314
  end
315
315
 
316
316
  def test_generate_bin_bindir
@@ -319,12 +319,12 @@ gem 'other', version
319
319
  installer.wrappers = true
320
320
 
321
321
  @spec.executables = %w[executable]
322
- @spec.bindir = 'bin'
322
+ @spec.bindir = "bin"
323
323
 
324
- exec_file = installer.formatted_program_filename 'executable'
324
+ exec_file = installer.formatted_program_filename "executable"
325
325
  exec_path = File.join @spec.gem_dir, exec_file
326
- File.open exec_path, 'w' do |f|
327
- f.puts '#!/usr/bin/ruby'
326
+ File.open exec_path, "w" do |f|
327
+ f.puts "#!/usr/bin/ruby"
328
328
  end
329
329
 
330
330
  installer.gem_dir = @spec.gem_dir
@@ -332,7 +332,7 @@ gem 'other', version
332
332
  installer.generate_bin
333
333
 
334
334
  assert_directory_exists util_inst_bindir
335
- installed_exec = File.join(util_inst_bindir, 'executable')
335
+ installed_exec = File.join(util_inst_bindir, "executable")
336
336
  assert_path_exist installed_exec
337
337
  assert_equal mask, File.stat(installed_exec).mode unless win_platform?
338
338
 
@@ -352,7 +352,7 @@ gem 'other', version
352
352
  :install_dir => "/non/existent",
353
353
  }
354
354
 
355
- inst = Gem::Installer.at '', options
355
+ inst = Gem::Installer.at "", options
356
356
 
357
357
  Gem::Installer.path_warning = false
358
358
 
@@ -375,7 +375,7 @@ gem 'other', version
375
375
 
376
376
  installer.generate_bin
377
377
  assert_directory_exists util_inst_bindir
378
- installed_exec = File.join util_inst_bindir, 'executable'
378
+ installed_exec = File.join util_inst_bindir, "executable"
379
379
  assert_path_exist installed_exec
380
380
  assert_equal mask, File.stat(installed_exec).mode unless win_platform?
381
381
 
@@ -391,10 +391,10 @@ gem 'other', version
391
391
  util_make_exec
392
392
  installer.gem_dir = @spec.gem_dir
393
393
 
394
- Gem::Installer.exec_format = 'foo-%s-bar'
394
+ Gem::Installer.exec_format = "foo-%s-bar"
395
395
  installer.generate_bin
396
396
  assert_directory_exists util_inst_bindir
397
- installed_exec = File.join util_inst_bindir, 'foo-executable-bar'
397
+ installed_exec = File.join util_inst_bindir, "foo-executable-bar"
398
398
  assert_path_exist installed_exec
399
399
  ensure
400
400
  Gem::Installer.exec_format = nil
@@ -407,10 +407,10 @@ gem 'other', version
407
407
  util_make_exec
408
408
  installer.gem_dir = @spec.gem_dir
409
409
 
410
- Gem::Installer.exec_format = 'foo-%s-bar'
410
+ Gem::Installer.exec_format = "foo-%s-bar"
411
411
  installer.generate_bin
412
412
  assert_directory_exists util_inst_bindir
413
- installed_exec = File.join util_inst_bindir, 'executable'
413
+ installed_exec = File.join util_inst_bindir, "executable"
414
414
  assert_path_exist installed_exec
415
415
  ensure
416
416
  Gem::Installer.exec_format = nil
@@ -422,19 +422,19 @@ gem 'other', version
422
422
  installer.wrappers = true
423
423
 
424
424
  gem_dir = File.join("#{@gemhome}2", "gems", @spec.full_name)
425
- gem_bindir = File.join gem_dir, 'bin'
425
+ gem_bindir = File.join gem_dir, "bin"
426
426
  FileUtils.mkdir_p gem_bindir
427
- File.open File.join(gem_bindir, 'executable'), 'w' do |f|
427
+ File.open File.join(gem_bindir, "executable"), "w" do |f|
428
428
  f.puts "#!/bin/ruby"
429
429
  end
430
430
 
431
431
  installer.gem_home = "#{@gemhome}2"
432
432
  installer.gem_dir = gem_dir
433
- installer.bin_dir = File.join "#{@gemhome}2", 'bin'
433
+ installer.bin_dir = File.join "#{@gemhome}2", "bin"
434
434
 
435
435
  installer.generate_bin
436
436
 
437
- installed_exec = File.join("#{@gemhome}2", "bin", 'executable')
437
+ installed_exec = File.join("#{@gemhome}2", "bin", "executable")
438
438
  assert_path_exist installed_exec
439
439
  assert_equal mask, File.stat(installed_exec).mode unless win_platform?
440
440
 
@@ -450,7 +450,7 @@ gem 'other', version
450
450
  installer.wrappers = true
451
451
  installer.generate_bin
452
452
 
453
- assert_path_not_exist util_inst_bindir, 'bin dir was created when not needed'
453
+ assert_path_not_exist util_inst_bindir, "bin dir was created when not needed"
454
454
  end
455
455
 
456
456
  def test_generate_bin_script_no_perms
@@ -462,9 +462,9 @@ gem 'other', version
462
462
  Dir.mkdir util_inst_bindir
463
463
 
464
464
  if win_platform?
465
- pend('test_generate_bin_script_no_perms skipped on MS Windows')
465
+ pend("test_generate_bin_script_no_perms skipped on MS Windows")
466
466
  elsif Process.uid.zero?
467
- pend('test_generate_bin_script_no_perms skipped in root privilege')
467
+ pend("test_generate_bin_script_no_perms skipped in root privilege")
468
468
  else
469
469
  FileUtils.chmod 0000, util_inst_bindir
470
470
 
@@ -482,16 +482,16 @@ gem 'other', version
482
482
  installer.wrappers = true
483
483
  @spec.executables = %w[executable]
484
484
 
485
- gem_dir = File.join @gemhome, 'gems', @spec.full_name
486
- gem_bindir = File.join gem_dir, 'bin'
485
+ gem_dir = File.join @gemhome, "gems", @spec.full_name
486
+ gem_bindir = File.join gem_dir, "bin"
487
487
  FileUtils.mkdir_p gem_bindir
488
- File.open File.join(gem_bindir, 'executable'), 'w' do |f|
488
+ File.open File.join(gem_bindir, "executable"), "w" do |f|
489
489
  f.puts "blah blah blah"
490
490
  end
491
491
 
492
492
  installer.generate_bin
493
493
 
494
- installed_exec = File.join @gemhome, 'bin', 'executable'
494
+ installed_exec = File.join @gemhome, "bin", "executable"
495
495
  assert_path_exist installed_exec
496
496
  assert_equal mask, File.stat(installed_exec).mode unless win_platform?
497
497
 
@@ -507,9 +507,9 @@ gem 'other', version
507
507
  installer.wrappers = true
508
508
  util_make_exec
509
509
  installer.gem_dir = @spec.gem_dir
510
- installed_exec = File.join(util_inst_bindir, 'executable')
510
+ installed_exec = File.join(util_inst_bindir, "executable")
511
511
 
512
- real_exec = File.join @spec.gem_dir, 'bin', 'executable'
512
+ real_exec = File.join @spec.gem_dir, "bin", "executable"
513
513
 
514
514
  # fake --no-wrappers for previous install
515
515
  unless Gem.win_platform?
@@ -525,7 +525,7 @@ gem 'other', version
525
525
  assert_match %r{generated by RubyGems}, File.read(installed_exec)
526
526
 
527
527
  refute_match %r{generated by RubyGems}, File.read(real_exec),
528
- 'real executable overwritten'
528
+ "real executable overwritten"
529
529
  end
530
530
 
531
531
  def test_generate_bin_symlink
@@ -539,9 +539,9 @@ gem 'other', version
539
539
 
540
540
  installer.generate_bin
541
541
  assert_directory_exists util_inst_bindir
542
- installed_exec = File.join util_inst_bindir, 'executable'
542
+ installed_exec = File.join util_inst_bindir, "executable"
543
543
  assert_equal true, File.symlink?(installed_exec)
544
- assert_equal(File.join(@spec.gem_dir, 'bin', 'executable'),
544
+ assert_equal(File.join(@spec.gem_dir, "bin", "executable"),
545
545
  File.readlink(installed_exec))
546
546
  end
547
547
 
@@ -566,9 +566,9 @@ gem 'other', version
566
566
  Dir.mkdir util_inst_bindir
567
567
 
568
568
  if win_platform?
569
- pend('test_generate_bin_symlink_no_perms skipped on MS Windows')
569
+ pend("test_generate_bin_symlink_no_perms skipped on MS Windows")
570
570
  elsif Process.uid.zero?
571
- pend('test_user_install_disabled_read_only test skipped in root privilege')
571
+ pend("test_user_install_disabled_read_only test skipped in root privilege")
572
572
  else
573
573
  FileUtils.chmod 0000, util_inst_bindir
574
574
 
@@ -590,24 +590,24 @@ gem 'other', version
590
590
  installer.gem_dir = @spec.gem_dir
591
591
 
592
592
  installer.generate_bin
593
- installed_exec = File.join(util_inst_bindir, 'executable')
594
- assert_equal(File.join(@spec.gem_dir, 'bin', 'executable'),
593
+ installed_exec = File.join(util_inst_bindir, "executable")
594
+ assert_equal(File.join(@spec.gem_dir, "bin", "executable"),
595
595
  File.readlink(installed_exec))
596
596
 
597
597
  @spec = Gem::Specification.new do |s|
598
- s.files = ['lib/code.rb']
598
+ s.files = ["lib/code.rb"]
599
599
  s.name = "a"
600
600
  s.version = "3"
601
601
  s.summary = "summary"
602
602
  s.description = "desc"
603
- s.require_path = 'lib'
603
+ s.require_path = "lib"
604
604
  end
605
605
 
606
606
  util_make_exec
607
607
  installer.gem_dir = @spec.gem_dir
608
608
  installer.generate_bin
609
- installed_exec = File.join(util_inst_bindir, 'executable')
610
- assert_equal(@spec.bin_file('executable'),
609
+ installed_exec = File.join(util_inst_bindir, "executable")
610
+ assert_equal(@spec.bin_file("executable"),
611
611
  File.readlink(installed_exec),
612
612
  "Ensure symlink moved to latest version")
613
613
  end
@@ -622,17 +622,17 @@ gem 'other', version
622
622
  installer.gem_dir = @spec.gem_dir
623
623
 
624
624
  installer.generate_bin
625
- installed_exec = File.join(util_inst_bindir, 'executable')
626
- assert_equal(File.join(@spec.gem_dir, 'bin', 'executable'),
625
+ installed_exec = File.join(util_inst_bindir, "executable")
626
+ assert_equal(File.join(@spec.gem_dir, "bin", "executable"),
627
627
  File.readlink(installed_exec))
628
628
 
629
629
  spec = Gem::Specification.new do |s|
630
- s.files = ['lib/code.rb']
630
+ s.files = ["lib/code.rb"]
631
631
  s.name = "a"
632
632
  s.version = "1"
633
633
  s.summary = "summary"
634
634
  s.description = "desc"
635
- s.require_path = 'lib'
635
+ s.require_path = "lib"
636
636
  end
637
637
 
638
638
  util_make_exec
@@ -643,8 +643,8 @@ gem 'other', version
643
643
 
644
644
  installer.generate_bin
645
645
 
646
- installed_exec = File.join util_inst_bindir, 'executable'
647
- expected = File.join @spec.gem_dir, 'bin', 'executable'
646
+ installed_exec = File.join util_inst_bindir, "executable"
647
+ expected = File.join @spec.gem_dir, "bin", "executable"
648
648
  assert_equal(expected,
649
649
  File.readlink(installed_exec),
650
650
  "Ensure symlink not moved")
@@ -661,16 +661,16 @@ gem 'other', version
661
661
 
662
662
  installer.generate_bin
663
663
 
664
- installed_exec = File.join util_inst_bindir, 'executable'
664
+ installed_exec = File.join util_inst_bindir, "executable"
665
665
  assert_path_exist installed_exec
666
666
 
667
667
  @spec = Gem::Specification.new do |s|
668
- s.files = ['lib/code.rb']
668
+ s.files = ["lib/code.rb"]
669
669
  s.name = "a"
670
670
  s.version = "3"
671
671
  s.summary = "summary"
672
672
  s.description = "desc"
673
- s.require_path = 'lib'
673
+ s.require_path = "lib"
674
674
  end
675
675
  util_make_exec
676
676
 
@@ -680,8 +680,8 @@ gem 'other', version
680
680
 
681
681
  installer.generate_bin
682
682
 
683
- installed_exec = File.join util_inst_bindir, 'executable'
684
- assert_equal(@spec.bin_file('executable'),
683
+ installed_exec = File.join util_inst_bindir, "executable"
684
+ assert_equal(@spec.bin_file("executable"),
685
685
  File.readlink(installed_exec),
686
686
  "Ensure symlink moved to latest version")
687
687
  end
@@ -691,7 +691,7 @@ gem 'other', version
691
691
  Gem.win_platform = true
692
692
  old_alt_separator = File::ALT_SEPARATOR
693
693
  File.__send__(:remove_const, :ALT_SEPARATOR)
694
- File.const_set(:ALT_SEPARATOR, '\\')
694
+ File.const_set(:ALT_SEPARATOR, "\\")
695
695
 
696
696
  installer = setup_base_installer
697
697
 
@@ -704,7 +704,7 @@ gem 'other', version
704
704
  end
705
705
 
706
706
  assert_directory_exists util_inst_bindir
707
- installed_exec = File.join(util_inst_bindir, 'executable')
707
+ installed_exec = File.join(util_inst_bindir, "executable")
708
708
  assert_path_exist installed_exec
709
709
 
710
710
  if symlink_supported?
@@ -726,7 +726,7 @@ gem 'other', version
726
726
  def test_generate_bin_uses_default_shebang
727
727
  pend "Symlinks not supported or not enabled" unless symlink_supported?
728
728
 
729
- load_relative 'no' do
729
+ load_relative "no" do
730
730
  installer = setup_base_installer
731
731
 
732
732
  installer.wrappers = true
@@ -762,7 +762,7 @@ gem 'other', version
762
762
 
763
763
  def test_generate_plugins
764
764
  installer = util_setup_installer do |spec|
765
- write_file File.join(@tempdir, 'lib', 'rubygems_plugin.rb') do |io|
765
+ write_file File.join(@tempdir, "lib", "rubygems_plugin.rb") do |io|
766
766
  io.write "puts __FILE__"
767
767
  end
768
768
 
@@ -773,18 +773,18 @@ gem 'other', version
773
773
  installer.install
774
774
  end
775
775
 
776
- plugin_path = File.join Gem.plugindir, 'a_plugin.rb'
776
+ plugin_path = File.join Gem.plugindir, "a_plugin.rb"
777
777
 
778
778
  FileUtils.rm plugin_path
779
779
 
780
780
  installer.generate_plugins
781
781
 
782
- assert File.exist?(plugin_path), 'plugin not written'
782
+ assert File.exist?(plugin_path), "plugin not written"
783
783
  end
784
784
 
785
785
  def test_generate_plugins_with_install_dir
786
- spec = quick_gem 'a' do |s|
787
- write_file File.join(@tempdir, 'lib', 'rubygems_plugin.rb') do |io|
786
+ spec = quick_gem "a" do |s|
787
+ write_file File.join(@tempdir, "lib", "rubygems_plugin.rb") do |io|
788
788
  io.write "puts __FILE__"
789
789
  end
790
790
 
@@ -793,17 +793,17 @@ gem 'other', version
793
793
 
794
794
  util_build_gem spec
795
795
 
796
- plugin_path = File.join "#{@gemhome}2", 'plugins', 'a_plugin.rb'
796
+ plugin_path = File.join "#{@gemhome}2", "plugins", "a_plugin.rb"
797
797
  installer = util_installer spec, "#{@gemhome}2"
798
798
 
799
799
  assert_equal spec, installer.install
800
800
 
801
- assert File.exist?(plugin_path), 'plugin not written to install_dir'
801
+ assert File.exist?(plugin_path), "plugin not written to install_dir"
802
802
  end
803
803
 
804
804
  def test_generate_plugins_with_user_install
805
- spec = quick_gem 'a' do |s|
806
- write_file File.join(@tempdir, 'lib', 'rubygems_plugin.rb') do |io|
805
+ spec = quick_gem "a" do |s|
806
+ write_file File.join(@tempdir, "lib", "rubygems_plugin.rb") do |io|
807
807
  io.write "puts __FILE__"
808
808
  end
809
809
 
@@ -813,19 +813,19 @@ gem 'other', version
813
813
  util_build_gem spec
814
814
 
815
815
  File.chmod(0555, Gem.plugindir)
816
- system_path = File.join(Gem.plugindir, 'a_plugin.rb')
817
- user_path = File.join(Gem.plugindir(Gem.user_dir), 'a_plugin.rb')
816
+ system_path = File.join(Gem.plugindir, "a_plugin.rb")
817
+ user_path = File.join(Gem.plugindir(Gem.user_dir), "a_plugin.rb")
818
818
  installer = util_installer spec, Gem.dir, :user
819
819
 
820
820
  assert_equal spec, installer.install
821
821
 
822
- assert !File.exist?(system_path), 'plugin incorrectly written to system plugins_dir'
823
- assert File.exist?(user_path), 'plugin not written to user plugins_dir'
822
+ assert !File.exist?(system_path), "plugin incorrectly written to system plugins_dir"
823
+ assert File.exist?(user_path), "plugin not written to user plugins_dir"
824
824
  end
825
825
 
826
826
  def test_generate_plugins_with_build_root
827
- spec = quick_gem 'a' do |s|
828
- write_file File.join(@tempdir, 'lib', 'rubygems_plugin.rb') do |io|
827
+ spec = quick_gem "a" do |s|
828
+ write_file File.join(@tempdir, "lib", "rubygems_plugin.rb") do |io|
829
829
  io.write "puts __FILE__"
830
830
  end
831
831
 
@@ -835,17 +835,17 @@ gem 'other', version
835
835
  util_build_gem spec
836
836
 
837
837
  File.chmod(0555, Gem.plugindir)
838
- system_path = File.join(Gem.plugindir, 'a_plugin.rb')
838
+ system_path = File.join(Gem.plugindir, "a_plugin.rb")
839
839
 
840
- build_root = File.join(@tempdir, 'build_root')
841
- build_root_path = File.join(build_root, Gem.plugindir.gsub(/^[a-zA-Z]:/, ''), 'a_plugin.rb')
840
+ build_root = File.join(@tempdir, "build_root")
841
+ build_root_path = File.join(build_root, Gem.plugindir.gsub(/^[a-zA-Z]:/, ""), "a_plugin.rb")
842
842
 
843
843
  installer = Gem::Installer.at spec.cache_file, :build_root => build_root
844
844
 
845
845
  assert_equal spec, installer.install
846
846
 
847
- assert !File.exist?(system_path), 'plugin written incorrect written to system plugins_dir'
848
- assert File.exist?(build_root_path), 'plugin not written to build_root'
847
+ assert !File.exist?(system_path), "plugin written incorrect written to system plugins_dir"
848
+ assert File.exist?(build_root_path), "plugin not written to build_root"
849
849
 
850
850
  refute_includes File.read(build_root_path), build_root
851
851
  end
@@ -853,49 +853,49 @@ gem 'other', version
853
853
  def test_keeps_plugins_up_to_date
854
854
  # NOTE: version a-2 is already installed by setup hooks
855
855
 
856
- write_file File.join(@tempdir, 'lib', 'rubygems_plugin.rb') do |io|
856
+ write_file File.join(@tempdir, "lib", "rubygems_plugin.rb") do |io|
857
857
  io.write "puts __FILE__"
858
858
  end
859
859
 
860
860
  build_rake_in do
861
861
  util_setup_installer do |spec|
862
- spec.version = '1'
862
+ spec.version = "1"
863
863
  spec.files += %w[lib/rubygems_plugin.rb]
864
864
  end.install
865
865
 
866
- plugin_path = File.join Gem.plugindir, 'a_plugin.rb'
867
- refute File.exist?(plugin_path), 'old version installed while newer version without plugin also installed, but plugin written'
866
+ plugin_path = File.join Gem.plugindir, "a_plugin.rb"
867
+ refute File.exist?(plugin_path), "old version installed while newer version without plugin also installed, but plugin written"
868
868
 
869
869
  util_setup_installer do |spec|
870
- spec.version = '2'
870
+ spec.version = "2"
871
871
  spec.files += %w[lib/rubygems_plugin.rb]
872
872
  end.install
873
873
 
874
- plugin_path = File.join Gem.plugindir, 'a_plugin.rb'
875
- assert File.exist?(plugin_path), 'latest version reinstalled, but plugin not written'
876
- assert_match %r{\Arequire.*a-2/lib/rubygems_plugin\.rb}, File.read(plugin_path), 'written plugin has incorrect content'
874
+ plugin_path = File.join Gem.plugindir, "a_plugin.rb"
875
+ assert File.exist?(plugin_path), "latest version reinstalled, but plugin not written"
876
+ assert_match %r{\Arequire.*a-2/lib/rubygems_plugin\.rb}, File.read(plugin_path), "written plugin has incorrect content"
877
877
 
878
878
  util_setup_installer do |spec|
879
- spec.version = '3'
879
+ spec.version = "3"
880
880
  spec.files += %w[lib/rubygems_plugin.rb]
881
881
  end.install
882
882
 
883
- plugin_path = File.join Gem.plugindir, 'a_plugin.rb'
884
- assert File.exist?(plugin_path), 'latest version installed, but plugin removed'
885
- assert_match %r{\Arequire.*a-3/lib/rubygems_plugin\.rb}, File.read(plugin_path), 'written plugin has incorrect content'
883
+ plugin_path = File.join Gem.plugindir, "a_plugin.rb"
884
+ assert File.exist?(plugin_path), "latest version installed, but plugin removed"
885
+ assert_match %r{\Arequire.*a-3/lib/rubygems_plugin\.rb}, File.read(plugin_path), "written plugin has incorrect content"
886
886
 
887
887
  util_setup_installer do |spec|
888
- spec.version = '4'
888
+ spec.version = "4"
889
889
  end.install
890
890
 
891
- refute File.exist?(plugin_path), 'new version installed without a plugin while older version with a plugin installed, but plugin not removed'
891
+ refute File.exist?(plugin_path), "new version installed without a plugin while older version with a plugin installed, but plugin not removed"
892
892
  end
893
893
  end
894
894
 
895
895
  def test_generates_plugins_dir_under_install_dir_if_not_there
896
896
  Gem.use_paths "#{@gemhome}2" # Set GEM_HOME to an uninitialized repo
897
897
 
898
- @spec = util_spec 'a'
898
+ @spec = util_spec "a"
899
899
 
900
900
  path = Gem::Package.build @spec
901
901
 
@@ -904,8 +904,8 @@ gem 'other', version
904
904
  end
905
905
 
906
906
  def test_initialize
907
- spec = util_spec 'a' do |s|
908
- s.platform = Gem::Platform.new 'mswin32'
907
+ spec = util_spec "a" do |s|
908
+ s.platform = Gem::Platform.new "mswin32"
909
909
  end
910
910
 
911
911
  gem = File.join @tempdir, spec.file_name
@@ -916,8 +916,8 @@ gem 'other', version
916
916
 
917
917
  installer = Gem::Installer.at gem
918
918
 
919
- assert_equal File.join(@gemhome, 'gems', spec.full_name), installer.gem_dir
920
- assert_equal File.join(@gemhome, 'bin'), installer.bin_dir
919
+ assert_equal File.join(@gemhome, "gems", spec.full_name), installer.gem_dir
920
+ assert_equal File.join(@gemhome, "bin"), installer.bin_dir
921
921
  end
922
922
 
923
923
  def test_initialize_user_install
@@ -925,7 +925,7 @@ gem 'other', version
925
925
 
926
926
  installer = Gem::Installer.at @gem, :user_install => true
927
927
 
928
- assert_equal File.join(Gem.user_dir, 'gems', @spec.full_name),
928
+ assert_equal File.join(Gem.user_dir, "gems", @spec.full_name),
929
929
  installer.gem_dir
930
930
  assert_equal Gem.bindir(Gem.user_dir), installer.bin_dir
931
931
  end
@@ -936,7 +936,7 @@ gem 'other', version
936
936
  installer =
937
937
  Gem::Installer.at @gem, :user_install => true, :bin_dir => @tempdir
938
938
 
939
- assert_equal File.join(Gem.user_dir, 'gems', @spec.full_name),
939
+ assert_equal File.join(Gem.user_dir, "gems", @spec.full_name),
940
940
  installer.gem_dir
941
941
  assert_equal @tempdir, installer.bin_dir
942
942
  end
@@ -944,26 +944,26 @@ gem 'other', version
944
944
  def test_install
945
945
  installer = util_setup_installer
946
946
 
947
- gemdir = File.join @gemhome, 'gems', @spec.full_name
948
- cache_file = File.join @gemhome, 'cache', @spec.file_name
949
- stub_exe = File.join @gemhome, 'bin', 'executable'
950
- rakefile = File.join gemdir, 'ext', 'a', 'Rakefile'
951
- spec_file = File.join @gemhome, 'specifications', @spec.spec_name
947
+ gemdir = File.join @gemhome, "gems", @spec.full_name
948
+ cache_file = File.join @gemhome, "cache", @spec.file_name
949
+ stub_exe = File.join @gemhome, "bin", "executable"
950
+ rakefile = File.join gemdir, "ext", "a", "Rakefile"
951
+ spec_file = File.join @gemhome, "specifications", @spec.spec_name
952
952
 
953
953
  Gem.pre_install do
954
- assert_path_not_exist cache_file, 'cache file must not exist yet'
954
+ assert_path_not_exist cache_file, "cache file must not exist yet"
955
955
  true
956
956
  end
957
957
 
958
958
  Gem.post_build do
959
- assert_path_exist gemdir, 'gem install dir must exist'
960
- assert_path_exist rakefile, 'gem executable must exist'
961
- assert_path_not_exist stub_exe, 'gem executable must not exist'
959
+ assert_path_exist gemdir, "gem install dir must exist"
960
+ assert_path_exist rakefile, "gem executable must exist"
961
+ assert_path_not_exist stub_exe, "gem executable must not exist"
962
962
  true
963
963
  end
964
964
 
965
965
  Gem.post_install do
966
- assert_path_exist cache_file, 'cache file must exist'
966
+ assert_path_exist cache_file, "cache file must exist"
967
967
  end
968
968
 
969
969
  @newspec = nil
@@ -975,15 +975,15 @@ gem 'other', version
975
975
 
976
976
  assert_equal @spec, @newspec
977
977
  assert_path_exist gemdir
978
- assert_path_exist stub_exe, 'gem executable must exist'
978
+ assert_path_exist stub_exe, "gem executable must exist"
979
979
 
980
- exe = File.join gemdir, 'bin', 'executable'
980
+ exe = File.join gemdir, "bin", "executable"
981
981
  assert_path_exist exe
982
982
 
983
983
  exe_mode = File.stat(exe).mode & 0111
984
984
  assert_equal 0111, exe_mode, "0%o" % exe_mode unless win_platform?
985
985
 
986
- assert_path_exist File.join gemdir, 'lib', 'code.rb'
986
+ assert_path_exist File.join gemdir, "lib", "code.rb"
987
987
 
988
988
  assert_path_exist rakefile
989
989
 
@@ -1000,7 +1000,7 @@ gem 'other', version
1000
1000
 
1001
1001
  installer.wrappers = true
1002
1002
 
1003
- gemdir = File.join @gemhome, 'gems', @spec.full_name
1003
+ gemdir = File.join @gemhome, "gems", @spec.full_name
1004
1004
 
1005
1005
  @newspec = nil
1006
1006
  build_rake_in do
@@ -1009,7 +1009,7 @@ gem 'other', version
1009
1009
  end
1010
1010
  end
1011
1011
 
1012
- exe = File.join gemdir, 'bin', 'executable'
1012
+ exe = File.join gemdir, "bin", "executable"
1013
1013
 
1014
1014
  e = assert_raise RuntimeError do
1015
1015
  instance_eval File.read(exe)
@@ -1023,10 +1023,10 @@ gem 'other', version
1023
1023
 
1024
1024
  # build old version that has a bin file
1025
1025
  installer = util_setup_gem do |spec|
1026
- File.open File.join('bin', 'executable'), 'w' do |f|
1026
+ File.open File.join("bin", "executable"), "w" do |f|
1027
1027
  f.puts "require 'code'"
1028
1028
  end
1029
- File.open File.join('lib', 'code.rb'), 'w' do |f|
1029
+ File.open File.join("lib", "code.rb"), "w" do |f|
1030
1030
  f.puts 'raise "I have an executable"'
1031
1031
  end
1032
1032
  end
@@ -1038,15 +1038,15 @@ gem 'other', version
1038
1038
  end
1039
1039
  end
1040
1040
 
1041
- old_bin_file = File.join installer.bin_dir, 'executable'
1041
+ old_bin_file = File.join installer.bin_dir, "executable"
1042
1042
 
1043
1043
  # build new version that doesn't have a bin file
1044
1044
  installer = util_setup_gem do |spec|
1045
- FileUtils.rm File.join('bin', 'executable')
1046
- spec.files.delete File.join('bin', 'executable')
1047
- spec.executables.delete 'executable'
1045
+ FileUtils.rm File.join("bin", "executable")
1046
+ spec.files.delete File.join("bin", "executable")
1047
+ spec.executables.delete "executable"
1048
1048
  spec.version = @spec.version.bump
1049
- File.open File.join('lib', 'code.rb'), 'w' do |f|
1049
+ File.open File.join("lib", "code.rb"), "w" do |f|
1050
1050
  f.puts 'raise "I do not have an executable"'
1051
1051
  end
1052
1052
  end
@@ -1063,7 +1063,7 @@ gem 'other', version
1063
1063
 
1064
1064
  # We expect the bin stub to activate the version that actually contains
1065
1065
  # the binstub.
1066
- assert_match('I have an executable', e.message)
1066
+ assert_match("I have an executable", e.message)
1067
1067
  end
1068
1068
 
1069
1069
  def test_install_creates_binstub_that_understand_version
@@ -1078,7 +1078,7 @@ gem 'other', version
1078
1078
  end
1079
1079
  end
1080
1080
 
1081
- exe = File.join @gemhome, 'bin', 'executable'
1081
+ exe = File.join @gemhome, "bin", "executable"
1082
1082
 
1083
1083
  ARGV.unshift "_3.0_"
1084
1084
 
@@ -1096,17 +1096,17 @@ gem 'other', version
1096
1096
  end
1097
1097
 
1098
1098
  def test_install_creates_binstub_that_prefers_user_installed_gem_to_default
1099
- default_spec = new_default_spec('default', '2', nil, 'exe/executable')
1100
- default_spec.executables = 'executable'
1099
+ default_spec = new_default_spec("default", "2", nil, "exe/executable")
1100
+ default_spec.executables = "executable"
1101
1101
  install_default_gems default_spec
1102
1102
 
1103
- exe = File.join @gemhome, 'bin', 'executable'
1103
+ exe = File.join @gemhome, "bin", "executable"
1104
1104
 
1105
1105
  assert_path_exist exe, "default gem's executable not installed"
1106
1106
 
1107
1107
  installer = util_setup_installer do |spec|
1108
- spec.name = 'default'
1109
- spec.version = '2'
1108
+ spec.name = "default"
1109
+ spec.version = "2"
1110
1110
  end
1111
1111
 
1112
1112
  util_clear_gems
@@ -1139,7 +1139,7 @@ gem 'other', version
1139
1139
  end
1140
1140
  end
1141
1141
 
1142
- exe = File.join @gemhome, 'bin', 'executable'
1142
+ exe = File.join @gemhome, "bin", "executable"
1143
1143
 
1144
1144
  extra_arg = "\xE4pfel".dup.force_encoding("UTF-8")
1145
1145
  ARGV.unshift extra_arg
@@ -1166,16 +1166,16 @@ gem 'other', version
1166
1166
  end
1167
1167
  end
1168
1168
 
1169
- gemdir = File.join(@gemhome, 'gems', @spec.full_name)
1170
- assert_path_exist File.join gemdir, 'lib', 'code.rb'
1169
+ gemdir = File.join(@gemhome, "gems", @spec.full_name)
1170
+ assert_path_exist File.join gemdir, "lib", "code.rb"
1171
1171
 
1172
1172
  installer = util_setup_installer
1173
1173
 
1174
1174
  # Morph spec to have lib/other.rb instead of code.rb and recreate
1175
- @spec.files = File.join('lib', 'other.rb')
1175
+ @spec.files = File.join("lib", "other.rb")
1176
1176
  Dir.chdir @tempdir do
1177
- File.open File.join('lib', 'other.rb'), 'w' do |f|
1178
- f.puts '1'
1177
+ File.open File.join("lib", "other.rb"), "w" do |f|
1178
+ f.puts "1"
1179
1179
  end
1180
1180
 
1181
1181
  use_ui ui do
@@ -1190,14 +1190,14 @@ gem 'other', version
1190
1190
  end
1191
1191
  end
1192
1192
 
1193
- assert_path_exist File.join gemdir, 'lib', 'other.rb'
1194
- assert_path_not_exist File.join gemdir, 'lib', 'code.rb',
1193
+ assert_path_exist File.join gemdir, "lib", "other.rb"
1194
+ assert_path_not_exist File.join gemdir, "lib", "code.rb",
1195
1195
  "code.rb from prior install of same gem shouldn't remain here"
1196
1196
  end
1197
1197
 
1198
1198
  def test_install_force
1199
- _, missing_dep_gem = util_gem 'missing_dep', '1' do |s|
1200
- s.add_dependency 'doesnt_exist', '1'
1199
+ _, missing_dep_gem = util_gem "missing_dep", "1" do |s|
1200
+ s.add_dependency "doesnt_exist", "1"
1201
1201
  end
1202
1202
 
1203
1203
  use_ui @ui do
@@ -1205,12 +1205,12 @@ gem 'other', version
1205
1205
  installer.install
1206
1206
  end
1207
1207
 
1208
- gem_dir = File.join(@gemhome, 'gems', 'missing_dep-1')
1208
+ gem_dir = File.join(@gemhome, "gems", "missing_dep-1")
1209
1209
  assert_path_exist gem_dir
1210
1210
  end
1211
1211
 
1212
1212
  def test_install_build_root
1213
- build_root = File.join(@tempdir, 'build_root')
1213
+ build_root = File.join(@tempdir, "build_root")
1214
1214
 
1215
1215
  @gem = setup_base_gem
1216
1216
  installer = Gem::Installer.at @gem, :build_root => build_root
@@ -1221,22 +1221,22 @@ gem 'other', version
1221
1221
  def test_install_missing_dirs
1222
1222
  installer = setup_base_installer
1223
1223
 
1224
- FileUtils.rm_rf File.join(Gem.dir, 'doc')
1225
- FileUtils.rm_rf File.join(Gem.dir, 'specifications')
1224
+ FileUtils.rm_rf File.join(Gem.dir, "doc")
1225
+ FileUtils.rm_rf File.join(Gem.dir, "specifications")
1226
1226
 
1227
1227
  use_ui @ui do
1228
1228
  installer.install
1229
1229
  end
1230
1230
 
1231
- assert_directory_exists File.join(Gem.dir, 'doc')
1232
- assert_directory_exists File.join(Gem.dir, 'specifications')
1231
+ assert_directory_exists File.join(Gem.dir, "doc")
1232
+ assert_directory_exists File.join(Gem.dir, "specifications")
1233
1233
 
1234
- assert_path_exist File.join @gemhome, 'cache', @spec.file_name
1235
- assert_path_exist File.join @gemhome, 'specifications', @spec.spec_name
1234
+ assert_path_exist File.join @gemhome, "cache", @spec.file_name
1235
+ assert_path_exist File.join @gemhome, "specifications", @spec.spec_name
1236
1236
  end
1237
1237
 
1238
1238
  def test_install_post_build_false
1239
- @spec = util_spec 'a'
1239
+ @spec = util_spec "a"
1240
1240
 
1241
1241
  util_build_gem @spec
1242
1242
 
@@ -1256,10 +1256,10 @@ gem 'other', version
1256
1256
  assert_equal "post-build hook at #{location} failed for a-2", e.message
1257
1257
  end
1258
1258
 
1259
- spec_file = File.join @gemhome, 'specifications', @spec.spec_name
1259
+ spec_file = File.join @gemhome, "specifications", @spec.spec_name
1260
1260
  assert_path_not_exist spec_file
1261
1261
 
1262
- gem_dir = File.join @gemhome, 'gems', @spec.full_name
1262
+ gem_dir = File.join @gemhome, "gems", @spec.full_name
1263
1263
  assert_path_not_exist gem_dir
1264
1264
  end
1265
1265
 
@@ -1274,15 +1274,15 @@ gem 'other', version
1274
1274
  installer.install
1275
1275
  end
1276
1276
 
1277
- spec_file = File.join @gemhome, 'specifications', @spec.spec_name
1277
+ spec_file = File.join @gemhome, "specifications", @spec.spec_name
1278
1278
  assert_path_exist spec_file
1279
1279
 
1280
- gem_dir = File.join @gemhome, 'gems', @spec.full_name
1280
+ gem_dir = File.join @gemhome, "gems", @spec.full_name
1281
1281
  assert_path_exist gem_dir
1282
1282
  end
1283
1283
 
1284
1284
  def test_install_pre_install_false
1285
- @spec = util_spec 'a'
1285
+ @spec = util_spec "a"
1286
1286
 
1287
1287
  util_build_gem @spec
1288
1288
 
@@ -1302,7 +1302,7 @@ gem 'other', version
1302
1302
  assert_equal "pre-install hook at #{location} failed for a-2", e.message
1303
1303
  end
1304
1304
 
1305
- spec_file = File.join @gemhome, 'specifications', @spec.spec_name
1305
+ spec_file = File.join @gemhome, "specifications", @spec.spec_name
1306
1306
  assert_path_not_exist spec_file
1307
1307
  end
1308
1308
 
@@ -1317,13 +1317,13 @@ gem 'other', version
1317
1317
  installer.install
1318
1318
  end
1319
1319
 
1320
- spec_file = File.join @gemhome, 'specifications', @spec.spec_name
1320
+ spec_file = File.join @gemhome, "specifications", @spec.spec_name
1321
1321
  assert_path_exist spec_file
1322
1322
  end
1323
1323
 
1324
1324
  def test_install_with_message
1325
1325
  @spec = setup_base_spec
1326
- @spec.post_install_message = 'I am a shiny gem!'
1326
+ @spec.post_install_message = "I am a shiny gem!"
1327
1327
 
1328
1328
  use_ui @ui do
1329
1329
  path = Gem::Package.build @spec
@@ -1337,7 +1337,7 @@ gem 'other', version
1337
1337
 
1338
1338
  def test_install_with_skipped_message
1339
1339
  @spec = setup_base_spec
1340
- @spec.post_install_message = 'I am a shiny gem!'
1340
+ @spec.post_install_message = "I am a shiny gem!"
1341
1341
 
1342
1342
  use_ui @ui do
1343
1343
  path = Gem::Package.build @spec
@@ -1370,7 +1370,7 @@ gem 'other', version
1370
1370
  installer.install
1371
1371
  end
1372
1372
 
1373
- expected_makefile = File.join gemhome2, 'gems', @spec.full_name, 'Makefile'
1373
+ expected_makefile = File.join gemhome2, "gems", @spec.full_name, "Makefile"
1374
1374
 
1375
1375
  assert_path_exist expected_makefile
1376
1376
  end
@@ -1435,11 +1435,11 @@ gem 'other', version
1435
1435
  installer.install
1436
1436
  end
1437
1437
 
1438
- expected_makefile = File.join Gem.user_dir, 'gems', @spec.full_name, 'Makefile'
1438
+ expected_makefile = File.join Gem.user_dir, "gems", @spec.full_name, "Makefile"
1439
1439
 
1440
1440
  assert_path_exist expected_makefile
1441
1441
  assert_path_exist expected_extension_dir
1442
- assert_path_not_exist File.join expected_extension_dir, 'gem_make.out'
1442
+ assert_path_not_exist File.join expected_extension_dir, "gem_make.out"
1443
1443
  end
1444
1444
 
1445
1445
  def test_find_lib_file_after_install
@@ -1469,7 +1469,7 @@ gem 'other', version
1469
1469
  end
1470
1470
 
1471
1471
  Dir.mkdir File.join(@tempdir, "lib")
1472
- write_file File.join(@tempdir, 'lib', "b.rb") do |io|
1472
+ write_file File.join(@tempdir, "lib", "b.rb") do |io|
1473
1473
  io.write "# b.rb"
1474
1474
  end
1475
1475
 
@@ -1483,14 +1483,14 @@ gem 'other', version
1483
1483
  end
1484
1484
 
1485
1485
  expected = File.join @spec.full_require_paths.find {|path|
1486
- File.exist? File.join path, 'b.rb'
1487
- }, 'b.rb'
1488
- assert_equal expected, @spec.matches_for_glob('b.rb').first
1486
+ File.exist? File.join path, "b.rb"
1487
+ }, "b.rb"
1488
+ assert_equal expected, @spec.matches_for_glob("b.rb").first
1489
1489
  end
1490
1490
 
1491
1491
  def test_install_extension_and_script
1492
1492
  pend "Makefile creation crashes on jruby" if Gem.java_platform?
1493
- pend if /mswin/ =~ RUBY_PLATFORM && ENV.key?('GITHUB_ACTIONS') # not working from the beginning
1493
+ pend if /mswin/ =~ RUBY_PLATFORM && ENV.key?("GITHUB_ACTIONS") # not working from the beginning
1494
1494
 
1495
1495
  @spec = setup_base_spec
1496
1496
  @spec.extensions << "extconf.rb"
@@ -1566,15 +1566,15 @@ gem 'other', version
1566
1566
  end
1567
1567
  assert_path_exist so
1568
1568
  rescue
1569
- puts '-' * 78
1570
- puts File.read File.join(@gemhome, 'gems', 'a-2', 'Makefile')
1571
- puts '-' * 78
1569
+ puts "-" * 78
1570
+ puts File.read File.join(@gemhome, "gems", "a-2", "Makefile")
1571
+ puts "-" * 78
1572
1572
 
1573
- path = File.join(@gemhome, 'gems', 'a-2', 'gem_make.out')
1573
+ path = File.join(@gemhome, "gems", "a-2", "gem_make.out")
1574
1574
 
1575
1575
  if File.exist?(path)
1576
1576
  puts File.read(path)
1577
- puts '-' * 78
1577
+ puts "-" * 78
1578
1578
  end
1579
1579
 
1580
1580
  raise
@@ -1584,12 +1584,12 @@ gem 'other', version
1584
1584
  def test_installation_satisfies_dependency_eh
1585
1585
  installer = setup_base_installer
1586
1586
 
1587
- util_spec 'a'
1587
+ util_spec "a"
1588
1588
 
1589
- dep = Gem::Dependency.new 'a', '>= 2'
1589
+ dep = Gem::Dependency.new "a", ">= 2"
1590
1590
  assert installer.installation_satisfies_dependency?(dep)
1591
1591
 
1592
- dep = Gem::Dependency.new 'a', '> 2'
1592
+ dep = Gem::Dependency.new "a", "> 2"
1593
1593
  refute installer.installation_satisfies_dependency?(dep)
1594
1594
  end
1595
1595
 
@@ -1598,15 +1598,15 @@ gem 'other', version
1598
1598
  installer.options[:development] = true
1599
1599
  installer.options[:dev_shallow] = true
1600
1600
 
1601
- util_spec 'a'
1601
+ util_spec "a"
1602
1602
 
1603
- dep = Gem::Dependency.new 'a', :development
1603
+ dep = Gem::Dependency.new "a", :development
1604
1604
  assert installer.installation_satisfies_dependency?(dep)
1605
1605
  end
1606
1606
 
1607
1607
  def test_pre_install_checks_dependencies
1608
1608
  installer = setup_base_installer
1609
- @spec.add_dependency 'b', '> 5'
1609
+ @spec.add_dependency "b", "> 5"
1610
1610
  installer = util_setup_gem
1611
1611
  installer.force = false
1612
1612
 
@@ -1619,7 +1619,7 @@ gem 'other', version
1619
1619
 
1620
1620
  def test_pre_install_checks_dependencies_ignore
1621
1621
  installer = util_setup_installer
1622
- @spec.add_dependency 'b', '> 5'
1622
+ @spec.add_dependency "b", "> 5"
1623
1623
  installer.ignore_dependencies = true
1624
1624
 
1625
1625
  build_rake_in do
@@ -1633,16 +1633,16 @@ gem 'other', version
1633
1633
  gemhome2 = "#{@gemhome}2"
1634
1634
 
1635
1635
  @gem = setup_base_gem
1636
- @spec.add_dependency 'd'
1636
+ @spec.add_dependency "d"
1637
1637
 
1638
- quick_gem 'd', 2
1638
+ quick_gem "d", 2
1639
1639
 
1640
1640
  gem = File.join @gemhome, @spec.file_name
1641
1641
 
1642
1642
  FileUtils.mv @gemhome, gemhome2
1643
1643
  FileUtils.mkdir @gemhome
1644
1644
 
1645
- FileUtils.mv File.join(gemhome2, 'cache', @spec.file_name), gem
1645
+ FileUtils.mv File.join(gemhome2, "cache", @spec.file_name), gem
1646
1646
 
1647
1647
  # Don't leak any already activated gems into the installer, require
1648
1648
  # that it work everything out on it's own.
@@ -1658,7 +1658,7 @@ gem 'other', version
1658
1658
  end
1659
1659
 
1660
1660
  def test_pre_install_checks_malicious_name
1661
- spec = util_spec '../malicious', '1'
1661
+ spec = util_spec "../malicious", "1"
1662
1662
  def spec.full_name # so the spec is buildable
1663
1663
  "malicious-1"
1664
1664
  end
@@ -1666,19 +1666,19 @@ gem 'other', version
1666
1666
 
1667
1667
  util_build_gem spec
1668
1668
 
1669
- gem = File.join(@gemhome, 'cache', spec.file_name)
1669
+ gem = File.join(@gemhome, "cache", spec.file_name)
1670
1670
 
1671
1671
  use_ui @ui do
1672
1672
  installer = Gem::Installer.at gem
1673
1673
  e = assert_raise Gem::InstallError do
1674
1674
  installer.pre_install_checks
1675
1675
  end
1676
- assert_equal '#<Gem::Specification name=../malicious version=1> has an invalid name', e.message
1676
+ assert_equal "#<Gem::Specification name=../malicious version=1> has an invalid name", e.message
1677
1677
  end
1678
1678
  end
1679
1679
 
1680
1680
  def test_pre_install_checks_malicious_name_before_eval
1681
- spec = util_spec "malicious\n::Object.const_set(:FROM_EVAL, true)#", '1'
1681
+ spec = util_spec "malicious\n::Object.const_set(:FROM_EVAL, true)#", "1"
1682
1682
  def spec.full_name # so the spec is buildable
1683
1683
  "malicious-1"
1684
1684
  end
@@ -1686,7 +1686,7 @@ gem 'other', version
1686
1686
 
1687
1687
  util_build_gem spec
1688
1688
 
1689
- gem = File.join(@gemhome, 'cache', spec.file_name)
1689
+ gem = File.join(@gemhome, "cache", spec.file_name)
1690
1690
 
1691
1691
  use_ui @ui do
1692
1692
  installer = Gem::Installer.at gem
@@ -1699,7 +1699,7 @@ gem 'other', version
1699
1699
  end
1700
1700
 
1701
1701
  def test_pre_install_checks_malicious_require_paths_before_eval
1702
- spec = util_spec "malicious", '1'
1702
+ spec = util_spec "malicious", "1"
1703
1703
  def spec.full_name # so the spec is buildable
1704
1704
  "malicious-1"
1705
1705
  end
@@ -1708,7 +1708,7 @@ gem 'other', version
1708
1708
 
1709
1709
  util_build_gem spec
1710
1710
 
1711
- gem = File.join(@gemhome, 'cache', spec.file_name)
1711
+ gem = File.join(@gemhome, "cache", spec.file_name)
1712
1712
 
1713
1713
  use_ui @ui do
1714
1714
  installer = Gem::Installer.at gem
@@ -1722,7 +1722,7 @@ gem 'other', version
1722
1722
  def test_pre_install_checks_malicious_extensions_before_eval
1723
1723
  pend "mswin environment disallow to create file contained the carriage return code." if Gem.win_platform?
1724
1724
 
1725
- spec = util_spec "malicious", '1'
1725
+ spec = util_spec "malicious", "1"
1726
1726
  def spec.full_name # so the spec is buildable
1727
1727
  "malicious-1"
1728
1728
  end
@@ -1731,7 +1731,7 @@ gem 'other', version
1731
1731
 
1732
1732
  util_build_gem spec
1733
1733
 
1734
- gem = File.join(@gemhome, 'cache', spec.file_name)
1734
+ gem = File.join(@gemhome, "cache", spec.file_name)
1735
1735
 
1736
1736
  use_ui @ui do
1737
1737
  installer = Gem::Installer.at gem
@@ -1743,7 +1743,7 @@ gem 'other', version
1743
1743
  end
1744
1744
 
1745
1745
  def test_pre_install_checks_malicious_specification_version_before_eval
1746
- spec = util_spec "malicious", '1'
1746
+ spec = util_spec "malicious", "1"
1747
1747
  def spec.full_name # so the spec is buildable
1748
1748
  "malicious-1"
1749
1749
  end
@@ -1752,7 +1752,7 @@ gem 'other', version
1752
1752
 
1753
1753
  util_build_gem spec
1754
1754
 
1755
- gem = File.join(@gemhome, 'cache', spec.file_name)
1755
+ gem = File.join(@gemhome, "cache", spec.file_name)
1756
1756
 
1757
1757
  use_ui @ui do
1758
1758
  installer = Gem::Installer.at gem
@@ -1764,16 +1764,16 @@ gem 'other', version
1764
1764
  end
1765
1765
 
1766
1766
  def test_pre_install_checks_malicious_dependencies_before_eval
1767
- spec = util_spec "malicious", '1'
1767
+ spec = util_spec "malicious", "1"
1768
1768
  def spec.full_name # so the spec is buildable
1769
1769
  "malicious-1"
1770
1770
  end
1771
1771
  def spec.validate(*args); end
1772
- spec.add_dependency "b\nfoo", '> 5'
1772
+ spec.add_dependency "b\nfoo", "> 5"
1773
1773
 
1774
1774
  util_build_gem spec
1775
1775
 
1776
- gem = File.join(@gemhome, 'cache', spec.file_name)
1776
+ gem = File.join(@gemhome, "cache", spec.file_name)
1777
1777
 
1778
1778
  use_ui @ui do
1779
1779
  installer = Gem::Installer.at gem
@@ -1811,7 +1811,7 @@ gem 'other', version
1811
1811
 
1812
1812
  util_make_exec @spec, "#!/usr/bin/ruby"
1813
1813
 
1814
- shebang = installer.shebang 'executable'
1814
+ shebang = installer.shebang "executable"
1815
1815
 
1816
1816
  assert_equal "#!#{Gem.ruby}", shebang
1817
1817
  end
@@ -1821,15 +1821,15 @@ gem 'other', version
1821
1821
  installer = setup_base_installer
1822
1822
 
1823
1823
  assert_nil installer.build_root
1824
- assert_equal File.join(@gemhome, 'bin'), installer.bin_dir
1824
+ assert_equal File.join(@gemhome, "bin"), installer.bin_dir
1825
1825
  assert_equal @gemhome, installer.gem_home
1826
1826
  end
1827
1827
 
1828
1828
  def test_process_options_build_root
1829
- build_root = File.join @tempdir, 'build_root'
1830
- bin_dir = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'bin')
1831
- gem_home = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ''))
1832
- plugins_dir = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'plugins')
1829
+ build_root = File.join @tempdir, "build_root"
1830
+ bin_dir = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ""), "bin")
1831
+ gem_home = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ""))
1832
+ plugins_dir = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ""), "plugins")
1833
1833
 
1834
1834
  @gem = setup_base_gem
1835
1835
  installer = use_ui(@ui) { Gem::Installer.at @gem, :build_root => build_root }
@@ -1848,24 +1848,24 @@ gem 'other', version
1848
1848
  end
1849
1849
 
1850
1850
  def test_shebang_arguments
1851
- load_relative 'no' do
1851
+ load_relative "no" do
1852
1852
  installer = setup_base_installer
1853
1853
 
1854
1854
  util_make_exec @spec, "#!/usr/bin/ruby -ws"
1855
1855
 
1856
- shebang = installer.shebang 'executable'
1856
+ shebang = installer.shebang "executable"
1857
1857
 
1858
1858
  assert_equal "#!#{Gem.ruby} -ws", shebang
1859
1859
  end
1860
1860
  end
1861
1861
 
1862
1862
  def test_shebang_arguments_with_load_relative
1863
- load_relative 'yes' do
1863
+ load_relative "yes" do
1864
1864
  installer = setup_base_installer
1865
1865
 
1866
1866
  util_make_exec @spec, "#!/usr/bin/ruby -ws"
1867
1867
 
1868
- shebang = installer.shebang 'executable'
1868
+ shebang = installer.shebang "executable"
1869
1869
 
1870
1870
  shebang_lines = shebang.split "\n"
1871
1871
 
@@ -1875,47 +1875,47 @@ gem 'other', version
1875
1875
  end
1876
1876
 
1877
1877
  def test_shebang_empty
1878
- load_relative 'no' do
1878
+ load_relative "no" do
1879
1879
  installer = setup_base_installer
1880
1880
 
1881
- util_make_exec @spec, ''
1881
+ util_make_exec @spec, ""
1882
1882
 
1883
- shebang = installer.shebang 'executable'
1883
+ shebang = installer.shebang "executable"
1884
1884
  assert_equal "#!#{Gem.ruby}", shebang
1885
1885
  end
1886
1886
  end
1887
1887
 
1888
1888
  def test_shebang_env
1889
- load_relative 'no' do
1889
+ load_relative "no" do
1890
1890
  installer = setup_base_installer
1891
1891
 
1892
1892
  util_make_exec @spec, "#!/usr/bin/env ruby"
1893
1893
 
1894
- shebang = installer.shebang 'executable'
1894
+ shebang = installer.shebang "executable"
1895
1895
 
1896
1896
  assert_equal "#!#{Gem.ruby}", shebang
1897
1897
  end
1898
1898
  end
1899
1899
 
1900
1900
  def test_shebang_env_arguments
1901
- load_relative 'no' do
1901
+ load_relative "no" do
1902
1902
  installer = setup_base_installer
1903
1903
 
1904
1904
  util_make_exec @spec, "#!/usr/bin/env ruby -ws"
1905
1905
 
1906
- shebang = installer.shebang 'executable'
1906
+ shebang = installer.shebang "executable"
1907
1907
 
1908
1908
  assert_equal "#!#{Gem.ruby} -ws", shebang
1909
1909
  end
1910
1910
  end
1911
1911
 
1912
1912
  def test_shebang_env_arguments_with_load_relative
1913
- load_relative 'yes' do
1913
+ load_relative "yes" do
1914
1914
  installer = setup_base_installer
1915
1915
 
1916
1916
  util_make_exec @spec, "#!/usr/bin/env ruby -ws"
1917
1917
 
1918
- shebang = installer.shebang 'executable'
1918
+ shebang = installer.shebang "executable"
1919
1919
 
1920
1920
  shebang_lines = shebang.split "\n"
1921
1921
 
@@ -1927,10 +1927,10 @@ gem 'other', version
1927
1927
  def test_shebang_env_shebang
1928
1928
  installer = setup_base_installer
1929
1929
 
1930
- util_make_exec @spec, ''
1930
+ util_make_exec @spec, ""
1931
1931
  installer.env_shebang = true
1932
1932
 
1933
- shebang = installer.shebang 'executable'
1933
+ shebang = installer.shebang "executable"
1934
1934
 
1935
1935
  bin_env = get_bin_env
1936
1936
 
@@ -1939,36 +1939,36 @@ gem 'other', version
1939
1939
  end
1940
1940
 
1941
1941
  def test_shebang_nested
1942
- load_relative 'no' do
1942
+ load_relative "no" do
1943
1943
  installer = setup_base_installer
1944
1944
 
1945
1945
  util_make_exec @spec, "#!/opt/local/ruby/bin/ruby"
1946
1946
 
1947
- shebang = installer.shebang 'executable'
1947
+ shebang = installer.shebang "executable"
1948
1948
 
1949
1949
  assert_equal "#!#{Gem.ruby}", shebang
1950
1950
  end
1951
1951
  end
1952
1952
 
1953
1953
  def test_shebang_nested_arguments
1954
- load_relative 'no' do
1954
+ load_relative "no" do
1955
1955
  installer = setup_base_installer
1956
1956
 
1957
1957
  util_make_exec @spec, "#!/opt/local/ruby/bin/ruby -ws"
1958
1958
 
1959
- shebang = installer.shebang 'executable'
1959
+ shebang = installer.shebang "executable"
1960
1960
 
1961
1961
  assert_equal "#!#{Gem.ruby} -ws", shebang
1962
1962
  end
1963
1963
  end
1964
1964
 
1965
1965
  def test_shebang_nested_arguments_with_load_relative
1966
- load_relative 'yes' do
1966
+ load_relative "yes" do
1967
1967
  installer = setup_base_installer
1968
1968
 
1969
1969
  util_make_exec @spec, "#!/opt/local/ruby/bin/ruby -ws"
1970
1970
 
1971
- shebang = installer.shebang 'executable'
1971
+ shebang = installer.shebang "executable"
1972
1972
 
1973
1973
  shebang_lines = shebang.split "\n"
1974
1974
 
@@ -1978,36 +1978,36 @@ gem 'other', version
1978
1978
  end
1979
1979
 
1980
1980
  def test_shebang_version
1981
- load_relative 'no' do
1981
+ load_relative "no" do
1982
1982
  installer = setup_base_installer
1983
1983
 
1984
1984
  util_make_exec @spec, "#!/usr/bin/ruby18"
1985
1985
 
1986
- shebang = installer.shebang 'executable'
1986
+ shebang = installer.shebang "executable"
1987
1987
 
1988
1988
  assert_equal "#!#{Gem.ruby}", shebang
1989
1989
  end
1990
1990
  end
1991
1991
 
1992
1992
  def test_shebang_version_arguments
1993
- load_relative 'no' do
1993
+ load_relative "no" do
1994
1994
  installer = setup_base_installer
1995
1995
 
1996
1996
  util_make_exec @spec, "#!/usr/bin/ruby18 -ws"
1997
1997
 
1998
- shebang = installer.shebang 'executable'
1998
+ shebang = installer.shebang "executable"
1999
1999
 
2000
2000
  assert_equal "#!#{Gem.ruby} -ws", shebang
2001
2001
  end
2002
2002
  end
2003
2003
 
2004
2004
  def test_shebang_version_arguments_with_load_relative
2005
- load_relative 'yes' do
2005
+ load_relative "yes" do
2006
2006
  installer = setup_base_installer
2007
2007
 
2008
2008
  util_make_exec @spec, "#!/usr/bin/ruby18 -ws"
2009
2009
 
2010
- shebang = installer.shebang 'executable'
2010
+ shebang = installer.shebang "executable"
2011
2011
 
2012
2012
  shebang_lines = shebang.split "\n"
2013
2013
 
@@ -2017,36 +2017,36 @@ gem 'other', version
2017
2017
  end
2018
2018
 
2019
2019
  def test_shebang_version_env
2020
- load_relative 'no' do
2020
+ load_relative "no" do
2021
2021
  installer = setup_base_installer
2022
2022
 
2023
2023
  util_make_exec @spec, "#!/usr/bin/env ruby18"
2024
2024
 
2025
- shebang = installer.shebang 'executable'
2025
+ shebang = installer.shebang "executable"
2026
2026
 
2027
2027
  assert_equal "#!#{Gem.ruby}", shebang
2028
2028
  end
2029
2029
  end
2030
2030
 
2031
2031
  def test_shebang_version_env_arguments
2032
- load_relative 'no' do
2032
+ load_relative "no" do
2033
2033
  installer = setup_base_installer
2034
2034
 
2035
2035
  util_make_exec @spec, "#!/usr/bin/env ruby18 -ws"
2036
2036
 
2037
- shebang = installer.shebang 'executable'
2037
+ shebang = installer.shebang "executable"
2038
2038
 
2039
2039
  assert_equal "#!#{Gem.ruby} -ws", shebang
2040
2040
  end
2041
2041
  end
2042
2042
 
2043
2043
  def test_shebang_version_env_arguments_with_load_relative
2044
- load_relative 'yes' do
2044
+ load_relative "yes" do
2045
2045
  installer = setup_base_installer
2046
2046
 
2047
2047
  util_make_exec @spec, "#!/usr/bin/env ruby18 -ws"
2048
2048
 
2049
- shebang = installer.shebang 'executable'
2049
+ shebang = installer.shebang "executable"
2050
2050
 
2051
2051
  shebang_lines = shebang.split "\n"
2052
2052
 
@@ -2059,13 +2059,13 @@ gem 'other', version
2059
2059
  installer = setup_base_installer
2060
2060
 
2061
2061
  conf = Gem::ConfigFile.new []
2062
- conf[:custom_shebang] = 'test'
2062
+ conf[:custom_shebang] = "test"
2063
2063
 
2064
2064
  Gem.configuration = conf
2065
2065
 
2066
2066
  util_make_exec @spec, "#!/usr/bin/ruby"
2067
2067
 
2068
- shebang = installer.shebang 'executable'
2068
+ shebang = installer.shebang "executable"
2069
2069
 
2070
2070
  assert_equal "#!test", shebang
2071
2071
  end
@@ -2083,13 +2083,13 @@ gem 'other', version
2083
2083
 
2084
2084
  bin_env = get_bin_env
2085
2085
  conf = Gem::ConfigFile.new []
2086
- conf[:custom_shebang] = '1 $env 2 $ruby 3 $exec 4 $name'
2086
+ conf[:custom_shebang] = "1 $env 2 $ruby 3 $exec 4 $name"
2087
2087
 
2088
2088
  Gem.configuration = conf
2089
2089
 
2090
2090
  util_make_exec @spec, "#!/usr/bin/ruby"
2091
2091
 
2092
- shebang = installer.shebang 'executable'
2092
+ shebang = installer.shebang "executable"
2093
2093
 
2094
2094
  assert_equal "#!1 #{bin_env} 2 #{Gem.ruby} 3 executable 4 a", shebang
2095
2095
  end
@@ -2099,13 +2099,13 @@ gem 'other', version
2099
2099
 
2100
2100
  bin_env = get_bin_env
2101
2101
  conf = Gem::ConfigFile.new []
2102
- conf[:custom_shebang] = '1 $env 2 $ruby 3 $exec'
2102
+ conf[:custom_shebang] = "1 $env 2 $ruby 3 $exec"
2103
2103
 
2104
2104
  Gem.configuration = conf
2105
2105
 
2106
2106
  util_make_exec @spec, "#!/usr/bin/ruby -ws"
2107
2107
 
2108
- shebang = installer.shebang 'executable'
2108
+ shebang = installer.shebang "executable"
2109
2109
 
2110
2110
  assert_equal "#!1 #{bin_env} 2 #{Gem.ruby} -ws 3 executable", shebang
2111
2111
  end
@@ -2113,14 +2113,14 @@ gem 'other', version
2113
2113
  def test_unpack
2114
2114
  installer = util_setup_installer
2115
2115
 
2116
- dest = File.join @gemhome, 'gems', @spec.full_name
2116
+ dest = File.join @gemhome, "gems", @spec.full_name
2117
2117
 
2118
2118
  Gem::Deprecate.skip_during do
2119
2119
  installer.unpack dest
2120
2120
  end
2121
2121
 
2122
- assert_path_exist File.join dest, 'lib', 'code.rb'
2123
- assert_path_exist File.join dest, 'bin', 'executable'
2122
+ assert_path_exist File.join dest, "lib", "code.rb"
2123
+ assert_path_exist File.join dest, "bin", "executable"
2124
2124
  end
2125
2125
 
2126
2126
  def test_write_build_info_file
@@ -2163,12 +2163,12 @@ gem 'other', version
2163
2163
 
2164
2164
  assert_path_not_exist @spec.build_info_file
2165
2165
  assert_path_exist \
2166
- File.join("#{@gemhome}2", 'build_info', "#{@spec.full_name}.info")
2166
+ File.join("#{@gemhome}2", "build_info", "#{@spec.full_name}.info")
2167
2167
  end
2168
2168
 
2169
2169
  def test_write_cache_file
2170
2170
  @gem = setup_base_gem
2171
- cache_file = File.join @gemhome, 'cache', @spec.file_name
2171
+ cache_file = File.join @gemhome, "cache", @spec.file_name
2172
2172
  gem = File.join @gemhome, @spec.file_name
2173
2173
 
2174
2174
  FileUtils.mv cache_file, gem
@@ -2226,7 +2226,7 @@ gem 'other', version
2226
2226
  end
2227
2227
 
2228
2228
  def test_default_gem_loaded_from
2229
- spec = util_spec 'a'
2229
+ spec = util_spec "a"
2230
2230
  installer = Gem::Installer.for_spec spec, :install_as_default => true
2231
2231
  installer.install
2232
2232
  assert_predicate spec, :default_gem?
@@ -2235,7 +2235,7 @@ gem 'other', version
2235
2235
  def test_default_gem_without_wrappers
2236
2236
  installer = setup_base_installer
2237
2237
 
2238
- FileUtils.rm_rf File.join(Gem.default_dir, 'specifications')
2238
+ FileUtils.rm_rf File.join(Gem.default_dir, "specifications")
2239
2239
 
2240
2240
  installer.wrappers = false
2241
2241
  installer.options[:install_as_default] = true
@@ -2245,20 +2245,20 @@ gem 'other', version
2245
2245
  installer.install
2246
2246
  end
2247
2247
 
2248
- assert_directory_exists File.join(@spec.gem_dir, 'bin')
2249
- installed_exec = File.join @spec.gem_dir, 'bin', 'executable'
2248
+ assert_directory_exists File.join(@spec.gem_dir, "bin")
2249
+ installed_exec = File.join @spec.gem_dir, "bin", "executable"
2250
2250
  assert_path_exist installed_exec
2251
2251
 
2252
- assert_directory_exists File.join(Gem.default_dir, 'specifications')
2253
- assert_directory_exists File.join(Gem.default_dir, 'specifications', 'default')
2252
+ assert_directory_exists File.join(Gem.default_dir, "specifications")
2253
+ assert_directory_exists File.join(Gem.default_dir, "specifications", "default")
2254
2254
 
2255
- default_spec = eval File.read File.join(Gem.default_dir, 'specifications', 'default', 'a-2.gemspec')
2255
+ default_spec = eval File.read File.join(Gem.default_dir, "specifications", "default", "a-2.gemspec")
2256
2256
  assert_equal Gem::Version.new("2"), default_spec.version
2257
- assert_equal ['bin/executable'], default_spec.files
2257
+ assert_equal ["bin/executable"], default_spec.files
2258
2258
 
2259
2259
  assert_directory_exists util_inst_bindir
2260
2260
 
2261
- installed_exec = File.join util_inst_bindir, 'executable'
2261
+ installed_exec = File.join util_inst_bindir, "executable"
2262
2262
  assert_path_exist installed_exec
2263
2263
 
2264
2264
  wrapper = File.read installed_exec
@@ -2284,7 +2284,7 @@ gem 'other', version
2284
2284
 
2285
2285
  assert_directory_exists util_inst_bindir
2286
2286
 
2287
- installed_exec = File.join util_inst_bindir, 'executable'
2287
+ installed_exec = File.join util_inst_bindir, "executable"
2288
2288
  assert_path_exist installed_exec
2289
2289
 
2290
2290
  wrapper = File.read installed_exec
@@ -2292,8 +2292,8 @@ gem 'other', version
2292
2292
  end
2293
2293
 
2294
2294
  def test_default_gem_with_exe_as_bindir
2295
- @spec = quick_gem 'c' do |spec|
2296
- util_make_exec spec, '#!/usr/bin/ruby', 'exe'
2295
+ @spec = quick_gem "c" do |spec|
2296
+ util_make_exec spec, "#!/usr/bin/ruby", "exe"
2297
2297
  end
2298
2298
 
2299
2299
  util_build_gem @spec
@@ -2309,16 +2309,16 @@ gem 'other', version
2309
2309
  installer.install
2310
2310
  end
2311
2311
 
2312
- assert_directory_exists File.join(@spec.gem_dir, 'exe')
2313
- installed_exec = File.join @spec.gem_dir, 'exe', 'executable'
2312
+ assert_directory_exists File.join(@spec.gem_dir, "exe")
2313
+ installed_exec = File.join @spec.gem_dir, "exe", "executable"
2314
2314
  assert_path_exist installed_exec
2315
2315
 
2316
- assert_directory_exists File.join(Gem.default_dir, 'specifications')
2317
- assert_directory_exists File.join(Gem.default_dir, 'specifications', 'default')
2316
+ assert_directory_exists File.join(Gem.default_dir, "specifications")
2317
+ assert_directory_exists File.join(Gem.default_dir, "specifications", "default")
2318
2318
 
2319
- default_spec = eval File.read File.join(Gem.default_dir, 'specifications', 'default', 'c-2.gemspec')
2319
+ default_spec = eval File.read File.join(Gem.default_dir, "specifications", "default", "c-2.gemspec")
2320
2320
  assert_equal Gem::Version.new("2"), default_spec.version
2321
- assert_equal ['exe/executable'], default_spec.files
2321
+ assert_equal ["exe/executable"], default_spec.files
2322
2322
  end
2323
2323
 
2324
2324
  def test_default_gem_to_specific_install_dir
@@ -2330,17 +2330,17 @@ gem 'other', version
2330
2330
  installer.install
2331
2331
  end
2332
2332
 
2333
- assert_directory_exists File.join("#{@gemhome}2", 'specifications')
2334
- assert_directory_exists File.join("#{@gemhome}2", 'specifications', 'default')
2333
+ assert_directory_exists File.join("#{@gemhome}2", "specifications")
2334
+ assert_directory_exists File.join("#{@gemhome}2", "specifications", "default")
2335
2335
 
2336
- default_spec = eval File.read File.join("#{@gemhome}2", 'specifications', 'default', 'a-2.gemspec')
2336
+ default_spec = eval File.read File.join("#{@gemhome}2", "specifications", "default", "a-2.gemspec")
2337
2337
  assert_equal Gem::Version.new("2"), default_spec.version
2338
- assert_equal ['bin/executable'], default_spec.files
2338
+ assert_equal ["bin/executable"], default_spec.files
2339
2339
  end
2340
2340
 
2341
2341
  def test_package_attribute
2342
- gem = quick_gem 'c' do |spec|
2343
- util_make_exec spec, '#!/usr/bin/ruby', 'exe'
2342
+ gem = quick_gem "c" do |spec|
2343
+ util_make_exec spec, "#!/usr/bin/ruby", "exe"
2344
2344
  end
2345
2345
 
2346
2346
  installer = util_installer(gem, @gemhome)
@@ -2349,8 +2349,8 @@ gem 'other', version
2349
2349
  end
2350
2350
 
2351
2351
  def test_gem_attribute
2352
- gem = quick_gem 'c' do |spec|
2353
- util_make_exec spec, '#!/usr/bin/ruby', 'exe'
2352
+ gem = quick_gem "c" do |spec|
2353
+ util_make_exec spec, "#!/usr/bin/ruby", "exe"
2354
2354
  end
2355
2355
 
2356
2356
  installer = util_installer(gem, @gemhome)
@@ -2361,14 +2361,14 @@ gem 'other', version
2361
2361
  private
2362
2362
 
2363
2363
  def util_execless
2364
- @spec = util_spec 'z'
2364
+ @spec = util_spec "z"
2365
2365
  util_build_gem @spec
2366
2366
 
2367
2367
  util_installer @spec, @gemhome
2368
2368
  end
2369
2369
 
2370
2370
  def util_conflict_executable(wrappers)
2371
- conflict = quick_gem 'conflict' do |spec|
2371
+ conflict = quick_gem "conflict" do |spec|
2372
2372
  util_make_exec spec
2373
2373
  end
2374
2374
 
@@ -2384,11 +2384,11 @@ gem 'other', version
2384
2384
  end
2385
2385
 
2386
2386
  def load_relative(value)
2387
- orig_LIBRUBY_RELATIVE = RbConfig::CONFIG['LIBRUBY_RELATIVE']
2388
- RbConfig::CONFIG['LIBRUBY_RELATIVE'] = value
2387
+ orig_LIBRUBY_RELATIVE = RbConfig::CONFIG["LIBRUBY_RELATIVE"]
2388
+ RbConfig::CONFIG["LIBRUBY_RELATIVE"] = value
2389
2389
 
2390
2390
  yield
2391
2391
  ensure
2392
- RbConfig::CONFIG['LIBRUBY_RELATIVE'] = orig_LIBRUBY_RELATIVE
2392
+ RbConfig::CONFIG["LIBRUBY_RELATIVE"] = orig_LIBRUBY_RELATIVE
2393
2393
  end
2394
2394
  end