bpm 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. data/.gitignore +4 -0
  2. data/.gitmodules +0 -0
  3. data/Gemfile +16 -0
  4. data/README.md +55 -0
  5. data/TODO.md +3 -0
  6. data/bin/bpm +8 -0
  7. data/bpm.gemspec +41 -0
  8. data/lib/bpm.rb +18 -0
  9. data/lib/bpm/cli.rb +6 -0
  10. data/lib/bpm/cli/base.rb +358 -0
  11. data/lib/bpm/cli/owner.rb +46 -0
  12. data/lib/bpm/credentials.rb +36 -0
  13. data/lib/bpm/default.json +9 -0
  14. data/lib/bpm/generator.rb +69 -0
  15. data/lib/bpm/init_generator.rb +43 -0
  16. data/lib/bpm/libgems_ext.rb +11 -0
  17. data/lib/bpm/libgems_ext/config_file.rb +33 -0
  18. data/lib/bpm/libgems_ext/dependency_installer.rb +150 -0
  19. data/lib/bpm/libgems_ext/installer.rb +39 -0
  20. data/lib/bpm/libgems_ext/libgems.rb +39 -0
  21. data/lib/bpm/libgems_ext/spec_fetcher.rb +11 -0
  22. data/lib/bpm/local.rb +76 -0
  23. data/lib/bpm/package.rb +277 -0
  24. data/lib/bpm/pipeline.rb +100 -0
  25. data/lib/bpm/pipeline/directive_processor.rb +47 -0
  26. data/lib/bpm/pipeline/generated_asset.rb +68 -0
  27. data/lib/bpm/pipeline/transport_processor.rb +32 -0
  28. data/lib/bpm/project.rb +427 -0
  29. data/lib/bpm/project_generator.rb +34 -0
  30. data/lib/bpm/remote.rb +104 -0
  31. data/lib/bpm/repository.rb +18 -0
  32. data/lib/bpm/server.rb +44 -0
  33. data/lib/bpm/version.rb +3 -0
  34. data/spec/cli/add_spec.rb +159 -0
  35. data/spec/cli/build_spec.rb +87 -0
  36. data/spec/cli/fetch_spec.rb +135 -0
  37. data/spec/cli/fetched_spec.rb +52 -0
  38. data/spec/cli/init_spec.rb +50 -0
  39. data/spec/cli/list_spec.rb +74 -0
  40. data/spec/cli/login_spec.rb +110 -0
  41. data/spec/cli/new_spec.rb +92 -0
  42. data/spec/cli/owner_spec.rb +114 -0
  43. data/spec/cli/push_spec.rb +73 -0
  44. data/spec/cli/remove_spec.rb +84 -0
  45. data/spec/cli/unpack_spec.rb +72 -0
  46. data/spec/cli/unyank_spec.rb +73 -0
  47. data/spec/cli/yank_spec.rb +73 -0
  48. data/spec/credentials_spec.rb +23 -0
  49. data/spec/fixtures/badrake-0.8.7.spd +0 -0
  50. data/spec/fixtures/builder-3.0.0.spd +0 -0
  51. data/spec/fixtures/bundler-1.1.pre.spd +0 -0
  52. data/spec/fixtures/coffee-1.0.1.pre.spd +0 -0
  53. data/spec/fixtures/core-test-0.4.9.spd +0 -0
  54. data/spec/fixtures/core-test/bin/cot +3 -0
  55. data/spec/fixtures/core-test/lib/main.js +1 -0
  56. data/spec/fixtures/core-test/package.json +46 -0
  57. data/spec/fixtures/core-test/resources/runner.css +1 -0
  58. data/spec/fixtures/core-test/tests/test.js +1 -0
  59. data/spec/fixtures/custom_generator-1.0.spd +0 -0
  60. data/spec/fixtures/custom_generator/lib/main.js +1 -0
  61. data/spec/fixtures/custom_generator/package.json +12 -0
  62. data/spec/fixtures/custom_generator/templates/init/project.json +19 -0
  63. data/spec/fixtures/custom_generator/templates/project/app.js +1 -0
  64. data/spec/fixtures/custom_generator/templates/project/lib/main.js +0 -0
  65. data/spec/fixtures/custom_generator/templates/project_generator.rb +20 -0
  66. data/spec/fixtures/hello_world/LICENSE +19 -0
  67. data/spec/fixtures/hello_world/README.md +21 -0
  68. data/spec/fixtures/hello_world/assets/bpm_packages.js +13 -0
  69. data/spec/fixtures/hello_world/assets/bpm_styles.css +14 -0
  70. data/spec/fixtures/hello_world/assets/papa-smurf.jpg +0 -0
  71. data/spec/fixtures/hello_world/hello_world.json +20 -0
  72. data/spec/fixtures/hello_world/lib/main.js +9 -0
  73. data/spec/fixtures/hello_world/packages/custom_package/assets/dummy.txt +1 -0
  74. data/spec/fixtures/hello_world/packages/custom_package/css/sample_styles.css +3 -0
  75. data/spec/fixtures/hello_world/packages/custom_package/custom_dir/basic-module.js +1 -0
  76. data/spec/fixtures/hello_world/packages/custom_package/lib/main.js +1 -0
  77. data/spec/fixtures/hello_world/packages/custom_package/package.json +22 -0
  78. data/spec/fixtures/hello_world/tests/main-test.js +8 -0
  79. data/spec/fixtures/highline-1.6.1.spd +0 -0
  80. data/spec/fixtures/ivory-0.0.1.spd +0 -0
  81. data/spec/fixtures/jquery-1.4.3.spd +0 -0
  82. data/spec/fixtures/optparse-1.0.1.spd +0 -0
  83. data/spec/fixtures/rake-0.8.6.spd +0 -0
  84. data/spec/fixtures/rake-0.8.7.spd +0 -0
  85. data/spec/fixtures/simple_hello/assets/bpm_packages.js +1 -0
  86. data/spec/fixtures/simple_hello/lib/main.js +1 -0
  87. data/spec/fixtures/spade-0.5.0.spd +0 -0
  88. data/spec/fixtures/src/README.txt +1 -0
  89. data/spec/fixtures/src/bundler-1.1.pre/.gitignore +22 -0
  90. data/spec/fixtures/src/bundler-1.1.pre/CHANGELOG.md +646 -0
  91. data/spec/fixtures/src/bundler-1.1.pre/ISSUES.md +47 -0
  92. data/spec/fixtures/src/bundler-1.1.pre/LICENSE +21 -0
  93. data/spec/fixtures/src/bundler-1.1.pre/README.md +29 -0
  94. data/spec/fixtures/src/bundler-1.1.pre/UPGRADING.md +103 -0
  95. data/spec/fixtures/src/bundler-1.1.pre/bin/bundle +20 -0
  96. data/spec/fixtures/src/bundler-1.1.pre/lib/bundler.js +23 -0
  97. data/spec/fixtures/src/bundler-1.1.pre/lib/bundler/definition.js +14 -0
  98. data/spec/fixtures/src/bundler-1.1.pre/lib/bundler/dependency.js +15 -0
  99. data/spec/fixtures/src/bundler-1.1.pre/lib/bundler/dsl.js +9 -0
  100. data/spec/fixtures/src/bundler-1.1.pre/lib/bundler/ui.js +6 -0
  101. data/spec/fixtures/src/bundler-1.1.pre/man/bundle-config.ronn +90 -0
  102. data/spec/fixtures/src/bundler-1.1.pre/man/bundle-exec.ronn +111 -0
  103. data/spec/fixtures/src/bundler-1.1.pre/man/bundle-install.ronn +314 -0
  104. data/spec/fixtures/src/bundler-1.1.pre/man/bundle-package.ronn +59 -0
  105. data/spec/fixtures/src/bundler-1.1.pre/man/bundle-update.ronn +176 -0
  106. data/spec/fixtures/src/bundler-1.1.pre/man/bundle.ronn +80 -0
  107. data/spec/fixtures/src/bundler-1.1.pre/man/gemfile.5.ronn +279 -0
  108. data/spec/fixtures/src/bundler-1.1.pre/man/index.txt +6 -0
  109. data/spec/fixtures/src/bundler-1.1.pre/package.json +19 -0
  110. data/spec/fixtures/src/coffee-1.0.1.pre/bin/cake +0 -0
  111. data/spec/fixtures/src/coffee-1.0.1.pre/bin/coffee +0 -0
  112. data/spec/fixtures/src/coffee-1.0.1.pre/lib/coffee.js +0 -0
  113. data/spec/fixtures/src/coffee-1.0.1.pre/lib/coffee/base.js +0 -0
  114. data/spec/fixtures/src/coffee-1.0.1.pre/lib/coffee/mocha/chai.js +0 -0
  115. data/spec/fixtures/src/coffee-1.0.1.pre/package.json +19 -0
  116. data/spec/fixtures/src/coffee-1.0.1.pre/qunit/coffee/test.js +0 -0
  117. data/spec/fixtures/src/coffee-1.0.1.pre/qunit/test.js +0 -0
  118. data/spec/fixtures/src/jquery/lib/main.js +7179 -0
  119. data/spec/fixtures/src/jquery/package.json +15 -0
  120. data/spec/fixtures/src/rake-0.8.6/CHANGES +436 -0
  121. data/spec/fixtures/src/rake-0.8.6/MIT-LICENSE +21 -0
  122. data/spec/fixtures/src/rake-0.8.6/README +196 -0
  123. data/spec/fixtures/src/rake-0.8.6/Rakefile +430 -0
  124. data/spec/fixtures/src/rake-0.8.6/TODO +20 -0
  125. data/spec/fixtures/src/rake-0.8.6/bin/rake +31 -0
  126. data/spec/fixtures/src/rake-0.8.6/doc/command_line_usage.rdoc +102 -0
  127. data/spec/fixtures/src/rake-0.8.6/doc/example/Rakefile1 +38 -0
  128. data/spec/fixtures/src/rake-0.8.6/doc/example/Rakefile2 +35 -0
  129. data/spec/fixtures/src/rake-0.8.6/doc/example/a.c +6 -0
  130. data/spec/fixtures/src/rake-0.8.6/doc/example/b.c +6 -0
  131. data/spec/fixtures/src/rake-0.8.6/doc/example/main.c +11 -0
  132. data/spec/fixtures/src/rake-0.8.6/doc/glossary.rdoc +51 -0
  133. data/spec/fixtures/src/rake-0.8.6/doc/jamis.rb +591 -0
  134. data/spec/fixtures/src/rake-0.8.6/doc/proto_rake.rdoc +127 -0
  135. data/spec/fixtures/src/rake-0.8.6/doc/rake.1.gz +0 -0
  136. data/spec/fixtures/src/rake-0.8.6/doc/rakefile.rdoc +534 -0
  137. data/spec/fixtures/src/rake-0.8.6/doc/rational.rdoc +151 -0
  138. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.4.14.rdoc +23 -0
  139. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.4.15.rdoc +35 -0
  140. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.5.0.rdoc +53 -0
  141. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.5.3.rdoc +78 -0
  142. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.5.4.rdoc +46 -0
  143. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.6.0.rdoc +141 -0
  144. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.7.0.rdoc +119 -0
  145. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.7.1.rdoc +59 -0
  146. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.7.2.rdoc +121 -0
  147. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.7.3.rdoc +47 -0
  148. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.0.rdoc +114 -0
  149. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.2.rdoc +165 -0
  150. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.3.rdoc +112 -0
  151. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.4.rdoc +147 -0
  152. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.5.rdoc +53 -0
  153. data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.6.rdoc +55 -0
  154. data/spec/fixtures/src/rake-0.8.6/install.rb +88 -0
  155. data/spec/fixtures/src/rake-0.8.6/lib/rake.rb +2502 -0
  156. data/spec/fixtures/src/rake-0.8.6/lib/rake/alt_system.rb +108 -0
  157. data/spec/fixtures/src/rake-0.8.6/lib/rake/classic_namespace.rb +8 -0
  158. data/spec/fixtures/src/rake-0.8.6/lib/rake/clean.rb +33 -0
  159. data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/compositepublisher.rb +24 -0
  160. data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/ftptools.rb +153 -0
  161. data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/publisher.rb +75 -0
  162. data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  163. data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/sshpublisher.rb +47 -0
  164. data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/sys.rb +209 -0
  165. data/spec/fixtures/src/rake-0.8.6/lib/rake/gempackagetask.rb +97 -0
  166. data/spec/fixtures/src/rake-0.8.6/lib/rake/loaders/makefile.rb +42 -0
  167. data/spec/fixtures/src/rake-0.8.6/lib/rake/packagetask.rb +184 -0
  168. data/spec/fixtures/src/rake-0.8.6/lib/rake/rake_test_loader.rb +5 -0
  169. data/spec/fixtures/src/rake-0.8.6/lib/rake/rdoctask.rb +209 -0
  170. data/spec/fixtures/src/rake-0.8.6/lib/rake/ruby182_test_unit_fix.rb +23 -0
  171. data/spec/fixtures/src/rake-0.8.6/lib/rake/runtest.rb +23 -0
  172. data/spec/fixtures/src/rake-0.8.6/lib/rake/tasklib.rb +23 -0
  173. data/spec/fixtures/src/rake-0.8.6/lib/rake/testtask.rb +161 -0
  174. data/spec/fixtures/src/rake-0.8.6/lib/rake/win32.rb +55 -0
  175. data/spec/fixtures/src/rake-0.8.6/package.json +18 -0
  176. data/spec/fixtures/src/rake-0.8.6/test/capture_stdout.rb +26 -0
  177. data/spec/fixtures/src/rake-0.8.7/CHANGES +440 -0
  178. data/spec/fixtures/src/rake-0.8.7/MIT-LICENSE +21 -0
  179. data/spec/fixtures/src/rake-0.8.7/README +196 -0
  180. data/spec/fixtures/src/rake-0.8.7/Rakefile +430 -0
  181. data/spec/fixtures/src/rake-0.8.7/TODO +20 -0
  182. data/spec/fixtures/src/rake-0.8.7/bin/rake +31 -0
  183. data/spec/fixtures/src/rake-0.8.7/doc/command_line_usage.rdoc +102 -0
  184. data/spec/fixtures/src/rake-0.8.7/doc/example/Rakefile1 +38 -0
  185. data/spec/fixtures/src/rake-0.8.7/doc/example/Rakefile2 +35 -0
  186. data/spec/fixtures/src/rake-0.8.7/doc/example/a.c +6 -0
  187. data/spec/fixtures/src/rake-0.8.7/doc/example/b.c +6 -0
  188. data/spec/fixtures/src/rake-0.8.7/doc/example/main.c +11 -0
  189. data/spec/fixtures/src/rake-0.8.7/doc/glossary.rdoc +51 -0
  190. data/spec/fixtures/src/rake-0.8.7/doc/jamis.rb +591 -0
  191. data/spec/fixtures/src/rake-0.8.7/doc/proto_rake.rdoc +127 -0
  192. data/spec/fixtures/src/rake-0.8.7/doc/rake.1.gz +0 -0
  193. data/spec/fixtures/src/rake-0.8.7/doc/rakefile.rdoc +534 -0
  194. data/spec/fixtures/src/rake-0.8.7/doc/rational.rdoc +151 -0
  195. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.4.14.rdoc +23 -0
  196. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.4.15.rdoc +35 -0
  197. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.5.0.rdoc +53 -0
  198. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.5.3.rdoc +78 -0
  199. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.5.4.rdoc +46 -0
  200. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.6.0.rdoc +141 -0
  201. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.7.0.rdoc +119 -0
  202. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.7.1.rdoc +59 -0
  203. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.7.2.rdoc +121 -0
  204. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.7.3.rdoc +47 -0
  205. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.0.rdoc +114 -0
  206. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.2.rdoc +165 -0
  207. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.3.rdoc +112 -0
  208. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.4.rdoc +147 -0
  209. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.5.rdoc +53 -0
  210. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.6.rdoc +55 -0
  211. data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.7.rdoc +55 -0
  212. data/spec/fixtures/src/rake-0.8.7/install.rb +88 -0
  213. data/spec/fixtures/src/rake-0.8.7/lib/rake.rb +2506 -0
  214. data/spec/fixtures/src/rake-0.8.7/lib/rake/alt_system.rb +108 -0
  215. data/spec/fixtures/src/rake-0.8.7/lib/rake/classic_namespace.rb +8 -0
  216. data/spec/fixtures/src/rake-0.8.7/lib/rake/clean.rb +33 -0
  217. data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/compositepublisher.rb +24 -0
  218. data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/ftptools.rb +153 -0
  219. data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/publisher.rb +75 -0
  220. data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  221. data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/sshpublisher.rb +47 -0
  222. data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/sys.rb +209 -0
  223. data/spec/fixtures/src/rake-0.8.7/lib/rake/gempackagetask.rb +97 -0
  224. data/spec/fixtures/src/rake-0.8.7/lib/rake/loaders/makefile.rb +42 -0
  225. data/spec/fixtures/src/rake-0.8.7/lib/rake/packagetask.rb +184 -0
  226. data/spec/fixtures/src/rake-0.8.7/lib/rake/rake_test_loader.rb +5 -0
  227. data/spec/fixtures/src/rake-0.8.7/lib/rake/rdoctask.rb +209 -0
  228. data/spec/fixtures/src/rake-0.8.7/lib/rake/ruby182_test_unit_fix.rb +23 -0
  229. data/spec/fixtures/src/rake-0.8.7/lib/rake/runtest.rb +23 -0
  230. data/spec/fixtures/src/rake-0.8.7/lib/rake/tasklib.rb +23 -0
  231. data/spec/fixtures/src/rake-0.8.7/lib/rake/testtask.rb +161 -0
  232. data/spec/fixtures/src/rake-0.8.7/lib/rake/win32.rb +55 -0
  233. data/spec/fixtures/src/rake-0.8.7/package.json +18 -0
  234. data/spec/fixtures/src/rake-0.8.7/test/capture_stdout.rb +26 -0
  235. data/spec/fixtures/src/spade/lib/main.js +1 -0
  236. data/spec/fixtures/src/spade/package.json +15 -0
  237. data/spec/fixtures/transporter/lib/main.js +3 -0
  238. data/spec/fixtures/transporter/packages/transport/lib/wrapper.js +5 -0
  239. data/spec/fixtures/transporter/packages/transport/package.json +21 -0
  240. data/spec/fixtures/transporter/transporter.json +18 -0
  241. data/spec/gauntlet_spec.rb +33 -0
  242. data/spec/package_spec.rb +319 -0
  243. data/spec/pipeline_spec.rb +213 -0
  244. data/spec/project_spec.rb +130 -0
  245. data/spec/spec_helper.rb +42 -0
  246. data/spec/support/cli.rb +93 -0
  247. data/spec/support/env.rb +18 -0
  248. data/spec/support/fake.rb +53 -0
  249. data/spec/support/fake_gem_server.rb +72 -0
  250. data/spec/support/fake_gemcutter.rb +50 -0
  251. data/spec/support/matchers.rb +32 -0
  252. data/spec/support/path.rb +63 -0
  253. data/spec/support/project.rb +43 -0
  254. data/templates/init/assets/bpm_packages.js +7 -0
  255. data/templates/init/assets/bpm_styles.css +7 -0
  256. data/templates/init/project.json +16 -0
  257. data/templates/project/LICENSE +19 -0
  258. data/templates/project/README.md +21 -0
  259. data/templates/project/app.js +1 -0
  260. data/templates/project/index.html +13 -0
  261. metadata +627 -0
