carat 1.9.9.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +24 -0
  5. data/CHANGELOG.md +2006 -0
  6. data/CODE_OF_CONDUCT.md +40 -0
  7. data/CONTRIBUTING.md +23 -0
  8. data/DEVELOPMENT.md +119 -0
  9. data/ISSUES.md +96 -0
  10. data/LICENSE.md +23 -0
  11. data/README.md +32 -0
  12. data/Rakefile +308 -0
  13. data/bin/carat +21 -0
  14. data/bin/carat_ruby +56 -0
  15. data/carat.gemspec +32 -0
  16. data/lib/carat.rb +446 -0
  17. data/lib/carat/anonymizable_uri.rb +32 -0
  18. data/lib/carat/capistrano.rb +16 -0
  19. data/lib/carat/cli.rb +407 -0
  20. data/lib/carat/cli/binstubs.rb +38 -0
  21. data/lib/carat/cli/cache.rb +35 -0
  22. data/lib/carat/cli/check.rb +35 -0
  23. data/lib/carat/cli/clean.rb +26 -0
  24. data/lib/carat/cli/common.rb +56 -0
  25. data/lib/carat/cli/config.rb +84 -0
  26. data/lib/carat/cli/console.rb +38 -0
  27. data/lib/carat/cli/exec.rb +44 -0
  28. data/lib/carat/cli/gem.rb +195 -0
  29. data/lib/carat/cli/init.rb +33 -0
  30. data/lib/carat/cli/inject.rb +33 -0
  31. data/lib/carat/cli/install.rb +156 -0
  32. data/lib/carat/cli/open.rb +23 -0
  33. data/lib/carat/cli/outdated.rb +80 -0
  34. data/lib/carat/cli/package.rb +45 -0
  35. data/lib/carat/cli/platform.rb +43 -0
  36. data/lib/carat/cli/show.rb +74 -0
  37. data/lib/carat/cli/update.rb +73 -0
  38. data/lib/carat/cli/viz.rb +27 -0
  39. data/lib/carat/constants.rb +5 -0
  40. data/lib/carat/current_ruby.rb +183 -0
  41. data/lib/carat/definition.rb +628 -0
  42. data/lib/carat/dep_proxy.rb +43 -0
  43. data/lib/carat/dependency.rb +110 -0
  44. data/lib/carat/deployment.rb +59 -0
  45. data/lib/carat/deprecate.rb +15 -0
  46. data/lib/carat/dsl.rb +331 -0
  47. data/lib/carat/endpoint_specification.rb +76 -0
  48. data/lib/carat/env.rb +75 -0
  49. data/lib/carat/environment.rb +42 -0
  50. data/lib/carat/fetcher.rb +423 -0
  51. data/lib/carat/friendly_errors.rb +85 -0
  52. data/lib/carat/gem_helper.rb +180 -0
  53. data/lib/carat/gem_helpers.rb +26 -0
  54. data/lib/carat/gem_installer.rb +9 -0
  55. data/lib/carat/gem_path_manipulation.rb +8 -0
  56. data/lib/carat/gem_tasks.rb +2 -0
  57. data/lib/carat/graph.rb +169 -0
  58. data/lib/carat/index.rb +197 -0
  59. data/lib/carat/injector.rb +64 -0
  60. data/lib/carat/installer.rb +339 -0
  61. data/lib/carat/lazy_specification.rb +83 -0
  62. data/lib/carat/lockfile_parser.rb +167 -0
  63. data/lib/carat/match_platform.rb +13 -0
  64. data/lib/carat/psyched_yaml.rb +26 -0
  65. data/lib/carat/remote_specification.rb +57 -0
  66. data/lib/carat/resolver.rb +334 -0
  67. data/lib/carat/retry.rb +60 -0
  68. data/lib/carat/ruby_dsl.rb +11 -0
  69. data/lib/carat/ruby_version.rb +117 -0
  70. data/lib/carat/rubygems_ext.rb +170 -0
  71. data/lib/carat/rubygems_integration.rb +619 -0
  72. data/lib/carat/runtime.rb +289 -0
  73. data/lib/carat/settings.rb +208 -0
  74. data/lib/carat/setup.rb +24 -0
  75. data/lib/carat/shared_helpers.rb +149 -0
  76. data/lib/carat/similarity_detector.rb +63 -0
  77. data/lib/carat/source.rb +46 -0
  78. data/lib/carat/source/git.rb +294 -0
  79. data/lib/carat/source/git/git_proxy.rb +162 -0
  80. data/lib/carat/source/path.rb +226 -0
  81. data/lib/carat/source/path/installer.rb +43 -0
  82. data/lib/carat/source/rubygems.rb +381 -0
  83. data/lib/carat/source_list.rb +101 -0
  84. data/lib/carat/spec_set.rb +154 -0
  85. data/lib/carat/ssl_certs/.document +1 -0
  86. data/lib/carat/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
  87. data/lib/carat/ssl_certs/AddTrustExternalCARoot.pem +32 -0
  88. data/lib/carat/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
  89. data/lib/carat/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
  90. data/lib/carat/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
  91. data/lib/carat/ssl_certs/GeoTrustGlobalCA.pem +20 -0
  92. data/lib/carat/ssl_certs/certificate_manager.rb +66 -0
  93. data/lib/carat/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem +21 -0
  94. data/lib/carat/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +23 -0
  95. data/lib/carat/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +25 -0
  96. data/lib/carat/templates/Executable +16 -0
  97. data/lib/carat/templates/Executable.standalone +12 -0
  98. data/lib/carat/templates/Gemfile +4 -0
  99. data/lib/carat/templates/newgem/.travis.yml.tt +3 -0
  100. data/lib/carat/templates/newgem/CODE_OF_CONDUCT.md.tt +13 -0
  101. data/lib/carat/templates/newgem/Gemfile.tt +4 -0
  102. data/lib/carat/templates/newgem/LICENSE.txt.tt +21 -0
  103. data/lib/carat/templates/newgem/README.md.tt +39 -0
  104. data/lib/carat/templates/newgem/Rakefile.tt +25 -0
  105. data/lib/carat/templates/newgem/bin/console.tt +14 -0
  106. data/lib/carat/templates/newgem/bin/setup.tt +7 -0
  107. data/lib/carat/templates/newgem/exe/newgem.tt +3 -0
  108. data/lib/carat/templates/newgem/ext/newgem/extconf.rb.tt +3 -0
  109. data/lib/carat/templates/newgem/ext/newgem/newgem.c.tt +9 -0
  110. data/lib/carat/templates/newgem/ext/newgem/newgem.h.tt +6 -0
  111. data/lib/carat/templates/newgem/gitignore.tt +16 -0
  112. data/lib/carat/templates/newgem/lib/newgem.rb.tt +12 -0
  113. data/lib/carat/templates/newgem/lib/newgem/version.rb.tt +7 -0
  114. data/lib/carat/templates/newgem/newgem.gemspec.tt +43 -0
  115. data/lib/carat/templates/newgem/rspec.tt +2 -0
  116. data/lib/carat/templates/newgem/spec/newgem_spec.rb.tt +11 -0
  117. data/lib/carat/templates/newgem/spec/spec_helper.rb.tt +2 -0
  118. data/lib/carat/templates/newgem/test/minitest_helper.rb.tt +4 -0
  119. data/lib/carat/templates/newgem/test/test_newgem.rb.tt +11 -0
  120. data/lib/carat/ui.rb +7 -0
  121. data/lib/carat/ui/rg_proxy.rb +21 -0
  122. data/lib/carat/ui/shell.rb +103 -0
  123. data/lib/carat/ui/silent.rb +44 -0
  124. data/lib/carat/vendor/molinillo/lib/molinillo.rb +5 -0
  125. data/lib/carat/vendor/molinillo/lib/molinillo/dependency_graph.rb +266 -0
  126. data/lib/carat/vendor/molinillo/lib/molinillo/errors.rb +69 -0
  127. data/lib/carat/vendor/molinillo/lib/molinillo/gem_metadata.rb +3 -0
  128. data/lib/carat/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +90 -0
  129. data/lib/carat/vendor/molinillo/lib/molinillo/modules/ui.rb +63 -0
  130. data/lib/carat/vendor/molinillo/lib/molinillo/resolution.rb +415 -0
  131. data/lib/carat/vendor/molinillo/lib/molinillo/resolver.rb +43 -0
  132. data/lib/carat/vendor/molinillo/lib/molinillo/state.rb +43 -0
  133. data/lib/carat/vendor/net/http/faster.rb +26 -0
  134. data/lib/carat/vendor/net/http/persistent.rb +1230 -0
  135. data/lib/carat/vendor/net/http/persistent/ssl_reuse.rb +128 -0
  136. data/lib/carat/vendor/thor/lib/thor.rb +484 -0
  137. data/lib/carat/vendor/thor/lib/thor/actions.rb +319 -0
  138. data/lib/carat/vendor/thor/lib/thor/actions/create_file.rb +103 -0
  139. data/lib/carat/vendor/thor/lib/thor/actions/create_link.rb +59 -0
  140. data/lib/carat/vendor/thor/lib/thor/actions/directory.rb +118 -0
  141. data/lib/carat/vendor/thor/lib/thor/actions/empty_directory.rb +135 -0
  142. data/lib/carat/vendor/thor/lib/thor/actions/file_manipulation.rb +316 -0
  143. data/lib/carat/vendor/thor/lib/thor/actions/inject_into_file.rb +107 -0
  144. data/lib/carat/vendor/thor/lib/thor/base.rb +656 -0
  145. data/lib/carat/vendor/thor/lib/thor/command.rb +133 -0
  146. data/lib/carat/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +77 -0
  147. data/lib/carat/vendor/thor/lib/thor/core_ext/io_binary_read.rb +10 -0
  148. data/lib/carat/vendor/thor/lib/thor/core_ext/ordered_hash.rb +98 -0
  149. data/lib/carat/vendor/thor/lib/thor/error.rb +32 -0
  150. data/lib/carat/vendor/thor/lib/thor/group.rb +281 -0
  151. data/lib/carat/vendor/thor/lib/thor/invocation.rb +178 -0
  152. data/lib/carat/vendor/thor/lib/thor/line_editor.rb +17 -0
  153. data/lib/carat/vendor/thor/lib/thor/line_editor/basic.rb +35 -0
  154. data/lib/carat/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
  155. data/lib/carat/vendor/thor/lib/thor/parser.rb +4 -0
  156. data/lib/carat/vendor/thor/lib/thor/parser/argument.rb +73 -0
  157. data/lib/carat/vendor/thor/lib/thor/parser/arguments.rb +175 -0
  158. data/lib/carat/vendor/thor/lib/thor/parser/option.rb +125 -0
  159. data/lib/carat/vendor/thor/lib/thor/parser/options.rb +218 -0
  160. data/lib/carat/vendor/thor/lib/thor/rake_compat.rb +71 -0
  161. data/lib/carat/vendor/thor/lib/thor/runner.rb +322 -0
  162. data/lib/carat/vendor/thor/lib/thor/shell.rb +81 -0
  163. data/lib/carat/vendor/thor/lib/thor/shell/basic.rb +421 -0
  164. data/lib/carat/vendor/thor/lib/thor/shell/color.rb +149 -0
  165. data/lib/carat/vendor/thor/lib/thor/shell/html.rb +126 -0
  166. data/lib/carat/vendor/thor/lib/thor/util.rb +267 -0
  167. data/lib/carat/vendor/thor/lib/thor/version.rb +3 -0
  168. data/lib/carat/vendored_fileutils.rb +9 -0
  169. data/lib/carat/vendored_molinillo.rb +2 -0
  170. data/lib/carat/vendored_persistent.rb +11 -0
  171. data/lib/carat/vendored_thor.rb +3 -0
  172. data/lib/carat/version.rb +6 -0
  173. data/lib/carat/vlad.rb +11 -0
  174. data/lib/carat/worker.rb +73 -0
  175. data/man/carat-config.ronn +178 -0
  176. data/man/carat-exec.ronn +136 -0
  177. data/man/carat-install.ronn +383 -0
  178. data/man/carat-package.ronn +66 -0
  179. data/man/carat-platform.ronn +42 -0
  180. data/man/carat-update.ronn +188 -0
  181. data/man/carat.ronn +98 -0
  182. data/man/gemfile.5.ronn +473 -0
  183. data/man/index.txt +7 -0
  184. metadata +321 -0
