rubygems-update 2.6.4 → 2.6.5

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 (288) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +18 -24
  3. data/CODE_OF_CONDUCT.md +2 -2
  4. data/CONTRIBUTING.rdoc +1 -1
  5. data/History.txt +30 -1
  6. data/Manifest.txt +233 -3
  7. data/Rakefile +30 -1
  8. data/appveyor.yml +0 -2
  9. data/bundler/CHANGELOG.md +2407 -0
  10. data/bundler/CODE_OF_CONDUCT.md +42 -0
  11. data/bundler/CONTRIBUTING.md +36 -0
  12. data/bundler/DEVELOPMENT.md +148 -0
  13. data/bundler/ISSUES.md +100 -0
  14. data/bundler/LICENSE.md +23 -0
  15. data/bundler/README.md +40 -0
  16. data/bundler/exe/bundle +35 -0
  17. data/bundler/exe/bundle_ruby +61 -0
  18. data/bundler/exe/bundler +22 -0
  19. data/bundler/lib/bundler.rb +455 -0
  20. data/bundler/lib/bundler/capistrano.rb +17 -0
  21. data/bundler/lib/bundler/cli.rb +497 -0
  22. data/bundler/lib/bundler/cli/binstubs.rb +40 -0
  23. data/bundler/lib/bundler/cli/cache.rb +35 -0
  24. data/bundler/lib/bundler/cli/check.rb +40 -0
  25. data/bundler/lib/bundler/cli/clean.rb +26 -0
  26. data/bundler/lib/bundler/cli/common.rb +56 -0
  27. data/bundler/lib/bundler/cli/config.rb +100 -0
  28. data/bundler/lib/bundler/cli/console.rb +39 -0
  29. data/bundler/lib/bundler/cli/exec.rb +82 -0
  30. data/bundler/lib/bundler/cli/gem.rb +214 -0
  31. data/bundler/lib/bundler/cli/init.rb +33 -0
  32. data/bundler/lib/bundler/cli/inject.rb +33 -0
  33. data/bundler/lib/bundler/cli/install.rb +225 -0
  34. data/bundler/lib/bundler/cli/lock.rb +48 -0
  35. data/bundler/lib/bundler/cli/open.rb +25 -0
  36. data/bundler/lib/bundler/cli/outdated.rb +151 -0
  37. data/bundler/lib/bundler/cli/package.rb +46 -0
  38. data/bundler/lib/bundler/cli/platform.rb +45 -0
  39. data/bundler/lib/bundler/cli/plugin.rb +23 -0
  40. data/bundler/lib/bundler/cli/show.rb +75 -0
  41. data/bundler/lib/bundler/cli/update.rb +72 -0
  42. data/bundler/lib/bundler/cli/viz.rb +27 -0
  43. data/bundler/lib/bundler/constants.rb +6 -0
  44. data/bundler/lib/bundler/current_ruby.rb +84 -0
  45. data/bundler/lib/bundler/definition.rb +744 -0
  46. data/bundler/lib/bundler/dep_proxy.rb +46 -0
  47. data/bundler/lib/bundler/dependency.rb +127 -0
  48. data/bundler/lib/bundler/deployment.rb +63 -0
  49. data/bundler/lib/bundler/deprecate.rb +16 -0
  50. data/bundler/lib/bundler/dsl.rb +512 -0
  51. data/bundler/lib/bundler/endpoint_specification.rb +129 -0
  52. data/bundler/lib/bundler/env.rb +83 -0
  53. data/bundler/lib/bundler/environment.rb +42 -0
  54. data/bundler/lib/bundler/environment_preserver.rb +38 -0
  55. data/bundler/lib/bundler/errors.rb +124 -0
  56. data/bundler/lib/bundler/fetcher.rb +304 -0
  57. data/bundler/lib/bundler/fetcher/base.rb +41 -0
  58. data/bundler/lib/bundler/fetcher/compact_index.rb +103 -0
  59. data/bundler/lib/bundler/fetcher/dependency.rb +92 -0
  60. data/bundler/lib/bundler/fetcher/downloader.rb +66 -0
  61. data/bundler/lib/bundler/fetcher/index.rb +51 -0
  62. data/bundler/lib/bundler/friendly_errors.rb +103 -0
  63. data/bundler/lib/bundler/gem_helper.rb +188 -0
  64. data/bundler/lib/bundler/gem_helpers.rb +32 -0
  65. data/bundler/lib/bundler/gem_remote_fetcher.rb +42 -0
  66. data/bundler/lib/bundler/gem_tasks.rb +6 -0
  67. data/bundler/lib/bundler/graph.rb +172 -0
  68. data/bundler/lib/bundler/index.rb +191 -0
  69. data/bundler/lib/bundler/injector.rb +63 -0
  70. data/bundler/lib/bundler/inline.rb +74 -0
  71. data/bundler/lib/bundler/installer.rb +217 -0
  72. data/bundler/lib/bundler/installer/gem_installer.rb +77 -0
  73. data/bundler/lib/bundler/installer/parallel_installer.rb +126 -0
  74. data/bundler/lib/bundler/installer/standalone.rb +52 -0
  75. data/bundler/lib/bundler/lazy_specification.rb +85 -0
  76. data/bundler/lib/bundler/lockfile_parser.rb +233 -0
  77. data/bundler/lib/bundler/match_platform.rb +14 -0
  78. data/bundler/lib/bundler/mirror.rb +218 -0
  79. data/bundler/lib/bundler/plugin.rb +156 -0
  80. data/bundler/lib/bundler/plugin/api.rb +56 -0
  81. data/bundler/lib/bundler/plugin/dsl.rb +29 -0
  82. data/bundler/lib/bundler/plugin/index.rb +88 -0
  83. data/bundler/lib/bundler/plugin/installer.rb +99 -0
  84. data/bundler/lib/bundler/plugin/installer/git.rb +38 -0
  85. data/bundler/lib/bundler/plugin/installer/rubygems.rb +27 -0
  86. data/bundler/lib/bundler/plugin/source_list.rb +24 -0
  87. data/bundler/lib/bundler/postit_trampoline.rb +57 -0
  88. data/bundler/lib/bundler/psyched_yaml.rb +27 -0
  89. data/bundler/lib/bundler/remote_specification.rb +85 -0
  90. data/bundler/lib/bundler/resolver.rb +368 -0
  91. data/bundler/lib/bundler/retry.rb +61 -0
  92. data/bundler/lib/bundler/ruby_dsl.rb +17 -0
  93. data/bundler/lib/bundler/ruby_version.rb +140 -0
  94. data/bundler/lib/bundler/rubygems_ext.rb +178 -0
  95. data/bundler/lib/bundler/rubygems_gem_installer.rb +10 -0
  96. data/bundler/lib/bundler/rubygems_integration.rb +710 -0
  97. data/bundler/lib/bundler/runtime.rb +282 -0
  98. data/bundler/lib/bundler/settings.rb +259 -0
  99. data/bundler/lib/bundler/setup.rb +28 -0
  100. data/bundler/lib/bundler/shared_helpers.rb +212 -0
  101. data/bundler/lib/bundler/similarity_detector.rb +62 -0
  102. data/bundler/lib/bundler/source.rb +37 -0
  103. data/bundler/lib/bundler/source/gemspec.rb +13 -0
  104. data/bundler/lib/bundler/source/git.rb +297 -0
  105. data/bundler/lib/bundler/source/git/git_proxy.rb +218 -0
  106. data/bundler/lib/bundler/source/path.rb +245 -0
  107. data/bundler/lib/bundler/source/path/installer.rb +44 -0
  108. data/bundler/lib/bundler/source/rubygems.rb +450 -0
  109. data/bundler/lib/bundler/source/rubygems/remote.rb +59 -0
  110. data/bundler/lib/bundler/source_list.rb +106 -0
  111. data/bundler/lib/bundler/spec_set.rb +157 -0
  112. data/bundler/lib/bundler/ssl_certs/.document +1 -0
  113. data/bundler/lib/bundler/ssl_certs/certificate_manager.rb +65 -0
  114. data/bundler/lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +21 -0
  115. data/bundler/lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +23 -0
  116. data/{lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot-2048.pem → bundler/lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem} +0 -0
  117. data/bundler/lib/bundler/stub_specification.rb +24 -0
  118. data/bundler/lib/bundler/templates/Executable +17 -0
  119. data/bundler/lib/bundler/templates/Executable.standalone +12 -0
  120. data/bundler/lib/bundler/templates/Gemfile +5 -0
  121. data/bundler/lib/bundler/templates/newgem/.travis.yml.tt +5 -0
  122. data/bundler/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +74 -0
  123. data/bundler/lib/bundler/templates/newgem/Gemfile.tt +4 -0
  124. data/bundler/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
  125. data/bundler/lib/bundler/templates/newgem/README.md.tt +41 -0
  126. data/bundler/lib/bundler/templates/newgem/Rakefile.tt +29 -0
  127. data/bundler/lib/bundler/templates/newgem/bin/console.tt +14 -0
  128. data/bundler/lib/bundler/templates/newgem/bin/setup.tt +8 -0
  129. data/bundler/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
  130. data/bundler/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +3 -0
  131. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
  132. data/bundler/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
  133. data/bundler/lib/bundler/templates/newgem/gitignore.tt +16 -0
  134. data/bundler/lib/bundler/templates/newgem/lib/newgem.rb.tt +12 -0
  135. data/bundler/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
  136. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +46 -0
  137. data/bundler/lib/bundler/templates/newgem/rspec.tt +2 -0
  138. data/bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +11 -0
  139. data/bundler/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -0
  140. data/bundler/lib/bundler/templates/newgem/test/newgem_test.rb.tt +11 -0
  141. data/bundler/lib/bundler/templates/newgem/test/test_helper.rb.tt +4 -0
  142. data/bundler/lib/bundler/ui.rb +8 -0
  143. data/bundler/lib/bundler/ui/rg_proxy.rb +18 -0
  144. data/bundler/lib/bundler/ui/shell.rb +114 -0
  145. data/bundler/lib/bundler/ui/silent.rb +48 -0
  146. data/bundler/lib/bundler/uri_credentials_filter.rb +36 -0
  147. data/bundler/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb +79 -0
  148. data/bundler/lib/bundler/vendor/compact_index_client/lib/compact_index_client/cache.rb +98 -0
  149. data/bundler/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb +80 -0
  150. data/bundler/lib/bundler/vendor/compact_index_client/lib/compact_index_client/version.rb +4 -0
  151. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo.rb +10 -0
  152. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +50 -0
  153. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +80 -0
  154. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +203 -0
  155. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +35 -0
  156. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +58 -0
  157. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +61 -0
  158. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +53 -0
  159. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +114 -0
  160. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +45 -0
  161. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +35 -0
  162. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +123 -0
  163. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +75 -0
  164. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +5 -0
  165. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +100 -0
  166. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +65 -0
  167. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +460 -0
  168. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +45 -0
  169. data/bundler/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +54 -0
  170. data/bundler/lib/bundler/vendor/net/http/faster.rb +26 -0
  171. data/bundler/lib/bundler/vendor/net/http/persistent.rb +1230 -0
  172. data/bundler/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb +128 -0
  173. data/bundler/lib/bundler/vendor/postit/lib/postit.rb +15 -0
  174. data/bundler/lib/bundler/vendor/postit/lib/postit/environment.rb +44 -0
  175. data/bundler/lib/bundler/vendor/postit/lib/postit/installer.rb +28 -0
  176. data/bundler/lib/bundler/vendor/postit/lib/postit/parser.rb +21 -0
  177. data/bundler/lib/bundler/vendor/postit/lib/postit/setup.rb +12 -0
  178. data/bundler/lib/bundler/vendor/postit/lib/postit/version.rb +3 -0
  179. data/bundler/lib/bundler/vendor/thor/lib/thor.rb +484 -0
  180. data/bundler/lib/bundler/vendor/thor/lib/thor/actions.rb +319 -0
  181. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +103 -0
  182. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +59 -0
  183. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +118 -0
  184. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +135 -0
  185. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +316 -0
  186. data/bundler/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +107 -0
  187. data/bundler/lib/bundler/vendor/thor/lib/thor/base.rb +656 -0
  188. data/bundler/lib/bundler/vendor/thor/lib/thor/command.rb +133 -0
  189. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +77 -0
  190. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +10 -0
  191. data/bundler/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +98 -0
  192. data/bundler/lib/bundler/vendor/thor/lib/thor/error.rb +32 -0
  193. data/bundler/lib/bundler/vendor/thor/lib/thor/group.rb +281 -0
  194. data/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
  195. data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
  196. data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +35 -0
  197. data/bundler/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
  198. data/bundler/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
  199. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +73 -0
  200. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +175 -0
  201. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/option.rb +125 -0
  202. data/bundler/lib/bundler/vendor/thor/lib/thor/parser/options.rb +218 -0
  203. data/bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +71 -0
  204. data/bundler/lib/bundler/vendor/thor/lib/thor/runner.rb +322 -0
  205. data/bundler/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
  206. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +421 -0
  207. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb +149 -0
  208. data/bundler/lib/bundler/vendor/thor/lib/thor/shell/html.rb +126 -0
  209. data/bundler/lib/bundler/vendor/thor/lib/thor/util.rb +267 -0
  210. data/bundler/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
  211. data/bundler/lib/bundler/vendored_molinillo.rb +3 -0
  212. data/bundler/lib/bundler/vendored_persistent.rb +12 -0
  213. data/bundler/lib/bundler/vendored_thor.rb +4 -0
  214. data/bundler/lib/bundler/version.rb +11 -0
  215. data/bundler/lib/bundler/vlad.rb +12 -0
  216. data/bundler/lib/bundler/worker.rb +82 -0
  217. data/bundler/lib/bundler/yaml_serializer.rb +67 -0
  218. data/bundler/man/bundle-config.ronn +193 -0
  219. data/bundler/man/bundle-exec.ronn +136 -0
  220. data/bundler/man/bundle-gem.ronn +77 -0
  221. data/bundler/man/bundle-install.ronn +404 -0
  222. data/bundler/man/bundle-lock.ronn +47 -0
  223. data/bundler/man/bundle-package.ronn +67 -0
  224. data/bundler/man/bundle-platform.ronn +42 -0
  225. data/bundler/man/bundle-update.ronn +194 -0
  226. data/bundler/man/bundle.ronn +98 -0
  227. data/bundler/man/gemfile.5.ronn +499 -0
  228. data/bundler/man/index.txt +8 -0
  229. data/lib/rubygems.rb +42 -2
  230. data/lib/rubygems/config_file.rb +1 -1
  231. data/lib/rubygems/defaults.rb +18 -0
  232. data/lib/rubygems/installer.rb +1 -0
  233. data/lib/rubygems/package.rb +3 -1
  234. data/lib/rubygems/package/tar_writer.rb +10 -16
  235. data/lib/rubygems/remote_fetcher.rb +1 -15
  236. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb +50 -0
  237. data/lib/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb +80 -0
  238. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb +57 -145
  239. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb +35 -0
  240. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +58 -0
  241. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +61 -0
  242. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +53 -0
  243. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb +114 -0
  244. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb +45 -0
  245. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb +35 -0
  246. data/lib/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb +123 -0
  247. data/lib/rubygems/resolver/molinillo/lib/molinillo/errors.rb +1 -1
  248. data/lib/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb +1 -1
  249. data/lib/rubygems/resolver/molinillo/lib/molinillo/resolution.rb +55 -54
  250. data/lib/rubygems/resolver/molinillo/lib/molinillo/state.rb +4 -2
  251. data/lib/rubygems/security/signer.rb +2 -0
  252. data/lib/rubygems/specification.rb +4 -4
  253. data/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +21 -0
  254. data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +25 -0
  255. data/test/rubygems/alternate_cert.pem +10 -9
  256. data/test/rubygems/alternate_cert_32.pem +10 -9
  257. data/test/rubygems/child_cert.pem +11 -9
  258. data/test/rubygems/child_cert_32.pem +11 -9
  259. data/test/rubygems/encrypted_private_key.pem +26 -26
  260. data/test/rubygems/expired_cert.pem +9 -8
  261. data/test/rubygems/future_cert.pem +9 -8
  262. data/test/rubygems/future_cert_32.pem +9 -8
  263. data/test/rubygems/grandchild_cert.pem +11 -9
  264. data/test/rubygems/grandchild_cert_32.pem +11 -9
  265. data/test/rubygems/invalid_issuer_cert.pem +11 -9
  266. data/test/rubygems/invalid_issuer_cert_32.pem +11 -9
  267. data/test/rubygems/invalid_signer_cert.pem +10 -9
  268. data/test/rubygems/invalid_signer_cert_32.pem +10 -9
  269. data/test/rubygems/invalidchild_cert.pem +11 -9
  270. data/test/rubygems/invalidchild_cert_32.pem +11 -9
  271. data/test/rubygems/public_cert.pem +11 -9
  272. data/test/rubygems/public_cert_32.pem +10 -9
  273. data/test/rubygems/test_bundled_ca.rb +1 -1
  274. data/test/rubygems/test_gem.rb +7 -0
  275. data/test/rubygems/test_gem_installer.rb +119 -0
  276. data/test/rubygems/test_gem_package.rb +9 -3
  277. data/test/rubygems/test_gem_package_tar_writer.rb +24 -0
  278. data/test/rubygems/test_gem_remote_fetcher.rb +0 -12
  279. data/test/rubygems/test_gem_security_signer.rb +8 -0
  280. data/test/rubygems/test_gem_specification.rb +1 -1
  281. data/test/rubygems/wrong_key_cert.pem +10 -9
  282. data/test/rubygems/wrong_key_cert_32.pem +10 -9
  283. data/util/ci +73 -0
  284. data/util/create_certs.rb +64 -49
  285. data/util/update_bundled_ca_certificates.rb +23 -2
  286. metadata +257 -19
  287. data/lib/gauntlet_rubygems.rb +0 -51
  288. data/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRoot.pem +0 -18