@@ -0,0 +1,314 @@
1
+ bundle-install(1) -- Install the dependencies specified in your Gemfile
2
+ =======================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `bundle install` [--gemfile=GEMFILE]
7
+ [--path PATH] [--system]
8
+ [--without=GROUP1[ GROUP2...]]
9
+ [--local] [--deployment]
10
+ [--binstubs[=DIRECTORY]]
11
+ [--quiet]
12
+
13
+ ## DESCRIPTION
14
+
15
+ Install the gems specified in your Gemfile(5). If this is the first
16
+ time you run bundle install (and a `Gemfile.lock` does not exist),
17
+ bundler will fetch all remote sources, resolve dependencies and
18
+ install all needed gems.
19
+
20
+ If a `Gemfile.lock` does exist, and you have not updated your Gemfile(5),
21
+ bundler will fetch all remote sources, but use the dependencies
22
+ specified in the `Gemfile.lock` instead of resolving dependencies.
23
+
24
+ If a `Gemfile.lock` does exist, and you have updated your Gemfile(5),
25
+ bundler will use the dependencies in the `Gemfile.lock` for all gems
26
+ that you did not update, but will re-resolve the dependencies of
27
+ gems that you did update. You can find more information about this
28
+ update process below under [CONSERVATIVE UPDATING][].
29
+
30
+ ## OPTIONS
31
+
32
+ * `--gemfile=<gemfile>`:
33
+ The location of the Gemfile(5) that bundler should use. This defaults
34
+ to a gemfile in the current working directory. In general, bundler
35
+ will assume that the location of the Gemfile(5) is also the project
36
+ root, and will look for the `Gemfile.lock` and `vendor/cache` relative
37
+ to it.
38
+
39
+ * `--path=<path>`:
40
+ The location to install the gems in the bundle to. This defaults
41
+ to the gem home, which is the location that `gem install` installs
42
+ gems to. This means that, by default, gems installed without a
43
+ `--path` setting will show up in `gem list`. This setting is a
44
+ [remembered option][REMEMBERED OPTIONS].
45
+
46
+ * `--system`:
47
+ Installs the gems in the bundle to the system location. This
48
+ overrides any previous [remembered][REMEMBERED OPTIONS] use of
49
+ `--path`.
50
+
51
+ * `--without=<list>`:
52
+ A space-separated list of groups to skip installing. This is a
53
+ [remembered option][REMEMBERED OPTIONS].
54
+
55
+ * `--local`:
56
+ Do not attempt to connect to `rubygems.org`, instead using just
57
+ the gems located in `vendor/cache`. Note that if a more
58
+ appropriate platform-specific gem exists on `rubygems.org`,
59
+ this will bypass the normal lookup.
60
+
61
+ * `--deployment`:
62
+ Switches bundler's defaults into [deployment mode][DEPLOYMENT MODE].
63
+
64
+ * `--binstubs[=<directory>]`:
65
+ Create a directory (defaults to `bin`) containing an executable
66
+ that runs in the context of the bundle. For instance, if the
67
+ `rails` gem comes with a `rails` executable, this flag will create
68
+ a `bin/rails` executable that ensures that all dependencies used
69
+ come from the bundled gems.
70
+
71
+ ## DEPLOYMENT MODE
72
+
73
+ Bundler's defaults are optimized for development. To switch to
74
+ defaults optimized for deployment, use the `--deployment` flag.
75
+
76
+ 1. A `Gemfile.lock` is required.
77
+
78
+ To ensure that the same versions of the gems you developed with
79
+ and tested with are also used in deployments, a `Gemfile.lock`
80
+ is required.
81
+
82
+ This is mainly to ensure that you remember to check your
83
+ `Gemfile.lock` into version control.
84
+
85
+ 2. The `Gemfile.lock` must be up to date
86
+
87
+ In development, you can modify your Gemfile(5) and re-run
88
+ `bundle install` to [conservatively update][CONSERVATIVE UPDATING]
89
+ your `Gemfile.lock` snapshot.
90
+
91
+ In deployment, your `Gemfile.lock` should be up-to-date with
92
+ changes made in your Gemfile(5).
93
+
94
+ 3. Gems are installed to `vendor/bundle` not your default system location
95
+
96
+ In development, it's convenient to share the gems used in your
97
+ application with other applications and other scripts run on
98
+ the system.
99
+
100
+ In deployment, isolation is a more important default. In addition,
101
+ the user deploying the application may not have permission to install
102
+ gems to the system, or the web server may not have permission to
103
+ read them.
104
+
105
+ As a result, `bundle install --deployment` installs gems to
106
+ the `vendor/bundle` directory in the application. This may be
107
+ overridden using the `--path` option.
108
+
109
+ ## SUDO USAGE
110
+
111
+ By default, bundler installs gems to the same location as `gem install`.
112
+
113
+ In some cases, that location may not be writable by your Unix user. In
114
+ that case, bundler will stage everything in a temporary directory,
115
+ then ask you for your `sudo` password in order to copy the gems into
116
+ their system location.
117
+
118
+ From your perspective, this is identical to installing them gems
119
+ directly into the system.
120
+
121
+ You should never use `sudo bundle install`. This is because several
122
+ other steps in `bundle install` must be performed as the current user:
123
+
124
+ * Updating your `Gemfile.lock`
125
+ * Updating your `vendor/cache`, if necessary
126
+ * Checking out private git repositories using your user's SSH keys
127
+
128
+ Of these three, the first two could theoretically be performed by
129
+ `chown`ing the resulting files to `$SUDO_USER`. The third, however,
130
+ can only be performed by actually invoking the `git` command as
131
+ the current user. Therefore, git gems are downloaded and installed
132
+ into `~/.bundle` rather than $GEM_HOME or $BUNDLE_PATH.
133
+
134
+ As a result, you should run `bundle install` as the current user,
135
+ and bundler will ask for your password if it is needed to put the
136
+ gems into their final location.
137
+
138
+ ## INSTALLING GROUPS
139
+
140
+ By default, `bundle install` will install all gems in all groups
141
+ in your Gemfile(5), except those declared for a different platform.
142
+
143
+ However, you can explicitly tell bundler to skip installing
144
+ certain groups with the `--without` option. This option takes
145
+ a space-separated list of groups.
146
+
147
+ While the `--without` option will skip _installing_ the gems in the
148
+ specified groups, it will still _download_ those gems and use them to
149
+ resolve the dependencies of every gem in your Gemfile(5).
150
+
151
+ This is so that installing a different set of groups on another
152
+ machine (such as a production server) will not change the
153
+ gems and versions that you have already developed and tested against.
154
+
155
+ `Bundler offers a rock-solid guarantee that the third-party
156
+ code you are running in development and testing is also the
157
+ third-party code you are running in production. You can choose
158
+ to exclude some of that code in different environments, but you
159
+ will never be caught flat-footed by different versions of
160
+ third-party code being used in different environments.`
161
+
162
+ For a simple illustration, consider the following Gemfile(5):
163
+
164
+ source "http://rubygems.org"
165
+
166
+ gem "sinatra"
167
+
168
+ group :production do
169
+ gem "rack-perftools-profiler"
170
+ end
171
+
172
+ In this case, `sinatra` depends on any version of Rack (`>= 1.0`, while
173
+ `rack-perftools-profiler` depends on 1.x (`~> 1.0`).
174
+
175
+ When you run `bundle install --without production` in development, we
176
+ look at the dependencies of `rack-perftools-profiler` as well. That way,
177
+ you do not spend all your time developing against Rack 2.0, using new
178
+ APIs unavailable in Rack 1.x, only to have bundler switch to Rack 1.2
179
+ when the `production` group _is_ used.
180
+
181
+ This should not cause any problems in practice, because we do not
182
+ attempt to `install` the gems in the excluded groups, and only evaluate
183
+ as part of the dependency resolution process.
184
+
185
+ This also means that you cannot include different versions of the same
186
+ gem in different groups, because doing so would result in different
187
+ sets of dependencies used in development and production. Because of
188
+ the vagaries of the dependency resolution process, this usually
189
+ affects more than just the gems you list in your Gemfile(5), and can
190
+ (surprisingly) radically change the gems you are using.
191
+
192
+ ## REMEMBERED OPTIONS
193
+
194
+ Some options (marked above in the [OPTIONS][] section) are remembered
195
+ between calls to `bundle install`, and by the Bundler runtime.
196
+
197
+ For instance, if you run `bundle install --without test`, a subsequent
198
+ call to `bundle install` that does not include a `--without` flag will
199
+ remember your previous choice.
200
+
201
+ In addition, a call to `Bundler.setup` will not attempt to make the
202
+ gems in those groups available on the Ruby load path, as they were
203
+ not installed.
204
+
205
+ The settings that are remembered are:
206
+
207
+ * `--deployment`:
208
+ At runtime, this remembered setting will also result in Bundler
209
+ raising an exception if the `Gemfile.lock` is out of date.
210
+
211
+ * `--path`:
212
+ Subsequent calls to `bundle install` will install gems to the
213
+ directory originally passed to `--path`. The Bundler runtime
214
+ will look for gems in that location. You can revert this
215
+ option by running `bundle install --system`.
216
+
217
+ * `--binstubs`:
218
+ Bundler will update the executables every subsequent call to
219
+ `bundle install`.
220
+
221
+ * `--without`:
222
+ As described above, Bundler will skip the gems specified by
223
+ `--without` in subsequent calls to `bundle install`. The
224
+ Bundler runtime will also not try to make the gems in the
225
+ skipped groups available.
226
+
227
+ ## THE GEMFILE.LOCK
228
+
229
+ When you run `bundle install`, Bundler will persist the full names
230
+ and versions of all gems that you used (including dependencies of
231
+ the gems specified in the Gemfile(5)) into a file called `Gemfile.lock`.
232
+
233
+ Bundler uses this file in all subsequent calls to `bundle install`,
234
+ which guarantees that you always use the same exact code, even
235
+ as your application moves across machines.
236
+
237
+ Because of the way dependency resolution works, even a
238
+ seemingly small change (for instance, an update to a point-release
239
+ of a dependency of a gem in your Gemfile(5)) can result in radically
240
+ different gems being needed to satisfy all dependencies.
241
+
242
+ As a result, you `SHOULD` check your `Gemfile.lock` into version
243
+ control. If you do not, every machine that checks out your
244
+ repository (including your production server) will resolve all
245
+ dependencies again, which will result in different versions of
246
+ third-party code being used if `any` of the gems in the Gemfile(5)
247
+ or any of their dependencies have been updated.
248
+
249
+ ## CONSERVATIVE UPDATING
250
+
251
+ When you make a change to the Gemfile(5) and then run `bundle install`,
252
+ Bundler will update only the gems that you modified.
253
+
254
+ In other words, if a gem that you `did not modify` worked before
255
+ you called `bundle install`, it will continue to use the exact
256
+ same versions of all dependencies as it used before the update.
257
+
258
+ Let's take a look at an example. Here's your original Gemfile(5):
259
+
260
+ source "http://rubygems.org"
261
+
262
+ gem "actionpack", "2.3.8"
263
+ gem "activemerchant"
264
+
265
+ In this case, both `actionpack` and `activemerchant` depend on
266
+ `activesupport`. The `actionpack` gem depends on `activesupport 2.3.8`
267
+ and `rack ~> 1.1.0`, while the `activemerchant` gem depends on
268
+ `activesupport >= 2.3.2`, `braintree >= 2.0.0`, and `builder >= 2.0.0`.
269
+
270
+ When the dependencies are first resolved, Bundler will select
271
+ `activesupport 2.3.8`, which satisfies the requirements of both
272
+ gems in your Gemfile(5).
273
+
274
+ Next, you modify your Gemfile(5) to:
275
+
276
+ source "http://rubygems.org"
277
+
278
+ gem "actionpack", "3.0.0.rc"
279
+ gem "activemerchant"
280
+
281
+ The `actionpack 3.0.0.rc` gem has a number of new dependencies,
282
+ and updates the `activesupport` dependency to `= 3.0.0.rc` and
283
+ the `rack` dependency to `~> 1.2.1`.
284
+
285
+ When you run `bundle install`, Bundler notices that you changed
286
+ the `actionpack` gem, but not the `activemerchant` gem. It
287
+ evaluates the gems currently being used to satisfy its requirements:
288
+
289
+ * `activesupport 2.3.8`:
290
+ also used to satisfy a dependency in `activemerchant`,
291
+ which is not being updated
292
+ * `rack ~> 1.1.0`:
293
+ not currently being used to satify another dependency
294
+
295
+ Because you did not explicitly ask to update `activemerchant`,
296
+ you would not expect it to suddenly stop working after updating
297
+ `actionpack`. However, satisfying the new `activesupport 3.0.0.rc`
298
+ dependency of actionpack requires updating one of its dependencies.
299
+
300
+ Even though `activemerchant` declares a very loose dependency
301
+ that theoretically matches `activesupport 3.0.0.rc`, bundler treats
302
+ gems in your Gemfile(5) that have not changed as an atomic unit
303
+ together with their dependencies. In this case, the `activemerchant`
304
+ dependency is treated as `activemerchant 1.7.1 + activesupport 2.3.8`,
305
+ so `bundle install` will report that it cannot update `actionpack`.
306
+
307
+ To explicitly update `actionpack`, including its dependencies
308
+ which other gems in the Gemfile(5) still depend on, run
309
+ `bundle update actionpack` (see `bundle update(1)`).
310
+
311
+ `Summary`: In general, after making a change to the Gemfile(5) , you
312
+ should first try to run `bundle install`, which will guarantee that no
313
+ other gems in the Gemfile(5) are impacted by the change. If that
314
+ does not work, run [bundle update(1)][bundle-update].
@@ -0,0 +1,59 @@
1
+ bundle-package(1) -- Package your needed `.gem` files into your application
2
+ ===========================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `bundle package`
7
+
8
+ ## DESCRIPTION
9
+
10
+ Copy all of the `.gem` files needed to run the application into the
11
+ `vendor/cache` directory. In the future, when running [bundle install(1)][bundle-install],
12
+ use the gems in the cache in preference to the ones on `rubygems.org`.
13
+
14
+ ## GIT AND PATH GEMS
15
+
16
+ In Bundler 1.0, the `bundle package` command only packages `.gem` files,
17
+ not gems specified using the `:git` or `:path` options. This will likely
18
+ change in the future.
19
+
20
+ ## REMOTE FETCHING
21
+
22
+ By default, if you simply run [bundle install(1)][bundle-install] after running
23
+ [bundle package(1)][bundle-package], bundler will still connect to `rubygems.org`
24
+ to check whether a platform-specific gem exists for any of the gems
25
+ in `vendor/cache`.
26
+
27
+ For instance, consider this Gemfile(5):
28
+
29
+ source "http://rubygems.org"
30
+
31
+ gem "nokogiri"
32
+
33
+ If you run `bundle package` under C Ruby, bundler will retrieve
34
+ the version of `nokogiri` for the `"ruby"` platform. If you deploy
35
+ to JRuby and run `bundle install`, bundler is forced to check to
36
+ see whether a `"java"` platformed `nokogiri` exists.
37
+
38
+ Even though the `nokogiri` gem for the Ruby platform is
39
+ _technically_ acceptable on JRuby, it actually has a C extension
40
+ that does not run on JRuby. As a result, bundler will, by default,
41
+ still connect to `rubygems.org` to check whether it has a version
42
+ of one of your gems more specific to your platform.
43
+
44
+ This problem is also not just limited to the `"java"` platform.
45
+ A similar (common) problem can happen when developing on Windows
46
+ and deploying to Linux, or even when developing on OSX and
47
+ deploying to Linux.
48
+
49
+ If you know for sure that the gems packaged in `vendor/cache`
50
+ are appropriate for the platform you are on, you can run
51
+ `bundle install --local` to skip checking for more appropriate
52
+ gems, and just use the ones in `vendor/cache`.
53
+
54
+ One way to be sure that you have the right platformed versions
55
+ of all your gems is to run `bundle package` on an identical
56
+ machine and check in the gems. For instance, you can run
57
+ `bundle package` on an identical staging box during your
58
+ staging process, and check in the `vendor/cache` before
59
+ deploying to production.
@@ -0,0 +1,176 @@
1
+ bundle-update(1) -- Update your gems to the latest available versions
2
+ =====================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `bundle update` <*gems> [--source=NAME]
7
+
8
+ ## DESCRIPTION
9
+
10
+ Update the gems specified (all gems, if none are specified), ignoring
11
+ the previously installed gems specified in the `Gemfile.lock`. In
12
+ general, you should use [bundle install(1)][bundle-install] to install the same exact
13
+ gems and versions across machines.
14
+
15
+ You would use `bundle update` to explicitly update the version of a
16
+ gem.
17
+
18
+ ## OPTIONS
19
+
20
+ * `--source=<name>`:
21
+ The name of a `:git` or `:path` source used in the Gemfile(5). For
22
+ instance, with a `:git` source of `http://github.com/rails/rails.git`,
23
+ you would call `bundle update --source rails`
24
+
25
+ ## UPDATING ALL GEMS
26
+
27
+ If you run `bundle update` with no parameters, bundler will ignore
28
+ any previously installed gems and resolve all dependencies again
29
+ based on the latest versions of all gems available in the sources.
30
+
31
+ Consider the following Gemfile(5):
32
+
33
+ source "http://rubygems.org"
34
+
35
+ gem "rails", "3.0.0.rc"
36
+ gem "nokogiri"
37
+
38
+ When you run [bundle install(1)][bundle-install] the first time, bundler will resolve
39
+ all of the dependencies, all the way down, and install what you need:
40
+
41
+ Fetching source index for http://rubygems.org/
42
+ Installing rake (0.8.7)
43
+ Installing abstract (1.0.0)
44
+ Installing activesupport (3.0.0.rc)
45
+ Installing builder (2.1.2)
46
+ Installing i18n (0.4.1)
47
+ Installing activemodel (3.0.0.rc)
48
+ Installing erubis (2.6.6)
49
+ Installing rack (1.2.1)
50
+ Installing rack-mount (0.6.9)
51
+ Installing rack-test (0.5.4)
52
+ Installing tzinfo (0.3.22)
53
+ Installing actionpack (3.0.0.rc)
54
+ Installing mime-types (1.16)
55
+ Installing polyglot (0.3.1)
56
+ Installing treetop (1.4.8)
57
+ Installing mail (2.2.5)
58
+ Installing actionmailer (3.0.0.rc)
59
+ Installing arel (0.4.0)
60
+ Installing activerecord (3.0.0.rc)
61
+ Installing activeresource (3.0.0.rc)
62
+ Installing bundler (1.0.0.rc.3)
63
+ Installing nokogiri (1.4.3.1) with native extensions
64
+ Installing thor (0.14.0)
65
+ Installing railties (3.0.0.rc)
66
+ Installing rails (3.0.0.rc)
67
+
68
+ Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
69
+
70
+ As you can see, even though you have just two gems in the Gemfile(5), your application
71
+ actually needs 25 different gems in order to run. Bundler remembers the exact versions
72
+ it installed in `Gemfile.lock`. The next time you run [bundle install(1)][bundle-install], bundler skips
73
+ the dependency resolution and installs the same gems as it installed last time.
74
+
75
+ After checking in the `Gemfile.lock` into version control and cloning it on another
76
+ machine, running [bundle install(1)][bundle-install] will _still_ install the gems that you installed
77
+ last time. You don't need to worry that a new release of `erubis` or `mail` changes
78
+ the gems you use.
79
+
80
+ However, from time to time, you might want to update the gems you are using to the
81
+ newest versions that still match the gems in your Gemfile(5).
82
+
83
+ To do this, run `bundle update`, which will ignore the `Gemfile.lock`, and resolve
84
+ all the dependencies again. Keep in mind that this process can result in a significantly
85
+ different set of the 25 gems, based on the requirements of new gems that the gem
86
+ authors released since the last time you ran `bundle update`.
87
+
88
+ ## UPDATING A LIST OF GEMS
89
+
90
+ Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the
91
+ gems that you specified locked to the versions in the `Gemfile.lock`.
92
+
93
+ For instance, in the scenario above, imagine that `nokogiri` releases version `1.4.4`, and
94
+ you want to update it _without_ updating Rails and all of its dependencies. To do this,
95
+ run `bundle update nokogiri`.
96
+
97
+ Bundler will update `nokogiri` and any of its dependencies, but leave alone Rails and
98
+ its dependencies.
99
+
100
+ ## OVERLAPPING DEPENDENCIES
101
+
102
+ Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same
103
+ second-level dependency. For instance, consider the case of `thin` and
104
+ `rack-perftools-profiler`.
105
+
106
+ source "http://rubygems.org"
107
+
108
+ gem "thin"
109
+ gem "rack-perftools-profiler"
110
+
111
+ The `thin` gem depends on `rack >= 1.0`, while `rack-perftools-profiler` depends
112
+ on `rack ~> 1.0`. If you run bundle install, you get:
113
+
114
+ Fetching source index for http://rubygems.org/
115
+ Installing daemons (1.1.0)
116
+ Installing eventmachine (0.12.10) with native extensions
117
+ Installing open4 (1.0.1)
118
+ Installing perftools.rb (0.4.7) with native extensions
119
+ Installing rack (1.2.1)
120
+ Installing rack-perftools_profiler (0.0.2)
121
+ Installing thin (1.2.7) with native extensions
122
+ Using bundler (1.0.0.rc.3)
123
+
124
+ In this case, the two gems have their own set of dependencies, but they share
125
+ `rack` in common. If you run `bundle update thin`, bundler will update `daemons`,
126
+ `eventmachine` and `rack`, which are dependencies of `thin`, but not `open4` or
127
+ `perftools.rb`, which are dependencies of `rack-perftools_profiler`. Note that
128
+ `bundle update thin` will update `rack` even though it's _also_ a dependency of
129
+ `rack-perftools_profiler`.
130
+
131
+ `In short`, when you update a gem using `bundle update`, bundler will update all
132
+ dependencies of that gem, including those that are also dependencies of another gem.
133
+
134
+ In this scenario, updating the `thin` version manually in the Gemfile(5),
135
+ and then running [bundle install(1)][bundle-install] will only update `daemons` and `eventmachine`,
136
+ but not `rack`. For more information, see the `CONSERVATIVE UPDATING` section
137
+ of [bundle install(1)][bundle-install].
138
+
139
+ ## RECOMMENDED WORKFLOW
140
+
141
+ In general, when working with an application managed with bundler, you should
142
+ use the following workflow:
143
+
144
+ * After you create your Gemfile(5) for the first time, run
145
+
146
+ $ bundle install
147
+
148
+ * Check the resulting `Gemfile.lock` into version control
149
+
150
+ $ git add Gemfile.lock
151
+
152
+ * When checking out this repository on another development machine, run
153
+
154
+ $ bundle install
155
+
156
+ * When checking out this repository on a deployment machine, run
157
+
158
+ $ bundle install --deployment
159
+
160
+ * After changing the Gemfile(5) to reflect a new or update dependency, run
161
+
162
+ $ bundle install
163
+
164
+ * Make sure to check the updated `Gemfile.lock` into version control
165
+
166
+ $ git add Gemfile.lock
167
+
168
+ * If [bundle install(1)][bundle-install] reports a conflict, manually update the specific
169
+ gems that you changed in the Gemfile(5)
170
+
171
+ $ bundle update rails thin
172
+
173
+ * If you want to update all the gems to the latest possible versions that
174
+ still match the gems listed in the Gemfile(5), run
175
+
176
+ $ bundle update