@@ -0,0 +1,40 @@
1
+ # Bundler Code of Conduct
2
+
3
+ The Bundler project strongly values contributors from anywhere, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. As a result, the Bundler team has agreed to and enforces this code of conduct in order to provide a harassment-free experience for everyone who participates in the development of Bundler.
4
+
5
+ ### Summary
6
+
7
+ Harassment in code and discussion or violation of physical boundaries is completely unacceptable anywhere in the Bundler project’s codebases, issue trackers, IRC channel, Campfire, mailing lists, meetups, and other events. Violators will be warned and then blocked or banned by the core team at or before the 3rd violation.
8
+
9
+ ### In detail
10
+
11
+ Harassment includes offensive verbal comments related to gender, sexual orientation, disability, physical appearance, body size, race, religion, sexual images, deliberate intimidation, stalking, sustained disruption, and unwelcome sexual attention.
12
+
13
+ Individuals asked to stop any harassing behavior are expected to comply immediately.
14
+
15
+ Maintainers, including the core team, are also subject to the anti-harassment policy.
16
+
17
+ If anyone engages in harassing behavior, including maintainers, we may take appropriate action, up to and including warning the offender, deletion of comments, removal from the project’s codebase and communication systems, and escalation to Github support.
18
+
19
+ If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact a member of [the core team](http://bundler.io/contributors.html) or [email the core team](mailto:team@bundler.io) immediately.
20
+
21
+ We expect everyone to follow these rules anywhere in the Bundler project’s codebases, issue trackers, IRC channel, group chat, and mailing lists.
22
+
23
+ Finally, don't forget that it is human to make mistakes! We all do. Let’s work together to help each other, resolve issues, and learn from the mistakes that we will all inevitably make from time to time.
24
+
25
+
26
+ ### Thanks
27
+
28
+ Thanks to the [JSConf Code of Conduct](http://jsconf.com/codeofconduct.html) and [Fedora Code of Conduct](http://fedoraproject.org/code-of-conduct) for inspiration and ideas. Additional thanks to [Contributor Covenant](http://contributor-covenant.org) for the [default code of conduct](https://github.com/bundler/bundler/blob/master/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt) included in generated gems.
29
+
30
+
31
+ ### License
32
+
33
+ <p class="license" xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
34
+ To the extent possible under law, <a rel="dct:publisher" href="http://bundler.io">The Bundler Team</a> has waived all copyright and related or neighboring rights to the <span property="dct:title">Bundler Code of Conduct</span>. This work is published from the <span property="vcard:Country" datatype="dct:ISO3166" content="US" about="http://bundler.io">United States.</span>
35
+ <br>
36
+ <br>
37
+ <a rel="license" href="http://creativecommons.org/publicdomain/zero/1.0/">
38
+ <img src="http://i.creativecommons.org/p/zero/1.0/88x31.png" style="border-style: none;" alt="CC0">
39
+ </a>
40
+ </p>
@@ -0,0 +1,23 @@
1
+ # Contributing
2
+
3
+ Carat welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](https://github.com/caratrb/carat/blob/master/CODE_OF_CONDUCT.md), so that everyone can be included.
4
+
5
+ If you'd like to help make Carat better, you totally rock! Here are some ways you can contribute:
6
+
7
+ - by using prerelease versions (run `gem install carat --pre`)
8
+ - by [reporting bugs you encounter](https://github.com/caratrb/carat/issues/new)
9
+ - by [suggesting new features](https://github.com/caratrb/carat/issues/new)
10
+ - by adding to or editing [Carat man pages](https://github.com/caratrb/carat/tree/master/man)
11
+ - by [checking issues for completeness](https://github.com/caratrb/carat/blob/master/DEVELOPMENT.md#bug-triage)
12
+ - by closing issues that are not complete
13
+ - by adding a failing test for reproducible [reported bugs](https://github.com/caratrb/carat/issues)
14
+ - by reviewing [pull requests](https://github.com/caratrb/carat/pulls) and suggesting improvements
15
+ - by [writing code](https://github.com/caratrb/carat/blob/master/DEVELOPMENT.md) (no patch is too small! fix typos or bad whitespace)
16
+
17
+ If you need help getting started, check out the [DEVELOPMENT](https://github.com/caratrb/carat/blob/master/DEVELOPMENT.md) file for steps that will get you up and running.
18
+
19
+ Thanks for helping us make Carat better.
20
+
21
+ # Troubleshooting
22
+
23
+ If you're having a problem, please see [ISSUES](https://github.com/caratrb/carat/blob/master/ISSUES.md) for troubleshooting steps and a guide for how to submit a ticket that will help us solve the problem you are having as quickly as possible.
@@ -0,0 +1,119 @@
1
+ Great to have you here! Here are a few ways you can help out with [Bundler](http://github.com/caratrb/carat).
2
+
3
+ # Where should I start?
4
+
5
+ You can start learning about Bundler by reading [the documentation](http://bundler.io). If you want, you can also read a (lengthy) explanation of [why Bundler exists and what it does](http://bundler.io/rationale.html). You can also check out discussions about Bundler on the [Bundler mailing list](https://groups.google.com/group/ruby-bundler) and in the [Bundler IRC channel](http://webchat.freenode.net/?channels=%23bundler), which is #bundler on Freenode. Please note that this project is released with a contributor [code of conduct](http://bundler.io/conduct.html). By participating in this project you agree to abide by its terms.
6
+
7
+ ## Your first commits
8
+
9
+ If you’re interested in contributing to Bundler, that’s awesome! We’d love your help.
10
+
11
+ If you have any questions after reading this page, please feel free to contact either [@indirect](http://github.com/indirect) or [@hone](http://github.com/hone). They are both happy to provide help working through your first bugfix or thinking through the problem you’re trying to resolve.
12
+
13
+ ## Tackle some small problems
14
+
15
+ We track [small
16
+ bugs](https://github.com/caratrb/carat/issues?labels=small&state=open) and [small features](https://github.com/bundler/bundler-features/issues?labels=small&state=open) so that anyone who wants to help can start with something that's not too overwhelming. If nothing on those lists looks good, though, just talk to us.
17
+
18
+
19
+ # Development setup
20
+
21
+ Bundler doesn't use a Gemfile to list development dependencies, because when we tried it we couldn't tell if we were awake or it was just another level of dreams. To work on Bundler, you'll probably want to do a couple of things.
22
+
23
+ 1. Install Bundler's development dependencies
24
+
25
+ $ rake spec:deps
26
+
27
+ 2. Run the test suite, to make sure things are working
28
+
29
+ $ rake spec
30
+
31
+ 3. Set up a shell alias to run Bundler from your clone, e.g. a Bash alias:
32
+
33
+ $ alias dbundle='ruby -I /path/to/bundler/lib /path/to/bundler/bin/bundle'
34
+
35
+ With that set up, you can test changes you've made to Bundler by running `dbundle`, without interfering with the regular `bundle` command.
36
+
37
+
38
+ # Bug triage
39
+
40
+ Triage is the work of processing tickets that have been opened into actionable issues, feature requests, or bug reports. That includes verifying bugs, categorizing the ticket, and ensuring there's enough information to reproduce the bug for anyone who wants to try to fix it.
41
+
42
+ We've created an [issues guide](https://github.com/caratrb/carat/blob/master/ISSUES.md) to walk Bundler users through the process of troubleshooting issues and reporting bugs.
43
+
44
+ If you'd like to help, awesome! You can [report a new bug](https://github.com/caratrb/carat/issues/new) or browse our [existing open tickets](https://github.com/caratrb/carat/issues).
45
+
46
+ Not every ticket will point to a bug in Bundler's code, but open tickets usually mean that there is something we could improve to help that user. Sometimes that means writing additional documentation, sometimes that means making error messages clearer, and sometimes that means explaining to a user that they need to install git to use git gems.
47
+
48
+ When you're looking at a ticket, here are the main questions to ask:
49
+
50
+ * Can I reproduce this bug myself?
51
+ * Are the steps to reproduce clearly stated in the ticket?
52
+ * Which versions of Bundler (1.1.x, 1.2.x, git, etc.) manifest this bug?
53
+ * Which operating systems (OS X, Windows, Ubuntu, CentOS, etc.) manifest this bug?
54
+ * Which rubies (MRI, JRuby, Rubinius, etc.) and which versions (1.8.7, 1.9.3, etc.) have this bug?
55
+
56
+ If you can't reproduce an issue, chances are good that the bug has been fixed (hurrah!). That's a good time to post to the ticket explaining what you did and how it worked.
57
+
58
+ If you can reproduce an issue, you're well on your way to fixing it. :) Fixing issues is similar to adding new features:
59
+
60
+ 1. Discuss the fix on the existing issue. Coordinating with everyone else saves duplicate work and serves as a great way to get suggestions and ideas if you need any.
61
+ 2. Base your commits on the correct branch. Bugfixes for 1.x versions of Bundler should be based on the matching 1-x-stable branch.
62
+ 3. Commit the code and at least one test covering your changes to a named branch in your fork.
63
+ 4. Put a line in the [CHANGELOG](https://github.com/caratrb/carat/blob/master/CHANGELOG.md) summarizing your changes under the next release under the “Bugfixes” heading.
64
+ 5. Send us a [pull request](https://help.github.com/articles/using-pull-requests) from your bugfix branch.
65
+
66
+ Finally, the ticket may be a duplicate of another older ticket. If you notice a ticket is a duplicate, simply comment on the ticket noting the original ticket’s number. For example, you could say “This is a duplicate of issue #42, and can be closed”.
67
+
68
+
69
+ # Adding new features
70
+
71
+ If you would like to add a new feature to Bundler, please follow these steps:
72
+
73
+ 1. [Create an issue](https://github.com/caratrb/carat-features/issues/new) in the bundler-features repo to discuss your feature.
74
+ 2. Base your commits on the master branch, since we follow [SemVer](http://semver.org) and don't add new features to old releases.
75
+ 3. Commit the code and at least one test covering your changes to a feature branch in your fork.
76
+ 4. Put a line in the [CHANGELOG](https://github.com/caratrb/carat/blob/master/CHANGELOG.md) summarizing your changes under the next release under the "Features" heading.
77
+ 5. Send us a [pull request](https://help.github.com/articles/using-pull-requests) from your feature branch.
78
+
79
+ If you don't hear back immediately, don’t get discouraged! We all have day jobs, but we respond to most tickets within a day or two.
80
+
81
+
82
+ # Beta testing
83
+
84
+ Early releases require heavy testing, especially across various system setups. We :heart: testers, and are big fans of anyone who can run `gem install bundler --pre` and try out upcoming releases in their development and staging environments.
85
+
86
+ There may not always be prereleases or beta versions of Bundler. That said, you are always welcome to try checking out master and building a gem yourself if you want to try out the latest changes.
87
+
88
+
89
+ # Translations
90
+
91
+ We don't currently have any translations, but please reach out to us if you would like to help get this going.
92
+
93
+
94
+ # Documentation
95
+
96
+ Code needs explanation, and sometimes those who know the code well have trouble explaining it to someone just getting into it. Because of that, we welcome documentation suggestions and patches from everyone, especially if they are brand new to using Bundler.
97
+
98
+ Bundler has two main sources of documentation: the built-in help (including usage information and man pages) and the [Bundler documentation site](http://bundler.io).
99
+
100
+ If you’d like to submit a patch to the man pages, follow the steps for adding a feature above. All of the man pages are located in the `man` directory. Just use the “Documentation” heading when you describe what you did in the changelog.
101
+
102
+ If you have a suggestion or proposed change for [bundler.io](http://bundler.io), please open an issue or send a pull request to the [bundler-site](https://github.com/bundler/bundler-site) repository.
103
+
104
+
105
+ # Community
106
+
107
+ Community is an important part of all we do. If you’d like to be part of the Bundler community, you can jump right in and start helping make Bundler better for everyone who uses it.
108
+
109
+ It would be tremendously helpful to have more people answering questions about Bundler (and often simply about Rubygems or Ruby itself) in our [issue tracker](https://github.com/caratrb/carat/issues) or on [Stack Overflow](http://stackoverflow.com/questions/tagged/bundler).
110
+
111
+ Additional documentation and explanation is always helpful, too. If you have any suggestions for the Bundler website [bundler.io](http://bundler.io), we would absolutely love it if you opened an issue or pull request on the [bundler-site](https://github.com/bundler/bundler-site) repository.
112
+
113
+ Finally, sharing your experiences and discoveries by writing them up is a valuable way to help others who have similar problems or experiences in the future. You can write a blog post, create an example and commit it to Github, take screenshots, or make videos.
114
+
115
+ Examples of how Bundler is used help everyone, and we’ve discovered that people already use it in ways that we never imagined when we were writing it. If you’re still not sure what to write about, there are also several projects doing interesting things based on Bundler. They could probably use publicity too.
116
+
117
+ If you let someone on the core team know you wrote about Bundler, we will add your post to the list of Bundler resources on the Github project wiki.
118
+
119
+ Finally, participate carefully in the all contributors to the Bundler project must agree to the contributor [code of conduct](http://bundler.io/conduct.html). By participating in this project you agree to abide by its terms.
@@ -0,0 +1,96 @@
1
+ # Bundler Issues
2
+
3
+ So! You're having problems with Bundler. This file is here to help. If you're running into an error, try reading the rest of this file for help. If you can't figure out how to solve your problem, there are also instructions on how to report a bug.
4
+
5
+ **Please use the [Bundler
6
+ Features](https://github.com/bundler/bundler-features) repo to suggest and
7
+ discuss features. The bundler issue tracker is only for bugs.**
8
+
9
+ ## Documentation
10
+
11
+ Instructions for common Bundler uses can be found on the [Bundler documentation site](http://bundler.io/).
12
+
13
+ Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://bundler.io/man/bundle.1.html).
14
+
15
+ ## Troubleshooting
16
+
17
+ ### Heroku errors
18
+
19
+ Please open a ticket with Heroku if you're having trouble deploying. They have a professional support team who can help you resolve Heroku issues far better than the Bundler team can. If the problem that you are having turns out to be a bug in Bundler itself, Heroku support can get the exact details to us.
20
+
21
+ ### Other problems
22
+
23
+ First, figure out exactly what it is that you're trying to do. Then, go to the [Bundler documentation website](http://bundler.io) and see if we have instructions on how to do that.
24
+
25
+ Second, check [the compatibility
26
+ list](http://bundler.io/compatibility.html), and make sure that the version of Bundler that you are
27
+ using works with the versions of Ruby and Rubygems that you are using.
28
+
29
+ If the instructions don't work, or you can't find any instructions, you can try these troubleshooting steps:
30
+
31
+ # remove user-specific gems and git repos
32
+ rm -rf ~/.carat/ ~/.gem/bundler/ ~/.gems/cache/bundler/
33
+
34
+ # remove system-wide git repos and git checkouts
35
+ rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
36
+
37
+ # remove project-specific settings
38
+ rm -rf .carat/
39
+
40
+ # remove project-specific cached gems and repos
41
+ rm -rf vendor/cache/
42
+
43
+ # remove the saved resolve of the Gemfile
44
+ rm -rf Gemfile.lock
45
+
46
+ # uninstall the rubygems-bundler and open_gem gems
47
+ rvm gemset use global # if using rvm
48
+ gem uninstall rubygems-bundler open_gem
49
+
50
+ # try to install one more time
51
+ bundle install
52
+
53
+ ## Reporting unresolved problems
54
+
55
+ Hopefully the troubleshooting steps above resolved your problem. If things still aren't working the way you expect them to, please let us know so that we can diagnose and hopefully fix the problem you're having.
56
+
57
+ **The best way to report a bug is by providing a reproduction script.** See these examples:
58
+
59
+ * [Git environment variables causing install to fail.](https://gist.github.com/xaviershay/6207550)
60
+ * [Multiple gems in a repository cannot be updated independently.](https://gist.github.com/xaviershay/6295889)
61
+
62
+ A half working script with comments for the parts you were unable to automate is still appreciated.
63
+
64
+ If you are unable to do that, please include the following information in your report:
65
+
66
+ - What you're trying to accomplish
67
+ - The command you ran
68
+ - What you expected to happen
69
+ - What actually happened
70
+ - The exception backtrace(s), if any
71
+ - Everything output by running `bundle env`
72
+
73
+ If your version of Bundler does not have the `bundle env` command, then please include:
74
+
75
+ - Your Gemfile
76
+ - Your Gemfile.lock
77
+ - Your Bundler configuration settings (run `bundle config`)
78
+ - What version of bundler you are using (run `bundle -v`)
79
+ - What version of Ruby you are using (run `ruby -v`)
80
+ - What version of Rubygems you are using (run `gem -v`)
81
+ - Whether you are using RVM, and if so what version (run `rvm -v`)
82
+ - Whether you have the `rubygems-bundler` gem, which can break gem executables (run `gem list rubygems-bundler`)
83
+ - Whether you have the `open_gem` gem, which can cause rake activation conflicts (run `gem list open_gem`)
84
+
85
+ If you are using Rails 2.3, please also include:
86
+
87
+ - Your boot.rb file
88
+ - Your preinitializer.rb file
89
+ - Your environment.rb file
90
+
91
+
92
+ If you have either `rubygems-bundler` or `open_gem` installed, please try removing them and then following the troubleshooting steps above before opening a new ticket.
93
+
94
+ [Create a gist](https://gist.github.com) containing all of that information, then visit the [Bundler issue tracker](https://github.com/caratrb/carat/issues) and [create a ticket](https://github.com/caratrb/carat/issues/new) describing your problem and linking to your gist.
95
+
96
+ Thanks for reporting issues and helping make Bundler better!
@@ -0,0 +1,23 @@
1
+ Portions copyright (c) 2010 Andre Arko
2
+ Portions copyright (c) 2009 Engine Yard
3
+
4
+ MIT License
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ "Software"), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,32 @@
1
+ [![Version ](https://img.shields.io/gem/v/carat.svg?style=flat)](https://rubygems.org/gems/carat)
2
+ [![Build Status](https://img.shields.io/travis/caratrb/carat/master.svg?style=flat)](https://travis-ci.org/caratrb/carat)
3
+ [![Code Climate](https://img.shields.io/codeclimate/github/caratrb/carat.svg?style=flat)](https://codeclimate.com/github/caratrb/carat)
4
+ [![Inline docs ](http://inch-ci.org/github/caratrb/carat.svg?style=flat)](http://inch-ci.org/github/caratrb/carat)
5
+
6
+ # Carat: a gem to bundle gems
7
+
8
+ Carat makes sure Ruby applications run the same code on every machine.
9
+
10
+ It does this by managing the gems that the application depends on. Given a list of gems, it can automatically download and install those gems, as well as any other gems needed by the gems that are listed. Before installing gems, it checks the versions of every gem to make sure that they are compatible, and can all be loaded at the same time. After the gems have been installed, Carat can help you update some or all of them when new versions become available. Finally, it records the exact versions that have been installed, so that others can install the exact same gems.
11
+
12
+ ### Installation and usage
13
+
14
+ ```
15
+ gem install carat
16
+ carat init
17
+ echo "gem 'rails'" >> Gemfile
18
+ carat install
19
+ carat exec rails new myapp
20
+ ```
21
+
22
+ ### Troubleshooting
23
+
24
+ For help with common problems, see [ISSUES](https://github.com/caratrb/carat/blob/master/ISSUES.md).
25
+
26
+ ### Other questions
27
+
28
+ To see what has changed in recent versions of Carat, see the [CHANGELOG](https://github.com/caratrb/carat/blob/master/CHANGELOG.md).
29
+
30
+ ### Contributing
31
+
32
+ If you'd like to contribute to Carat, that's awesome, and we <3 you. There's a guide to contributing to Carat (both code and general help) over in [DEVELOPMENT](https://github.com/caratrb/carat/blob/master/DEVELOPMENT.md)
@@ -0,0 +1,308 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.unshift File.expand_path("../lib", __FILE__)
3
+ require 'shellwords'
4
+ require 'benchmark'
5
+
6
+ RUBYGEMS_REPO = File.expand_path("tmp/rubygems")
7
+ CARAT_SPEC = Gem::Specification.load("carat.gemspec")
8
+
9
+ def safe_task(&block)
10
+ yield
11
+ true
12
+ rescue
13
+ false
14
+ end
15
+
16
+ # Benchmark task execution
17
+ module Rake
18
+ class Task
19
+ alias_method :real_invoke, :invoke
20
+
21
+ def invoke(*args)
22
+ time = Benchmark.measure(@name) do
23
+ real_invoke(*args)
24
+ end
25
+ puts "#{@name} ran for #{time}"
26
+ end
27
+ end
28
+ end
29
+
30
+ def clean_files(files, regex, replacement = '')
31
+ files.each do |file|
32
+ contents = File.read(file)
33
+ contents.gsub!(regex, replacement)
34
+ File.open(file, 'w') { |f| f << contents }
35
+ end
36
+ end
37
+
38
+ namespace :molinillo do
39
+ task :namespace do
40
+ files = Dir.glob('lib/carat/vendor/molinillo*/**/*.rb')
41
+ clean_files(files, 'Molinillo', 'Carat::Molinillo')
42
+ clean_files(files, /require (["'])molinillo/, 'require \1carat/vendor/molinillo/lib/molinillo')
43
+ end
44
+
45
+ task :clean do
46
+ files = Dir.glob('lib/carat/vendor/molinillo*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
47
+ rm_r files
48
+ end
49
+
50
+ task :update, [:tag] => [] do |t, args|
51
+ tag = args[:tag]
52
+ Dir.chdir 'lib/carat/vendor' do
53
+ rm_rf 'molinillo'
54
+ sh "curl -L https://github.com/CocoaPods/molinillo/archive/#{tag}.tar.gz | tar -xz"
55
+ sh "mv Molinillo-* molinillo"
56
+ end
57
+ Rake::Task['molinillo:namespace'].invoke
58
+ Rake::Task['molinillo:clean'].invoke
59
+ end
60
+ end
61
+
62
+ namespace :thor do
63
+ task :namespace do
64
+ files = Dir.glob('lib/carat/vendor/thor*/**/*.rb')
65
+ clean_files(files, 'Thor', 'Carat::Thor')
66
+ clean_files(files, /require (["'])thor/, 'require \1carat/vendor/thor/lib/thor')
67
+ clean_files(files, /(autoload\s+[:\w]+,\s+["'])(thor[\w\/]+["'])/, '\1carat/vendor/thor/lib/\2')
68
+ end
69
+
70
+ task :clean do
71
+ files = Dir.glob('lib/carat/vendor/thor*/*', File::FNM_DOTMATCH).reject { |f| %(. .. lib).include? f.split('/').last }
72
+ rm_r files
73
+ end
74
+
75
+ task :update, [:tag] => [] do |t, args|
76
+ tag = args[:tag]
77
+ Dir.chdir 'lib/carat/vendor' do
78
+ rm_rf 'thor'
79
+ sh "curl -L https://github.com/erikhuda/thor/archive/#{tag}.tar.gz | tar -xz"
80
+ sh "mv thor-* thor"
81
+ end
82
+ Rake::Task['thor:namespace'].invoke
83
+ Rake::Task['thor:clean'].invoke
84
+ end
85
+ end
86
+
87
+ namespace :spec do
88
+ desc "Ensure spec dependencies are installed"
89
+ task :deps do
90
+ deps = Hash[CARAT_SPEC.development_dependencies.map do |d|
91
+ [d.name, d.requirement.to_s]
92
+ end]
93
+
94
+ # JRuby can't build ronn or rdiscount, so we skip that
95
+ if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
96
+ deps.delete("ronn")
97
+ deps.delete("rdiscount")
98
+ end
99
+
100
+ deps.sort_by{|name, _| name }.each do |name, version|
101
+ sh "#{Gem.ruby} -S gem list -i '^#{name}$' -v '#{version}' || " \
102
+ "#{Gem.ruby} -S gem install #{name} -v '#{version}' --no-ri --no-rdoc"
103
+ end
104
+
105
+ # Download and install gems used inside tests
106
+ $LOAD_PATH.unshift("./spec")
107
+ require 'support/rubygems_ext'
108
+ Spec::Rubygems.setup
109
+ end
110
+
111
+ namespace :travis do
112
+ task :deps do
113
+ # Give the travis user a name so that git won't fatally error
114
+ system "sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd"
115
+ # Strip secure_path so that RVM paths transmit through sudo -E
116
+ system "sudo sed -i '/secure_path/d' /etc/sudoers"
117
+ # Install groff for the ronn gem
118
+ sh "sudo apt-get install groff-base -y"
119
+ sh "gem update --system 2.6.13"
120
+ # Install the other gem deps, etc.
121
+ Rake::Task["spec:deps"].invoke
122
+ end
123
+ end
124
+ end
125
+
126
+ begin
127
+ rspec = CARAT_SPEC.development_dependencies.find{|d| d.name == "rspec" }
128
+ gem 'rspec', rspec.requirement.to_s
129
+ require 'rspec/core/rake_task'
130
+
131
+ desc "Run specs"
132
+ RSpec::Core::RakeTask.new
133
+ task :spec => "man:build"
134
+
135
+ namespace :spec do
136
+ task :clean do
137
+ rm_rf 'tmp'
138
+ end
139
+
140
+ desc "Run the real-world spec suite (requires internet)"
141
+ task :realworld => ["set_realworld", "spec"]
142
+
143
+ task :set_realworld do
144
+ ENV['CARAT_REALWORLD_TESTS'] = '1'
145
+ end
146
+
147
+ desc "Run the spec suite with the sudo tests"
148
+ task :sudo => ["set_sudo", "spec", "clean_sudo"]
149
+
150
+ task :set_sudo do
151
+ ENV['CARAT_SUDO_TESTS'] = '1'
152
+ end
153
+
154
+ task :clean_sudo do
155
+ puts "Cleaning up sudo test files..."
156
+ system "sudo rm -rf #{File.expand_path('../tmp/sudo_gem_home', __FILE__)}"
157
+ end
158
+
159
+ # Rubygems specs by version
160
+ namespace :rubygems do
161
+ rubyopt = ENV["RUBYOPT"]
162
+ # When editing this list, also edit .travis.yml!
163
+ branches = %w(master)
164
+ releases = %w(v2.7.2)
165
+ (branches + releases).each do |rg|
166
+ desc "Run specs with Rubygems #{rg}"
167
+ RSpec::Core::RakeTask.new(rg) do |t|
168
+ t.rspec_opts = %w(--format documentation --color)
169
+ t.ruby_opts = %w(-w)
170
+ end
171
+
172
+ # Create tasks like spec:rubygems:v1.8.3:sudo to run the sudo specs
173
+ namespace rg do
174
+ task :sudo => ["set_sudo", rg, "clean_sudo"]
175
+ task :realworld => ["set_realworld", rg]
176
+ end
177
+
178
+ task "clone_rubygems_#{rg}" do
179
+ unless File.directory?(RUBYGEMS_REPO)
180
+ system("git clone https://github.com/rubygems/rubygems.git tmp/rubygems")
181
+ end
182
+ hash = nil
183
+
184
+ Dir.chdir(RUBYGEMS_REPO) do
185
+ system("git remote update")
186
+ if rg == "master"
187
+ system("git checkout origin/master")
188
+ else
189
+ system("git checkout #{rg}") || raise("Unknown Rubygems ref #{rg}")
190
+ end
191
+ hash = `git rev-parse HEAD`.chomp
192
+ end
193
+
194
+ puts "Checked out rubygems '#{rg}' at #{hash}"
195
+ ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
196
+ puts "RUBYOPT=#{ENV['RUBYOPT']}"
197
+ end
198
+
199
+ task rg => ["man:build", "clone_rubygems_#{rg}"]
200
+ task "rubygems:all" => rg
201
+ end
202
+
203
+ desc "Run specs under a Rubygems checkout (set RG=path)"
204
+ RSpec::Core::RakeTask.new("co") do |t|
205
+ t.rspec_opts = %w(--format documentation --color)
206
+ t.ruby_opts = %w(-w)
207
+ end
208
+
209
+ task "setup_co" do
210
+ rg = File.expand_path ENV['RG']
211
+ puts "Running specs against Rubygems in #{rg}..."
212
+ ENV["RUBYOPT"] = "-I#{rg} #{rubyopt}"
213
+ end
214
+
215
+ task "co" => "setup_co"
216
+ task "rubygems:all" => "co"
217
+ end
218
+
219
+ desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
220
+ task :travis do
221
+ rg = ENV['RGV'] || raise("Rubygems version is required on Travis!")
222
+
223
+ puts "\n\e[1;33m[Travis CI] Running carat specs against rubygems #{rg}\e[m\n\n"
224
+ specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
225
+
226
+ Rake::Task["spec:rubygems:#{rg}"].reenable
227
+
228
+ puts "\n\e[1;33m[Travis CI] Running carat sudo specs against rubygems #{rg}\e[m\n\n"
229
+ sudos = system("sudo -E rake spec:rubygems:#{rg}:sudo")
230
+ # clean up by chowning the newly root-owned tmp directory back to the travis user
231
+ system("sudo chown -R #{ENV['USER']} #{File.join(File.dirname(__FILE__), 'tmp')}")
232
+
233
+ Rake::Task["spec:rubygems:#{rg}"].reenable
234
+
235
+ puts "\n\e[1;33m[Travis CI] Running carat real world specs against rubygems #{rg}\e[m\n\n"
236
+ realworld = safe_task { Rake::Task["spec:rubygems:#{rg}:realworld"].invoke }
237
+
238
+ {"specs" => specs, "sudo" => sudos, "realworld" => realworld}.each do |name, passed|
239
+ if passed
240
+ puts "\e[0;32m[Travis CI] #{name} passed\e[m"
241
+ else
242
+ puts "\e[0;31m[Travis CI] #{name} failed\e[m"
243
+ end
244
+ end
245
+
246
+ unless specs && sudos && realworld
247
+ fail "Spec run failed, please review the log for more information"
248
+ end
249
+ end
250
+ end
251
+
252
+ rescue LoadError
253
+ task :spec do
254
+ abort "Run `rake spec:deps` to be able to run the specs"
255
+ end
256
+ end
257
+
258
+ begin
259
+ require 'ronn'
260
+
261
+ namespace :man do
262
+ directory "lib/carat/man"
263
+
264
+ Dir["man/*.ronn"].each do |ronn|
265
+ basename = File.basename(ronn, ".ronn")
266
+ roff = "lib/carat/man/#{basename}"
267
+
268
+ file roff => ["lib/carat/man", ronn] do
269
+ sh "#{Gem.ruby} -S ronn --roff --pipe #{ronn} > #{roff}"
270
+ end
271
+
272
+ file "#{roff}.txt" => roff do
273
+ sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
274
+ end
275
+
276
+ task :build_all_pages => "#{roff}.txt"
277
+ end
278
+
279
+ desc "Build the man pages"
280
+ task :build => "man:build_all_pages"
281
+
282
+ desc "Clean up from the built man pages"
283
+ task :clean do
284
+ rm_rf "lib/carat/man"
285
+ end
286
+
287
+ task(:require) { }
288
+ end
289
+
290
+ rescue LoadError
291
+ namespace :man do
292
+ task(:require) { abort "Install the ronn gem to be able to release!" }
293
+ task(:build) { warn "Install the ronn gem to build the help pages" }
294
+ task(:clean) { }
295
+ end
296
+ end
297
+
298
+ desc "Update vendored SSL certs to match the certs vendored by Rubygems"
299
+ task :update_certs => "spec:rubygems:clone_rubygems_master" do
300
+ require 'carat/ssl_certs/certificate_manager'
301
+ Carat::SSLCerts::CertificateManager.update_from!(RUBYGEMS_REPO)
302
+ end
303
+
304
+ require 'carat/gem_tasks'
305
+ task :build => ["man:clean", "man:build"]
306
+ task :release => ["man:require", "man:clean", "man:build"]
307
+
308
+ task :default => :spec