@@ -0,0 +1,499 @@
1
+ Gemfile(5) -- A format for describing gem dependencies for Ruby programs
2
+ ========================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ A `Gemfile` describes the gem dependencies required to execute associated
7
+ Ruby code.
8
+
9
+ Place the `Gemfile` in the root of the directory containing the associated
10
+ code. For instance, in a Rails application, place the `Gemfile` in the same
11
+ directory as the `Rakefile`.
12
+
13
+ ## SYNTAX
14
+
15
+ A `Gemfile` is evaluated as Ruby code, in a context which makes available
16
+ a number of methods used to describe the gem requirements.
17
+
18
+ ## GLOBAL SOURCES
19
+
20
+ At the top of the `Gemfile`, add a line for the `Rubygems` source that contains
21
+ the gems listed in the `Gemfile`.
22
+
23
+ source "https://rubygems.org"
24
+
25
+ It is possible, but not recommended as of Bundler 1.7, to add multiple global
26
+ `source` lines. Each of these `source`s `MUST` be a valid Rubygems repository.
27
+
28
+ Sources are checked for gems following the heuristics described in
29
+ [SOURCE PRIORITY][]. If a gem is found in more than one global source, Bundler
30
+ will print a warning after installing the gem indicating which source was used,
31
+ and listing the other sources where the gem is available. A specific source can
32
+ be selected for gems that need to use a non-standard repository, suppressing
33
+ this warning, by using the [`:source` option](#SOURCE-source-) or a
34
+ [`source` block](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).
35
+
36
+ ### CREDENTIALS
37
+
38
+ Some gem sources require a username and password. Use [bundle config(1)][bundle-config] to set
39
+ the username and password for any of the sources that need it. The command must
40
+ be run once on each computer that will install the Gemfile, but this keeps the
41
+ credentials from being stored in plain text in version control.
42
+
43
+ bundle config gems.example.com user:password
44
+
45
+ For some sources, like a company Gemfury account, it may be easier to simply
46
+ include the credentials in the Gemfile as part of the source URL.
47
+
48
+ source "https://user:password@gems.example.com"
49
+
50
+ Credentials in the source URL will take precedence over credentials set using
51
+ `config`.
52
+
53
+ ## RUBY
54
+
55
+ If your application requires a specific Ruby version or engine, specify your
56
+ requirements using the `ruby` method, with the following arguments.
57
+ All parameters are `OPTIONAL` unless otherwise specified.
58
+
59
+ ### VERSION (required)
60
+
61
+ The version of Ruby that your application requires. If your application
62
+ requires an alternate Ruby engine, such as JRuby or Rubinius, this should be
63
+ the Ruby version that the engine is compatible with.
64
+
65
+ ruby "1.9.3"
66
+
67
+ ### ENGINE
68
+
69
+ Each application _may_ specify a Ruby engine. If an engine is specified, an
70
+ engine version _must_ also be specified.
71
+
72
+ ### ENGINE VERSION
73
+
74
+ Each application _may_ specify a Ruby engine version. If an engine version is
75
+ specified, an engine _must_ also be specified. If the engine is "ruby" the
76
+ engine version specified _must_ match the Ruby version.
77
+
78
+ ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
79
+
80
+ ### PATCHLEVEL
81
+
82
+ Each application _may_ specify a Ruby patchlevel.
83
+
84
+ ruby "2.0.0", :patchlevel => "247"
85
+
86
+ ## GEMS
87
+
88
+ Specify gem requirements using the `gem` method, with the following arguments.
89
+ All parameters are `OPTIONAL` unless otherwise specified.
90
+
91
+ ### NAME (required)
92
+
93
+ For each gem requirement, list a single _gem_ line.
94
+
95
+ gem "nokogiri"
96
+
97
+ ### VERSION
98
+
99
+ Each _gem_ `MAY` have one or more version specifiers.
100
+
101
+ gem "nokogiri", ">= 1.4.2"
102
+ gem "RedCloth", ">= 4.1.0", "< 4.2.0"
103
+
104
+ ### REQUIRE AS
105
+
106
+ Each _gem_ `MAY` specify files that should be used when autorequiring via
107
+ `Bundler.require`. You may pass an array with multiple files or `true` if file
108
+ you want `required` has same name as _gem_ or `false` to
109
+ prevent any file from being autorequired.
110
+
111
+ gem "redis", :require => ["redis/connection/hiredis", "redis"]
112
+ gem "webmock", :require => false
113
+ gem "debugger", :require => true
114
+
115
+ The argument defaults to the name of the gem. For example, these are identical:
116
+
117
+ gem "nokogiri"
118
+ gem "nokogiri", :require => "nokogiri"
119
+ gem "nokogiri", :require => true
120
+
121
+ ### GROUPS
122
+
123
+ Each _gem_ `MAY` specify membership in one or more groups. Any _gem_ that does
124
+ not specify membership in any group is placed in the `default` group.
125
+
126
+ gem "rspec", :group => :test
127
+ gem "wirble", :groups => [:development, :test]
128
+
129
+ The Bundler runtime allows its two main methods, `Bundler.setup` and
130
+ `Bundler.require`, to limit their impact to particular groups.
131
+
132
+ # setup adds gems to Ruby's load path
133
+ Bundler.setup # defaults to all groups
134
+ require "bundler/setup" # same as Bundler.setup
135
+ Bundler.setup(:default) # only set up the _default_ group
136
+ Bundler.setup(:test) # only set up the _test_ group (but `not` _default_)
137
+ Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
138
+
139
+ # require requires all of the gems in the specified groups
140
+ Bundler.require # defaults to the _default_ group
141
+ Bundler.require(:default) # identical
142
+ Bundler.require(:default, :test) # requires the _default_ and _test_ groups
143
+ Bundler.require(:test) # requires the _test_ group
144
+
145
+ The Bundler CLI allows you to specify a list of groups whose gems `bundle install` should
146
+ not install with the `--without` option. To specify multiple groups to ignore, specify a
147
+ list of groups separated by spaces.
148
+
149
+ bundle install --without test
150
+ bundle install --without development test
151
+
152
+ After running `bundle install --without test`, bundler will remember that you excluded
153
+ the test group in the last installation. The next time you run `bundle install`,
154
+ without any `--without option`, bundler will recall it.
155
+
156
+ Also, calling `Bundler.setup` with no parameters, or calling `require "bundler/setup"`
157
+ will setup all groups except for the ones you excluded via `--without` (since they
158
+ are not available).
159
+
160
+ Note that on `bundle install`, bundler downloads and evaluates all gems, in order to
161
+ create a single canonical list of all of the required gems and their dependencies.
162
+ This means that you cannot list different versions of the same gems in different
163
+ groups. For more details, see [Understanding Bundler](http://bundler.io/rationale.html).
164
+
165
+ ### PLATFORMS
166
+
167
+ If a gem should only be used in a particular platform or set of platforms, you can
168
+ specify them. Platforms are essentially identical to groups, except that you do not
169
+ need to use the `--without` install-time flag to exclude groups of gems for other
170
+ platforms.
171
+
172
+ There are a number of `Gemfile` platforms:
173
+
174
+ * `ruby`:
175
+ C Ruby (MRI) or Rubinius, but `NOT` Windows
176
+ * `ruby_18`:
177
+ _ruby_ `AND` version 1.8
178
+ * `ruby_19`:
179
+ _ruby_ `AND` version 1.9
180
+ * `ruby_20`:
181
+ _ruby_ `AND` version 2.0
182
+ * `ruby_21`:
183
+ _ruby_ `AND` version 2.1
184
+ * `ruby_22`:
185
+ _ruby_ `AND` version 2.2
186
+ * `ruby_23`:
187
+ _ruby_ `AND` version 2.3
188
+ * `mri`:
189
+ Same as _ruby_, but not Rubinius
190
+ * `mri_18`:
191
+ _mri_ `AND` version 1.8
192
+ * `mri_19`:
193
+ _mri_ `AND` version 1.9
194
+ * `mri_20`:
195
+ _mri_ `AND` version 2.0
196
+ * `mri_21`:
197
+ _mri_ `AND` version 2.1
198
+ * `mri_22`:
199
+ _mri_ `AND` version 2.2
200
+ * `mri_23`:
201
+ _mri_ `AND` version 2.3
202
+ * `rbx`:
203
+ Same as _ruby_, but only Rubinius (not MRI)
204
+ * `jruby`:
205
+ JRuby
206
+ * `mswin`:
207
+ Windows
208
+ * `mingw`:
209
+ Windows 32 bit 'mingw32' platform (aka RubyInstaller)
210
+ * `mingw_18`:
211
+ _mingw_ `AND` version 1.8
212
+ * `mingw_19`:
213
+ _mingw_ `AND` version 1.9
214
+ * `mingw_20`:
215
+ _mingw_ `AND` version 2.0
216
+ * `mingw_21`:
217
+ _mingw_ `AND` version 2.1
218
+ * `mingw_22`:
219
+ _mingw_ `AND` version 2.2
220
+ * `mingw_23`:
221
+ _mingw_ `AND` version 2.3
222
+ * `x64_mingw`:
223
+ Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
224
+ * `x64_mingw_20`:
225
+ _x64_mingw_ `AND` version 2.0
226
+ * `x64_mingw_21`:
227
+ _x64_mingw_ `AND` version 2.1
228
+ * `x64_mingw_22`:
229
+ _x64_mingw_ `AND` version 2.2
230
+ * `x64_mingw_23`:
231
+ _x64_mingw_ `AND` version 2.3
232
+
233
+ As with groups, you can specify one or more platforms:
234
+
235
+ gem "weakling", :platforms => :jruby
236
+ gem "ruby-debug", :platforms => :mri_18
237
+ gem "nokogiri", :platforms => [:mri_18, :jruby]
238
+
239
+ All operations involving groups (`bundle install`, `Bundler.setup`,
240
+ `Bundler.require`) behave exactly the same as if any groups not
241
+ matching the current platform were explicitly excluded.
242
+
243
+ ### SOURCE
244
+
245
+ You can select an alternate Rubygems repository for a gem using the ':source'
246
+ option.
247
+
248
+ gem "some_internal_gem", :source => "https://gems.example.com"
249
+
250
+ This forces the gem to be loaded from this source and ignores any global sources
251
+ declared at the top level of the file. If the gem does not exist in this source,
252
+ it will not be installed.
253
+
254
+ Bundler will search for child dependencies of this gem by first looking in the
255
+ source selected for the parent, but if they are not found there, it will fall
256
+ back on global sources using the ordering described in [SOURCE PRIORITY][].
257
+
258
+ Selecting a specific source repository this way also suppresses the ambiguous
259
+ gem warning described above in
260
+ [GLOBAL SOURCES (#source)](#GLOBAL-SOURCES-source-).
261
+
262
+ ### GIT
263
+
264
+ If necessary, you can specify that a gem is located at a particular
265
+ git repository using the `:git` parameter. The repository can be accessed via
266
+ several protocols:
267
+
268
+ * `HTTP(S)`:
269
+ gem "rails", :git => "https://github.com/rails/rails.git"
270
+ * `SSH`:
271
+ gem "rails", :git => "git@github.com:rails/rails.git"
272
+ * `git`:
273
+ gem "rails", :git => "git://github.com/rails/rails.git"
274
+
275
+ If using SSH, the user that you use to run `bundle install` `MUST` have the
276
+ appropriate keys available in their `$HOME/.ssh`.
277
+
278
+ `NOTE`: `http://` and `git://` URLs should be avoided if at all possible. These
279
+ protocols are unauthenticated, so a man-in-the-middle attacker can deliver
280
+ malicious code and compromise your system. HTTPS and SSH are strongly
281
+ preferred.
282
+
283
+ The `group`, `platforms`, and `require` options are available and behave
284
+ exactly the same as they would for a normal gem.
285
+
286
+ A git repository `SHOULD` have at least one file, at the root of the
287
+ directory containing the gem, with the extension `.gemspec`. This file
288
+ `MUST` contain a valid gem specification, as expected by the `gem build`
289
+ command.
290
+
291
+ If a git repository does not have a `.gemspec`, bundler will attempt to
292
+ create one, but it will not contain any dependencies, executables, or
293
+ C extension compilation instructions. As a result, it may fail to properly
294
+ integrate into your application.
295
+
296
+ If a git repository does have a `.gemspec` for the gem you attached it
297
+ to, a version specifier, if provided, means that the git repository is
298
+ only valid if the `.gemspec` specifies a version matching the version
299
+ specifier. If not, bundler will print a warning.
300
+
301
+ gem "rails", "2.3.8", :git => "https://github.com/rails/rails.git"
302
+ # bundle install will fail, because the .gemspec in the rails
303
+ # repository's master branch specifies version 3.0.0
304
+
305
+ If a git repository does `not` have a `.gemspec` for the gem you attached
306
+ it to, a version specifier `MUST` be provided. Bundler will use this
307
+ version in the simple `.gemspec` it creates.
308
+
309
+ Git repositories support a number of additional options.
310
+
311
+ * `branch`, `tag`, and `ref`:
312
+ You `MUST` only specify at most one of these options. The default
313
+ is `:branch => "master"`
314
+ * `submodules`:
315
+ Specify `:submodules => true` to cause bundler to expand any
316
+ submodules included in the git repository
317
+
318
+ If a git repository contains multiple `.gemspecs`, each `.gemspec`
319
+ represents a gem located at the same place in the file system as
320
+ the `.gemspec`.
321
+
322
+ |~rails [git root]
323
+ | |-rails.gemspec [rails gem located here]
324
+ |~actionpack
325
+ | |-actionpack.gemspec [actionpack gem located here]
326
+ |~activesupport
327
+ | |-activesupport.gemspec [activesupport gem located here]
328
+ |...
329
+
330
+ To install a gem located in a git repository, bundler changes to
331
+ the directory containing the gemspec, runs `gem build name.gemspec`
332
+ and then installs the resulting gem. The `gem build` command,
333
+ which comes standard with Rubygems, evaluates the `.gemspec` in
334
+ the context of the directory in which it is located.
335
+
336
+ ### GIT SOURCE
337
+
338
+ A custom git source can be defined via the `git_source` method. Provide the source's name
339
+ as an argument, and a block which receives a single argument and interpolates it into a
340
+ string to return the full repo address:
341
+
342
+ git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
343
+ gem 'rails', :stash => 'forks/rails'
344
+
345
+ In addition, if you wish to choose a specific branch:
346
+
347
+ gem "rails", :stash => "forks/rails", :branch => "branch_name"
348
+
349
+ ### GITHUB
350
+
351
+ `NOTE`: This shorthand should be avoided until Bundler 2.0, since it
352
+ currently expands to an insecure `git://` URL. This allows a
353
+ man-in-the-middle attacker to compromise your system.
354
+
355
+ If the git repository you want to use is hosted on GitHub and is public, you can use the
356
+ :github shorthand to specify the github username and repository name (without the
357
+ trailing ".git"), separated by a slash. If both the username and repository name are the
358
+ same, you can omit one.
359
+
360
+ gem "rails", :github => "rails/rails"
361
+ gem "rails", :github => "rails"
362
+
363
+ Are both equivalent to
364
+
365
+ gem "rails", :git => "git://github.com/rails/rails.git"
366
+
367
+ Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
368
+
369
+ ### GIST
370
+
371
+ If the git repository you want to use is hosted as a Github Gist and is public, you can use
372
+ the :gist shorthand to specify the gist identifier (without the trailing ".git").
373
+
374
+ gem "the_hatch", :gist => "4815162342"
375
+
376
+ Is equivalent to:
377
+
378
+ gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
379
+
380
+ Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
381
+
382
+ ### BITBUCKET
383
+
384
+ If the git repository you want to use is hosted on Bitbucket and is public, you can use the
385
+ :bitbucket shorthand to specify the bitbucket username and repository name (without the
386
+ trailing ".git"), separated by a slash. If both the username and repository name are the
387
+ same, you can omit one.
388
+
389
+ gem "rails", :bitbucket => "rails/rails"
390
+ gem "rails", :bitbucket => "rails"
391
+
392
+ Are both equivalent to
393
+
394
+ gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
395
+
396
+ Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
397
+
398
+ ### PATH
399
+
400
+ You can specify that a gem is located in a particular location
401
+ on the file system. Relative paths are resolved relative to the
402
+ directory containing the `Gemfile`.
403
+
404
+ Similar to the semantics of the `:git` option, the `:path`
405
+ option requires that the directory in question either contains
406
+ a `.gemspec` for the gem, or that you specify an explicit
407
+ version that bundler should use.
408
+
409
+ Unlike `:git`, bundler does not compile C extensions for
410
+ gems specified as paths.
411
+
412
+ gem "rails", :path => "vendor/rails"
413
+
414
+ If you would like to use multiple local gems directly from the filesystem, you can set a global `path` option to the path containing the gem's files. This will automatically load gemspec files from subdirectories.
415
+
416
+ path 'components' do
417
+ gem 'admin_ui'
418
+ gem 'public_ui'
419
+ end
420
+
421
+ ## BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS
422
+
423
+ The `:source`, `:git`, `:path`, `:group`, and `:platforms` options may be
424
+ applied to a group of gems by using block form.
425
+
426
+ source "https://gems.example.com" do
427
+ gem "some_internal_gem"
428
+ gem "another_internal_gem"
429
+ end
430
+
431
+ git "https://github.com/rails/rails.git" do
432
+ gem "activesupport"
433
+ gem "actionpack"
434
+ end
435
+
436
+ platforms :ruby do
437
+ gem "ruby-debug"
438
+ gem "sqlite3"
439
+ end
440
+
441
+ group :development, :optional => true do
442
+ gem "wirble"
443
+ gem "faker"
444
+ end
445
+
446
+ In the case of the group block form the :optional option can be given
447
+ to prevent a group from being installed unless listed in the `--with`
448
+ option given to the `bundle install` command.
449
+
450
+ In the case of the `git` block form, the `:ref`, `:branch`, `:tag`,
451
+ and `:submodules` options may be passed to the `git` method, and
452
+ all gems in the block will inherit those options.
453
+
454
+ ## INSTALL_IF
455
+
456
+ The `install_if` method allows gems to be installed based on a proc or lambda.
457
+ This is especially useful for optional gems that can only be used if certain
458
+ software is installed or some other conditions are met.
459
+
460
+ install_if -> { RUBY_PLATFORM =~ /darwin/ } do
461
+ gem "pasteboard"
462
+ end
463
+
464
+ ## GEMSPEC
465
+
466
+ If you wish to use Bundler to help install dependencies for a gem while it is
467
+ being developed, use the `gemspec` method to pull in the dependencies listed in
468
+ the `.gemspec` file.
469
+
470
+ The `gemspec` method adds any runtime dependencies as gem requirements in the
471
+ default group. It also adds development dependencies as gem requirements in the
472
+ `development` group. Finally, it adds a gem requirement on your project (`:path
473
+ => '.'`). In conjunction with `Bundler.setup`, this allows you to require project
474
+ files in your test code as you would if the project were installed as a gem; you
475
+ need not manipulate the load path manually or require project files via relative
476
+ paths.
477
+
478
+ The `gemspec` method supports optional `:path`, `:glob`, `:name`, and `:development_group`
479
+ options, which control where bundler looks for the `.gemspec`, the glob it uses to look
480
+ for the gemspec (defaults to: "{,*,*/*}.gemspec"), what named `.gemspec` it uses
481
+ (if more than one is present), and which group development dependencies are included in.
482
+
483
+ When a `gemspec` dependency encounters version conflicts during resolution, the
484
+ local version under development will always be selected -- even if there are
485
+ remote versions that better match other requirements for the `gemspec` gem.
486
+
487
+ ## SOURCE PRIORITY
488
+
489
+ When attempting to locate a gem to satisfy a gem requirement,
490
+ bundler uses the following priority order:
491
+
492
+ 1. The source explicitly attached to the gem (using `:source`, `:path`, or
493
+ `:git`)
494
+ 2. For implicit gems (dependencies of explicit gems), any source, git, or path
495
+ repository declared on the parent. This results in bundler prioritizing the
496
+ ActiveSupport gem from the Rails git repository over ones from
497
+ `rubygems.org`
498
+ 3. The sources specified via global `source` lines, searching each source in
499
+ your `Gemfile` from last added to first added.