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,47 @@
1
+ # Bundler Issues
2
+
3
+ ## Troubleshooting
4
+
5
+ Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/). Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://gembundler.com/man/bundle.1.html).
6
+
7
+ After reading the documentation, try these troubleshooting steps:
8
+
9
+ # remove user-specific gems and git repos
10
+ rm -rf ~/.bundle/ ~/.gem/
11
+
12
+ # remove system-wide git repos and git checkouts
13
+ rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
14
+
15
+ # remove project-specific settings and git repos
16
+ rm -rf .bundle/
17
+
18
+ # remove project-specific cached .gem files
19
+ rm -rf vendor/cache/
20
+
21
+ # remove the saved resolve of the Gemfile
22
+ rm -rf Gemfile.lock
23
+
24
+ # try to install one more time
25
+ bundle install
26
+
27
+ ## Reporting unresolved problems
28
+
29
+ If you are still having problems, please report issues to the [Bundler issue tracker](http://github.com/carlhuda/bundler/issues/).
30
+
31
+ Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please create a gist of the following information and include a link in your ticket:
32
+
33
+ - What version of bundler you are using
34
+ - What version of Ruby you are using
35
+ - Whether you are using RVM, and if so what version
36
+ - Your Gemfile
37
+ - Your Gemfile.lock
38
+ - If you are on 0.9, whether you have locked or not
39
+ - If you are on 1.0, the result of `bundle config`
40
+ - The command you ran to generate exception(s)
41
+ - The exception backtrace(s)
42
+
43
+ If you are using Rails 2.3, please also include:
44
+
45
+ - Your boot.rb file
46
+ - Your preinitializer.rb file
47
+ - Your environment.rb file
@@ -0,0 +1,21 @@
1
+ Portions copyright (c) 2010 Andre Arko
2
+ Portions copyright (c) 2009 Engine Yard
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # Bundler: a gem to bundle gems
2
+
3
+ Bundler is a tool that manages gem dependencies for your ruby application. It
4
+ takes a gem manifest file and is able to fetch, download, and install the gems
5
+ and all child dependencies specified in this manifest. It can manage any update
6
+ to the gem manifest file and update the bundle's gems accordingly. It also lets
7
+ you run any ruby code in context of the bundle's gem environment.
8
+
9
+ ### Installation and usage
10
+
11
+ See [gembundler.com](http://gembundler.com) for up-to-date installation and usage instructions.
12
+
13
+ ### Troubleshooting
14
+
15
+ For help with common problems, see [ISSUES](http://github.com/carlhuda/bundler/blob/master/ISSUES.md).
16
+
17
+ ### Development
18
+
19
+ To see what has changed in recent versions of bundler, see the [CHANGELOG](http://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
20
+
21
+ The `master` branch contains our current progress towards version 1.1. Because of that, please submit bugfix pull requests against the `1-0-stable` branch.
22
+
23
+ ### Upgrading from Bundler 0.8 to 0.9 and above
24
+
25
+ See [UPGRADING](http://github.com/carlhuda/bundler/blob/master/UPGRADING.md).
26
+
27
+ ### Other questions
28
+
29
+ Feel free to chat with the Bundler core team (and many other users) on IRC in the [#bundler](irc://irc.freenode.net/bundler) channel on Freenode, or via email on the [Bundler mailing list](http://groups.google.com/group/ruby-bundler).
@@ -0,0 +1,103 @@
1
+ ## Bundler 0.9 to 1.0 and above
2
+
3
+ Upgrading from Bundler 0.9 to 1.0 is relatively painless. The
4
+ Gemfile API is the same, so your old Gemfiles should continue
5
+ to work.
6
+
7
+ The "env" file that 0.9 created at `.bundle/environment.rb` has been
8
+ removed. As a side effect of this, Passenger will only find your
9
+ bundled gems if you install with `bundle install --deployment`.
10
+ Alternatively, you can tell Passenger where you gems are installed,
11
+ [something like this](http://bit.ly/passenger-gem-home).
12
+
13
+ The `bundle lock` command is no longer needed, as the
14
+ Gemfile.lock file is now automatically generated by `bundle install`.
15
+ If you have not yet done so, add your Gemfile.lock to source control
16
+ and check it in.
17
+
18
+ Running `bundle install` no longer updates the versions of your gems.
19
+ If you need to update just one gem, run `bundle update GEMNAME`. To
20
+ update all gems to the newest versions possible, run `bundle update`.
21
+
22
+ Bundler now supports multiple platforms, using a block syntax to
23
+ declare platform-specific gems:
24
+
25
+ platform :jruby do
26
+ gem "jruby-maven-plugins"
27
+ end
28
+
29
+ Deploying using Bundler is even easier than it was before, as Bundler
30
+ now includes a Capistrano recipe. Simply add this line to the top of
31
+ your deploy.rb file to run Bundler automatically as part of deploying:
32
+
33
+ require 'bundler/capistrano'
34
+
35
+ For more details on deploying using bundler, see the documentation
36
+ for the bundler cap task, and the [documentation on deploying](http://gembundler.com/v1.0/deploying.html).
37
+
38
+
39
+ ## Bundler 0.8 to 0.9 and above
40
+
41
+ Upgrading to Bundler 0.9 from Bundler 0.8 requires upgrading several
42
+ API calls in your Gemfile, and some workarounds if you are using Rails 2.3.
43
+
44
+ ### Gemfile Removals
45
+
46
+ Bundler 0.9 removes the following Bundler 0.8 Gemfile APIs:
47
+
48
+ 1. `disable_system_gems`: This is now the default (and only) option
49
+ for bundler. Bundler uses the system gems you have specified
50
+ in the Gemfile, and only the system gems you have specified
51
+ (and their dependencies)
52
+ 2. `disable_rubygems`: This is no longer supported. We are looking
53
+ into ways to get the fastest performance out of each supported
54
+ scenario, and we will make speed the default where possible.
55
+ 3. `clear_sources`: Bundler now defaults to an empty source
56
+ list. If you want to include Rubygems, you can add the source
57
+ via source "http://gemcutter.org". If you use bundle init, this
58
+ source will be automatically added for you in the generated
59
+ Gemfile
60
+ 4. `bundle_path`: You can specify this setting when installing
61
+ via `bundle install /path/to/bundle`. Bundler will remember
62
+ where you installed the dependencies to on a particular
63
+ machine for future installs, loads, setups, etc.
64
+ 5. `bin_path`: Bundler no longer generates binaries in the root
65
+ of your app. You should use `bundle exec` to execute binaries
66
+ in the current context.
67
+
68
+ ### Gemfile Changes
69
+
70
+ Bundler 0.9 changes the following Bundler 0.8 Gemfile APIs:
71
+
72
+ 1. Bundler 0.8 supported :only and :except as APIs for describing
73
+ groups of gems. Bundler 0.9 supports a single `group` method,
74
+ which you can use to group gems together. See the above "Group"
75
+ section for more information.
76
+
77
+ This means that `gem "foo", :only => :production` becomes
78
+ `gem "foo", :group => :production`, and
79
+ `only :production { gem "foo" }` becomes
80
+ `group :production { gem "foo" }`
81
+
82
+ The short version is: group your gems together logically, and
83
+ use the available commands to make use of the groups you've
84
+ created.
85
+
86
+ 2. `:require_as` becomes `:require`
87
+
88
+ 3. `:vendored_at` is fully removed; you should use `:path`
89
+
90
+ ### API Changes
91
+
92
+ 1. `Bundler.require_env(:environment)` becomes
93
+ `Bundler.require(:multiple, :groups)`. You must
94
+ now specify the default group (the default group is the
95
+ group made up of the gems not assigned to any group)
96
+ explicitly. So `Bundler.require_env(:test)` becomes
97
+ `Bundler.require(:default, :test)`
98
+
99
+ 2. `require 'vendor/gems/environment'`: In unlocked
100
+ mode, where using system gems, this becomes
101
+ `Bundler.setup(:multiple, :groups)`. If you don't
102
+ specify any groups, this puts all groups on the load
103
+ path. In locked, mode, it becomes `require '.bundle/environment'`
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env spade
2
+
3
+ // Non-functioning code just for testing
4
+
5
+ # Check if an older version of bundler is installed
6
+ require('bundler')
7
+
8
+ try {
9
+ Bundler.CLI.start();
10
+ } catch(e) {
11
+ if (e instanceof Bundler.BundlerError) {
12
+ Bundler.ui.error(e.message);
13
+ Bundler.ui.debug(e.backtrace.join("\n"));
14
+ exit(e.statusCode);
15
+ } else if (e instanceof Interrupt) {
16
+ Bundler.ui.error("\nQuitting...");
17
+ Bundler.ui.debug e.backtrace.join("\n");
18
+ exit(1);
19
+ }
20
+ }
@@ -0,0 +1,23 @@
1
+ /*globals Bundler ENV WINDOWS */
2
+
3
+ require('rbconfig');
4
+ require('fileutils');
5
+ require('pathname');
6
+ require('yaml');
7
+ require('bundler/rubygems_ext');
8
+ require('bundler/version');
9
+
10
+ Bundler = {
11
+ ORIGINAL_ENV: ENV,
12
+
13
+ Definition: require.autoload('bundler/definition'),
14
+ Dependency: require.autoload('bundler/dependency'),
15
+ Dsl: require.autoload('bundler/dsl'),
16
+ UI: require.autoload('bundler/ui'),
17
+
18
+ WINDOWS: ENV["host_os"].match(/!(msdos|mswin|djgpp|mingw)/),
19
+ FREEBSD: ENV["host_os"].match(/bsd/),
20
+ NULL: WINDOWS ? "NUL" : "/dev/null"
21
+
22
+ };
23
+
@@ -0,0 +1,14 @@
1
+ require("digest/sha1");
2
+
3
+ Bundler.Definition = {
4
+
5
+ build: function(gemfile, lockfile, unlock) {
6
+ unluck = unlock || {};
7
+ gemfile = Pathname.new(gemfile).expandPath();
8
+ if (!gemfile.file()) {
9
+ throw new GemfileNotFound(gemfile+' not found');
10
+ }
11
+ Dsl.evaluate(gemfile, lockfile, unlock);
12
+ }
13
+ };
14
+
@@ -0,0 +1,15 @@
1
+ require('rubygems/dependency');
2
+ require('bundler/shared_helpers');
3
+ require('bundler/rubygems_ext');
4
+
5
+ Bundler.Dependency = {
6
+ autorequire: false,
7
+ groups: [],
8
+ platforms: [],
9
+
10
+ PLATFORM_MAP = {
11
+ 'ruby': 'RUBY',
12
+ 'ruby_18': 'RUBY'
13
+ }
14
+ } ;
15
+
@@ -0,0 +1,9 @@
1
+ require('bundler/dependency');
2
+
3
+ Bundler.Dsl = {
4
+ evaluate: function(gemfile, lockfile, unlock) {
5
+ var builder = new Bundler.Dsl();
6
+ builder.instanceEval(Bundler.readFile(gemfile.toString()), gemfile.toString(), 1);
7
+ builder.toDefinition(lockfile, unlock);
8
+ }
9
+ };
@@ -0,0 +1,6 @@
1
+
2
+ Bundler.UI = {
3
+ warn: function(message) {},
4
+ debug: function(message) {},
5
+ error: function(message) {}
6
+ };
@@ -0,0 +1,90 @@
1
+ bundle-config(1) -- Set bundler configuration options
2
+ =====================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `bundle config` [<name> [<value>]]
7
+
8
+ ## DESCRIPTION
9
+
10
+ This command allows you to interact with bundler's configuration system.
11
+ Bundler retrieves its configuration from the local application (`app/.bundle/config`),
12
+ environment variables, and the user's home directory (`~/.bundle/config`),
13
+ in that order of priority.
14
+
15
+ Executing `bundle config` with no parameters will print a list of all
16
+ bundler configuration for the current bundle, and where that configuration
17
+ was set.
18
+
19
+ Executing `bundle config <name>` will print the value of that configuration
20
+ setting, and where it was set.
21
+
22
+ Executing `bundle config <name> <value>` will set that configuration to the
23
+ value specified for all bundles executed as the current user. The configuration
24
+ will be stored in `~/.bundle/config`.
25
+
26
+ ## BUILD OPTIONS
27
+
28
+ You can use `bundle config` to give bundler the flags to pass to the gem
29
+ installer every time bundler tries to install a particular gem.
30
+
31
+ A very common example, the `mysql` gem, requires Snow Leopard users to
32
+ pass configuration flags to `gem install` to specify where to find the
33
+ `mysql_config` executable.
34
+
35
+ gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
36
+
37
+ Since the specific location of that executable can change from machine
38
+ to machine, you can specify these flags on a per-machine basis.
39
+
40
+ bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
41
+
42
+ After running this command, every time bundler needs to install the
43
+ `mysql` gem, it will pass along the flags you specified.
44
+
45
+ ## CONFIGURATION KEYS
46
+
47
+ Configuration keys in bundler have two forms: the canonical form and the
48
+ environment variable form.
49
+
50
+ For instance, passing the `--without` flag to [bundle install(1)][bundle-install]
51
+ prevents Bundler from installing certain groups specified in the Gemfile(5). Bundler
52
+ persists this value in `app/.bundle/config` so that calls to `Bundler.setup`
53
+ do not try to find gems from the `Gemfile` that you didn't install. Additionally,
54
+ subsequent calls to [bundle install(1)][bundle-install] remember this setting and skip those
55
+ groups.
56
+
57
+ The canonical form of this configuration is `"without"`. To convert the canonical
58
+ form to the environment variable form, capitalize it, and prepend `BUNDLE_`. The
59
+ environment variable form of `"without"` is `BUNDLE_WITHOUT`.
60
+
61
+ ## LIST OF AVAILABLE KEYS
62
+
63
+ The following is a list of all configuration keys and their purpose. You can
64
+ learn more about their operation in [bundle install(1)][bundle-install].
65
+
66
+ * `path` (`BUNDLE_PATH`):
67
+ The location on disk to install gems. Defaults to `$GEM_HOME` in development
68
+ and `vendor/bundler` when `--deployment` is used
69
+ * `frozen` (`BUNDLE_FROZEN`):
70
+ Disallow changes to the `Gemfile`. Defaults to `true` when `--deployment`
71
+ is used.
72
+ * `without` (`BUNDLE_WITHOUT`):
73
+ A `:`-separated list of groups whose gems bundler should not install
74
+ * `bin` (`BUNDLE_BIN`):
75
+ Install executables from gems in the bundle to the specified directory.
76
+ Defaults to `false`.
77
+ * `gemfile` (`BUNDLE_GEMFILE`):
78
+ The name of the file that bundler should use as the `Gemfile`. This location
79
+ of this file also sets the root of the project, which is used to resolve
80
+ relative paths in the `Gemfile`, among other things. By default, bundler
81
+ will search up from the current working directory until it finds a
82
+ `Gemfile`.
83
+
84
+ In general, you should set these settings per-application by using the applicable
85
+ flag to the [bundle install(1)][bundle-install] command.
86
+
87
+ You can set them globally either via environment variables or `bundle config`,
88
+ whichever is preferable for your setup. If you use both, environment variables
89
+ will take preference over global settings.
90
+
@@ -0,0 +1,111 @@
1
+ bundle-exec(1) -- Execute a command in the context of the bundle
2
+ ================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `bundle exec` <command>
7
+
8
+ ## DESCRIPTION
9
+
10
+ This command executes the command, making all gems specified in the
11
+ `Gemfile(5)` available to `require` in Ruby programs.
12
+
13
+ Essentially, if you would normally have run something like
14
+ `rspec spec/my_spec.rb`, and you want to use the gems specified
15
+ in the `Gemfile(5)` and installed via [bundle install(1)][bundle-install], you
16
+ should run `bundle exec rspec spec/my_spec.rb`.
17
+
18
+ Note that `bundle exec` does not require that an executable is
19
+ available on your shell's `$PATH`.
20
+
21
+ ## BUNDLE INSTALL --BINSTUBS
22
+
23
+ If you use the `--binstubs` flag in [bundle install(1)][bundle-install], Bundler will
24
+ automatically create a directory (which defaults to `app_root/bin`)
25
+ containing all of the executables available from gems in the bundle.
26
+
27
+ After using `--binstubs`, `bin/rspec spec/my_spec.rb` is identical
28
+ to `bundle exec rspec spec/my_spec.rb`.
29
+
30
+ ## ENVIRONMENT MODIFICATIONS
31
+
32
+ `bundle exec` makes a number of changes to the shell environment,
33
+ then executes the command you specify in full.
34
+
35
+ * make sure that it's still possible to shell out to `bundle`
36
+ from inside a command invoked by `bundle exec` (using
37
+ `$BUNDLE_BIN_PATH`)
38
+ * put the directory containing executables (like `rails`, `rspec`,
39
+ `rackup`) for your bundle on `$PATH`
40
+ * make sure that if bundler is invoked in the subshell, it uses
41
+ the same `Gemfile` (by setting `BUNDLE_GEMFILE`)
42
+ * add `-rbundler/setup` to `$RUBYOPT`, which makes sure that
43
+ Ruby programs invoked in the subshell can see the gems in
44
+ the bundle
45
+
46
+ It also modifies Rubygems:
47
+
48
+ * disallow loading additional gems not in the bundle
49
+ * modify the `gem` method to be a no-op if a gem matching
50
+ the requirements is in the bundle, and to raise a
51
+ `Gem::LoadError` if it's not
52
+ * Define `Gem.refresh` to be a no-op, since the source
53
+ index is always frozen when using bundler, and to
54
+ prevent gems from the system leaking into the environment
55
+ * Override `Gem.bin_path` to use the gems in the bundle,
56
+ making system executables work
57
+ * Add all gems in the bundle into Gem.loaded_specs
58
+
59
+ ### Shelling out
60
+
61
+ When shelling out (using the `system` or backticks methods,
62
+ for example), Bundler's environment changes will propogate to
63
+ the subshell environment. If you desire to shell out without
64
+ Bundler's environment changes, simply employ the `with_clean_env`
65
+ method. It will restore all environment variables to what they
66
+ were before Bundler was activated. For example:
67
+
68
+ Bundler.with_clean_env do
69
+ `brew install wget`
70
+ end
71
+
72
+ ## RUBYGEMS PLUGINS
73
+
74
+ At present, the Rubygems plugin system requires all files
75
+ named `rubygems_plugin.rb` on the load path of _any_ installed
76
+ gem when any Ruby code requires `rubygems.rb`. This includes
77
+ executables installed into the system, like `rails`, `rackup`,
78
+ and `rspec`.
79
+
80
+ Since Rubygems plugins can contain arbitrary Ruby code, they
81
+ commonly end up activating themselves or their dependencies.
82
+
83
+ For instance, the `gemcutter 0.5` gem depended on `json_pure`.
84
+ If you had that version of gemcutter installed (even if
85
+ you _also_ had a newer version without this problem), Rubygems
86
+ would activate `gemcutter 0.5` and `json_pure <latest>`.
87
+
88
+ If your Gemfile(5) also contained `json_pure` (or a gem
89
+ with a dependency on `json_pure`), the latest version on
90
+ your system might conflict with the version in your
91
+ Gemfile(5), or the snapshot version in your `Gemfile.lock`.
92
+
93
+ If this happens, bundler will say:
94
+
95
+ You have already activated json_pure 1.4.6 but your Gemfile
96
+ requires json_pure 1.4.3. Consider using bundle exec.
97
+
98
+ In this situation, you almost certainly want to remove the
99
+ underlying gem with the problematic gem plugin. In general,
100
+ the authors of these plugins (in this case, the `gemcutter`
101
+ gem) have released newer versions that are more careful in
102
+ their plugins.
103
+
104
+ You can find a list of all the gems containing gem plugins
105
+ by running
106
+
107
+ ruby -rubygems -e "puts Gem.find_files('rubygems_plugin.rb')"
108
+
109
+ At the very least, you should remove all but the newest
110
+ version of each gem plugin, and also remove all gem plugins
111
+ that you aren't using (`gem uninstall gem_name`).