shopify-bundler 1.10.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.rspec +3 -0
- data/.rubocop.yml +96 -0
- data/.rubocop_todo.yml +177 -0
- data/.travis.yml +104 -0
- data/CHANGELOG.md +2131 -0
- data/CODE_OF_CONDUCT.md +42 -0
- data/CONTRIBUTING.md +32 -0
- data/DEVELOPMENT.md +118 -0
- data/ISSUES.md +96 -0
- data/LICENSE.md +23 -0
- data/README.md +40 -0
- data/Rakefile +309 -0
- data/bin/rake +14 -0
- data/bin/rspec +10 -0
- data/bin/rubocop +11 -0
- data/bundler.gemspec +34 -0
- data/exe/bundle +21 -0
- data/exe/bundle_ruby +60 -0
- data/exe/bundler +21 -0
- data/lib/bundler.rb +499 -0
- data/lib/bundler/capistrano.rb +16 -0
- data/lib/bundler/cli.rb +435 -0
- data/lib/bundler/cli/binstubs.rb +37 -0
- data/lib/bundler/cli/cache.rb +34 -0
- data/lib/bundler/cli/check.rb +37 -0
- data/lib/bundler/cli/clean.rb +25 -0
- data/lib/bundler/cli/common.rb +56 -0
- data/lib/bundler/cli/config.rb +88 -0
- data/lib/bundler/cli/console.rb +37 -0
- data/lib/bundler/cli/exec.rb +51 -0
- data/lib/bundler/cli/gem.rb +208 -0
- data/lib/bundler/cli/init.rb +32 -0
- data/lib/bundler/cli/inject.rb +32 -0
- data/lib/bundler/cli/install.rb +188 -0
- data/lib/bundler/cli/lock.rb +35 -0
- data/lib/bundler/cli/open.rb +22 -0
- data/lib/bundler/cli/outdated.rb +86 -0
- data/lib/bundler/cli/package.rb +45 -0
- data/lib/bundler/cli/platform.rb +42 -0
- data/lib/bundler/cli/show.rb +74 -0
- data/lib/bundler/cli/update.rb +72 -0
- data/lib/bundler/cli/viz.rb +26 -0
- data/lib/bundler/constants.rb +5 -0
- data/lib/bundler/current_ruby.rb +218 -0
- data/lib/bundler/definition.rb +675 -0
- data/lib/bundler/dep_proxy.rb +45 -0
- data/lib/bundler/dependency.rb +119 -0
- data/lib/bundler/deployment.rb +62 -0
- data/lib/bundler/deprecate.rb +17 -0
- data/lib/bundler/dsl.rb +478 -0
- data/lib/bundler/endpoint_specification.rb +100 -0
- data/lib/bundler/env.rb +82 -0
- data/lib/bundler/environment.rb +41 -0
- data/lib/bundler/fetcher.rb +288 -0
- data/lib/bundler/fetcher/base.rb +26 -0
- data/lib/bundler/fetcher/dependency.rb +88 -0
- data/lib/bundler/fetcher/downloader.rb +60 -0
- data/lib/bundler/fetcher/index.rb +32 -0
- data/lib/bundler/friendly_errors.rb +92 -0
- data/lib/bundler/gem_helper.rb +191 -0
- data/lib/bundler/gem_helpers.rb +26 -0
- data/lib/bundler/gem_installer.rb +9 -0
- data/lib/bundler/gem_path_manipulation.rb +8 -0
- data/lib/bundler/gem_tasks.rb +5 -0
- data/lib/bundler/graph.rb +173 -0
- data/lib/bundler/index.rb +199 -0
- data/lib/bundler/injector.rb +62 -0
- data/lib/bundler/inline.rb +58 -0
- data/lib/bundler/installer.rb +242 -0
- data/lib/bundler/installer/parallel_installer.rb +122 -0
- data/lib/bundler/installer/standalone.rb +48 -0
- data/lib/bundler/lazy_specification.rb +82 -0
- data/lib/bundler/lockfile_parser.rb +199 -0
- data/lib/bundler/match_platform.rb +13 -0
- data/lib/bundler/psyched_yaml.rb +26 -0
- data/lib/bundler/remote_specification.rb +82 -0
- data/lib/bundler/resolver.rb +350 -0
- data/lib/bundler/retry.rb +60 -0
- data/lib/bundler/ruby_dsl.rb +11 -0
- data/lib/bundler/ruby_version.rb +116 -0
- data/lib/bundler/rubygems_ext.rb +175 -0
- data/lib/bundler/rubygems_integration.rb +674 -0
- data/lib/bundler/runtime.rb +285 -0
- data/lib/bundler/settings.rb +263 -0
- data/lib/bundler/setup.rb +26 -0
- data/lib/bundler/shared_helpers.rb +176 -0
- data/lib/bundler/similarity_detector.rb +61 -0
- data/lib/bundler/source.rb +35 -0
- data/lib/bundler/source/git.rb +286 -0
- data/lib/bundler/source/git/git_proxy.rb +190 -0
- data/lib/bundler/source/path.rb +224 -0
- data/lib/bundler/source/path/installer.rb +43 -0
- data/lib/bundler/source/rubygems.rb +436 -0
- data/lib/bundler/source/rubygems/remote.rb +38 -0
- data/lib/bundler/source_list.rb +101 -0
- data/lib/bundler/spec_set.rb +156 -0
- data/lib/bundler/ssl_certs/.document +1 -0
- data/lib/bundler/ssl_certs/AddTrustExternalCARoot-2048.pem +25 -0
- data/lib/bundler/ssl_certs/AddTrustExternalCARoot.pem +32 -0
- data/lib/bundler/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem +14 -0
- data/lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem +23 -0
- data/lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem +28 -0
- data/lib/bundler/ssl_certs/GeoTrustGlobalCA.pem +20 -0
- data/lib/bundler/ssl_certs/certificate_manager.rb +64 -0
- data/lib/bundler/stub_specification.rb +23 -0
- data/lib/bundler/templates/Executable +16 -0
- data/lib/bundler/templates/Executable.standalone +12 -0
- data/lib/bundler/templates/Gemfile +4 -0
- data/lib/bundler/templates/newgem/.travis.yml.tt +4 -0
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +22 -0
- data/lib/bundler/templates/newgem/Gemfile.tt +4 -0
- data/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
- data/lib/bundler/templates/newgem/README.md.tt +41 -0
- data/lib/bundler/templates/newgem/Rakefile.tt +29 -0
- data/lib/bundler/templates/newgem/bin/console.tt +14 -0
- data/lib/bundler/templates/newgem/bin/setup.tt +8 -0
- data/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +3 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
- data/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
- data/lib/bundler/templates/newgem/gitignore.tt +16 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +12 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +43 -0
- data/lib/bundler/templates/newgem/rspec.tt +2 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +11 -0
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -0
- data/lib/bundler/templates/newgem/test/newgem_test.rb.tt +11 -0
- data/lib/bundler/templates/newgem/test/test_helper.rb.tt +4 -0
- data/lib/bundler/ui.rb +7 -0
- data/lib/bundler/ui/rg_proxy.rb +17 -0
- data/lib/bundler/ui/shell.rb +108 -0
- data/lib/bundler/ui/silent.rb +44 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +5 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +277 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +69 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +3 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +99 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +63 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +434 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +43 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +51 -0
- data/lib/bundler/vendor/net/http/faster.rb +26 -0
- data/lib/bundler/vendor/net/http/persistent.rb +1230 -0
- data/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb +128 -0
- data/lib/bundler/vendor/thor/lib/thor.rb +484 -0
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +319 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +103 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +59 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +118 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +135 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +316 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +107 -0
- data/lib/bundler/vendor/thor/lib/thor/base.rb +656 -0
- data/lib/bundler/vendor/thor/lib/thor/command.rb +133 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +77 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +10 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +98 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +32 -0
- data/lib/bundler/vendor/thor/lib/thor/group.rb +281 -0
- data/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +35 -0
- data/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- data/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +73 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +175 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +125 -0
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +218 -0
- data/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +71 -0
- data/lib/bundler/vendor/thor/lib/thor/runner.rb +322 -0
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +421 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +149 -0
- data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +126 -0
- data/lib/bundler/vendor/thor/lib/thor/util.rb +267 -0
- data/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
- data/lib/bundler/vendored_molinillo.rb +2 -0
- data/lib/bundler/vendored_persistent.rb +11 -0
- data/lib/bundler/vendored_thor.rb +3 -0
- data/lib/bundler/version.rb +6 -0
- data/lib/bundler/vlad.rb +11 -0
- data/lib/bundler/worker.rb +72 -0
- data/man/bundle-config.ronn +187 -0
- data/man/bundle-exec.ronn +136 -0
- data/man/bundle-gem.ronn +77 -0
- data/man/bundle-install.ronn +398 -0
- data/man/bundle-package.ronn +66 -0
- data/man/bundle-platform.ronn +42 -0
- data/man/bundle-update.ronn +188 -0
- data/man/bundle.ronn +98 -0
- data/man/gemfile.5.ronn +495 -0
- data/man/index.txt +8 -0
- metadata +346 -0
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Bundler Code of Conduct
|
2
|
+
|
3
|
+
The Bundler project strongly values contributors from anywhere, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, ethnicity, age, religion, or nationality. 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, chat rooms, mailing lists, meetups, and any 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 level of experience, gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, ethnicity, age, religion, nationality, the use of sexualized language or imagery, 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 abusive, harassing, or otherwise unacceptable 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
|
+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
|
24
|
+
|
25
|
+
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.
|
26
|
+
|
27
|
+
|
28
|
+
### Thanks
|
29
|
+
|
30
|
+
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.
|
31
|
+
|
32
|
+
|
33
|
+
### License
|
34
|
+
|
35
|
+
<p class="license" xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
|
36
|
+
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>
|
37
|
+
<br>
|
38
|
+
<br>
|
39
|
+
<a rel="license" href="http://creativecommons.org/publicdomain/zero/1.0/">
|
40
|
+
<img src="http://i.creativecommons.org/p/zero/1.0/88x31.png" style="border-style: none;" alt="CC0">
|
41
|
+
</a>
|
42
|
+
</p>
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
Bundler welcomes contributions from *everyone*. While contributing, please follow the project [code of conduct](http://bundler.io/conduct.html), so that everyone can be included.
|
4
|
+
|
5
|
+
If you'd like to help make Bundler better, you totally rock! Here are some ways you can contribute:
|
6
|
+
|
7
|
+
- by using prerelease versions (run `gem install bundler --pre`)
|
8
|
+
- by [reporting bugs you encounter](https://github.com/bundler/bundler/issues/new)
|
9
|
+
- by [suggesting new features](https://github.com/bundler/bundler-features/issues/new)
|
10
|
+
- by adding to or editing [the Bundler documentation website](http://bundler.io) and [Bundler man pages](http://bundler.io/man/bundle.1.html)
|
11
|
+
- by [checking issues for completeness](https://github.com/bundler/bundler/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/bundler/bundler/issues)
|
14
|
+
- by reviewing [pull requests](https://github.com/bundler/bundler/pulls) and suggesting improvements
|
15
|
+
- by improving existing code, including [suggestions from PullReview](https://www.pullreview.com/github/bundler/bundler/reviews/master)
|
16
|
+
- by [writing code](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md) (no patch is too small! fix typos or bad whitespace)
|
17
|
+
|
18
|
+
If you need help getting started, check out the [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md) file for steps that will get you up and running.
|
19
|
+
|
20
|
+
Thanks for helping us make Bundler better.
|
21
|
+
|
22
|
+
# Troubleshooting
|
23
|
+
|
24
|
+
If you're having a problem, please see [ISSUES](https://github.com/bundler/bundler/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.
|
25
|
+
|
26
|
+
# Requesting Features
|
27
|
+
|
28
|
+
Head on over to the [Bundler features](https://github.com/bundler/bundler-features) project, or any of the lists or channels listed below. Feature-wise we consider Bundler stable, so the core team does not tend to work on feature suggestions. Pull requests welcome though!
|
29
|
+
|
30
|
+
# Discussing Bundler
|
31
|
+
|
32
|
+
If you'd like to discuss features, ask questions, or just engage in general Bundler-focused discussion, please see the [#bundler](irc://irc.freenode.net/#bundler) IRC channel on Freenode, and the [Bundler mailing list](http://groups.google.com/group/ruby-bundler) on Google Groups.
|
data/DEVELOPMENT.md
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
Great to have you here! Here are a few ways you can help out with [Bundler](http://github.com/bundler/bundler).
|
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
|
+
## How you can help
|
14
|
+
|
15
|
+
We track [small
|
16
|
+
bugs](https://github.com/bundler/bundler/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. We also keep a [list of things anyone can help with, any time](https://github.com/bundler/bundler/blob/master/CONTRIBUTING.md#contributing). If nothing on those lists looks good, talk to us, and we'll figure out what you can help with. We can absolutely use your help, no matter what level of programming skill you have at the moment.
|
17
|
+
|
18
|
+
# Development setup
|
19
|
+
|
20
|
+
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.
|
21
|
+
|
22
|
+
1. Install Bundler's development dependencies
|
23
|
+
|
24
|
+
$ rake spec:deps
|
25
|
+
|
26
|
+
2. Run the test suite, to make sure things are working
|
27
|
+
|
28
|
+
$ rake spec
|
29
|
+
|
30
|
+
3. Set up a shell alias to run Bundler from your clone, e.g. a Bash alias:
|
31
|
+
|
32
|
+
$ alias dbundle='ruby -I /path/to/bundler/lib /path/to/bundler/exe/bundle'
|
33
|
+
|
34
|
+
With that set up, you can test changes you've made to Bundler by running `dbundle`, without interfering with the regular `bundle` command.
|
35
|
+
|
36
|
+
|
37
|
+
# Bug triage
|
38
|
+
|
39
|
+
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.
|
40
|
+
|
41
|
+
We've created an [issues guide](https://github.com/bundler/bundler/blob/master/ISSUES.md) to walk Bundler users through the process of troubleshooting issues and reporting bugs.
|
42
|
+
|
43
|
+
If you'd like to help, awesome! You can [report a new bug](https://github.com/bundler/bundler/issues/new) or browse our [existing open tickets](https://github.com/bundler/bundler/issues).
|
44
|
+
|
45
|
+
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.
|
46
|
+
|
47
|
+
When you're looking at a ticket, here are the main questions to ask:
|
48
|
+
|
49
|
+
* Can I reproduce this bug myself?
|
50
|
+
* Are the steps to reproduce clearly stated in the ticket?
|
51
|
+
* Which versions of Bundler (1.1.x, 1.2.x, git, etc.) manifest this bug?
|
52
|
+
* Which operating systems (OS X, Windows, Ubuntu, CentOS, etc.) manifest this bug?
|
53
|
+
* Which rubies (MRI, JRuby, Rubinius, etc.) and which versions (1.8.7, 1.9.3, etc.) have this bug?
|
54
|
+
|
55
|
+
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.
|
56
|
+
|
57
|
+
If you can reproduce an issue, you're well on your way to fixing it. :) Fixing issues is similar to adding new features:
|
58
|
+
|
59
|
+
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.
|
60
|
+
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.
|
61
|
+
3. Commit the code and at least one test covering your changes to a named branch in your fork.
|
62
|
+
4. Put a line in the [CHANGELOG](https://github.com/bundler/bundler/blob/master/CHANGELOG.md) summarizing your changes under the next release under the “Bugfixes” heading.
|
63
|
+
5. Send us a [pull request](https://help.github.com/articles/using-pull-requests) from your bugfix branch.
|
64
|
+
|
65
|
+
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”.
|
66
|
+
|
67
|
+
|
68
|
+
# Adding new features
|
69
|
+
|
70
|
+
If you would like to add a new feature to Bundler, please follow these steps:
|
71
|
+
|
72
|
+
1. [Create an issue](https://github.com/bundler/bundler-features/issues/new) in the bundler-features repo to discuss your feature.
|
73
|
+
2. Base your commits on the master branch, since we follow [SemVer](http://semver.org) and don't add new features to old releases.
|
74
|
+
3. Commit the code and at least one test covering your changes to a feature branch in your fork.
|
75
|
+
4. Put a line in the [CHANGELOG](https://github.com/bundler/bundler/blob/master/CHANGELOG.md) summarizing your changes under the next release under the "Features" heading.
|
76
|
+
5. Send us a [pull request](https://help.github.com/articles/using-pull-requests) from your feature branch.
|
77
|
+
|
78
|
+
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.
|
79
|
+
|
80
|
+
|
81
|
+
# Beta testing
|
82
|
+
|
83
|
+
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.
|
84
|
+
|
85
|
+
There may not always be prereleases or beta versions of Bundler. The Bundler team will tweet from the [@bundlerio account](http://twitter.com/bundlerio) when a prerelease or beta version becomes available. You are also always welcome to try checking out master and building a gem yourself if you want to try out the latest changes.
|
86
|
+
|
87
|
+
|
88
|
+
# Translations
|
89
|
+
|
90
|
+
We don't currently have any translations, but please reach out to us if you would like to help get this going.
|
91
|
+
|
92
|
+
|
93
|
+
# Documentation
|
94
|
+
|
95
|
+
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.
|
96
|
+
|
97
|
+
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).
|
98
|
+
|
99
|
+
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.
|
100
|
+
|
101
|
+
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.
|
102
|
+
|
103
|
+
|
104
|
+
# Community
|
105
|
+
|
106
|
+
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.
|
107
|
+
|
108
|
+
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/bundler/bundler/issues) or on [Stack Overflow](http://stackoverflow.com/questions/tagged/bundler).
|
109
|
+
|
110
|
+
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.
|
111
|
+
|
112
|
+
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.
|
113
|
+
|
114
|
+
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.
|
115
|
+
|
116
|
+
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.
|
117
|
+
|
118
|
+
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.
|
data/ISSUES.md
ADDED
@@ -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 ~/.bundle/ ~/.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 .bundle/
|
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/bundler/bundler/issues) and [create a ticket](https://github.com/bundler/bundler/issues/new) describing your problem and linking to your gist.
|
95
|
+
|
96
|
+
Thanks for reporting issues and helping make Bundler better!
|
data/LICENSE.md
ADDED
@@ -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.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
[![Version ](https://img.shields.io/gem/v/bundler.svg?style=flat)](https://rubygems.org/gems/bundler)
|
2
|
+
[![Build Status](https://img.shields.io/travis/bundler/bundler/master.svg?style=flat)](https://travis-ci.org/bundler/bundler)
|
3
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/bundler/bundler.svg?style=flat)](https://codeclimate.com/github/bundler/bundler)
|
4
|
+
[![Inline docs ](http://inch-ci.org/github/bundler/bundler.svg?style=flat)](http://inch-ci.org/github/bundler/bundler)
|
5
|
+
|
6
|
+
# Bundler: a gem to bundle gems
|
7
|
+
|
8
|
+
Bundler 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, Bundler 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 bundler
|
16
|
+
bundle init
|
17
|
+
echo 'gem "rspec"' >> Gemfile
|
18
|
+
bundle install
|
19
|
+
bundle exec rspec
|
20
|
+
```
|
21
|
+
|
22
|
+
See [bundler.io](http://bundler.io) for the full documentation.
|
23
|
+
|
24
|
+
### Troubleshooting
|
25
|
+
|
26
|
+
For help with common problems, see [ISSUES](https://github.com/bundler/bundler/blob/master/ISSUES.md).
|
27
|
+
|
28
|
+
### Other questions
|
29
|
+
|
30
|
+
To see what has changed in recent versions of Bundler, see the [CHANGELOG](https://github.com/bundler/bundler/blob/master/CHANGELOG.md).
|
31
|
+
|
32
|
+
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).
|
33
|
+
|
34
|
+
### Contributing
|
35
|
+
|
36
|
+
If you'd like to contribute to Bundler, that's awesome, and we <3 you. There's a guide to contributing to Bundler (both code and general help) over in [DEVELOPMENT](https://github.com/bundler/bundler/blob/master/DEVELOPMENT.md).
|
37
|
+
|
38
|
+
### Code of Conduct
|
39
|
+
|
40
|
+
Everyone interacting in the Bundler project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,309 @@
|
|
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
|
+
BUNDLER_SPEC = Gem::Specification.load("bundler.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
|
+
namespace :spec do
|
31
|
+
desc "Ensure spec dependencies are installed"
|
32
|
+
task :deps do
|
33
|
+
deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d|
|
34
|
+
[d.name, d.requirement.to_s]
|
35
|
+
end]
|
36
|
+
deps["rubocop"] ||= "= 0.33.0" if RUBY_VERSION >= "1.9.3" # can't go in the gemspec because of the ruby version requirement
|
37
|
+
|
38
|
+
# JRuby can't build ronn or rdiscount, so we skip that
|
39
|
+
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
|
40
|
+
deps.delete("ronn")
|
41
|
+
deps.delete("rdiscount")
|
42
|
+
end
|
43
|
+
|
44
|
+
deps.sort_by {|name, _| name }.each do |name, version|
|
45
|
+
sh %{#{Gem.ruby} -S gem list -i "^#{name}$" -v "#{version}" || } +
|
46
|
+
%{#{Gem.ruby} -S gem install #{name} -v "#{version}" --no-ri --no-rdoc}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Download and install gems used inside tests
|
50
|
+
$LOAD_PATH.unshift("./spec")
|
51
|
+
require "support/rubygems_ext"
|
52
|
+
Spec::Rubygems.setup
|
53
|
+
end
|
54
|
+
|
55
|
+
namespace :travis do
|
56
|
+
task :deps do
|
57
|
+
# Give the travis user a name so that git won't fatally error
|
58
|
+
system "sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd"
|
59
|
+
# Strip secure_path so that RVM paths transmit through sudo -E
|
60
|
+
system "sudo sed -i '/secure_path/d' /etc/sudoers"
|
61
|
+
# Install groff so ronn can generate man/help pages
|
62
|
+
sh "sudo apt-get install groff -y"
|
63
|
+
# Install graphviz so that the viz specs can run
|
64
|
+
sh "sudo apt-get install graphviz -y 2>&1 | tail -n 2"
|
65
|
+
if RUBY_VERSION < "1.9"
|
66
|
+
# Downgrade Rubygems on 1.8 so Ronn can be required
|
67
|
+
# https://github.com/rubygems/rubygems/issues/784
|
68
|
+
sh "gem update --system 2.1.11"
|
69
|
+
else
|
70
|
+
# Downgrade Rubygems so RSpec 3 can be installed
|
71
|
+
# https://github.com/rubygems/rubygems/issues/813
|
72
|
+
sh "gem update --system 2.2.0"
|
73
|
+
end
|
74
|
+
# Install the other gem deps, etc.
|
75
|
+
Rake::Task["spec:deps"].invoke
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
begin
|
81
|
+
rspec = BUNDLER_SPEC.development_dependencies.find {|d| d.name == "rspec" }
|
82
|
+
gem "rspec", rspec.requirement.to_s
|
83
|
+
require "rspec/core/rake_task"
|
84
|
+
|
85
|
+
desc "Run specs"
|
86
|
+
RSpec::Core::RakeTask.new
|
87
|
+
task :spec => "man:build"
|
88
|
+
|
89
|
+
if RUBY_VERSION >= "1.9.3"
|
90
|
+
# can't go in the gemspec because of the ruby version requirement
|
91
|
+
gem "rubocop", "= 0.33.0"
|
92
|
+
require "rubocop/rake_task"
|
93
|
+
RuboCop::RakeTask.new
|
94
|
+
end
|
95
|
+
|
96
|
+
namespace :spec do
|
97
|
+
task :clean do
|
98
|
+
rm_rf "tmp"
|
99
|
+
end
|
100
|
+
|
101
|
+
desc "Run the real-world spec suite (requires internet)"
|
102
|
+
task :realworld => %w[set_realworld spec]
|
103
|
+
|
104
|
+
task :set_realworld do
|
105
|
+
ENV["BUNDLER_REALWORLD_TESTS"] = "1"
|
106
|
+
end
|
107
|
+
|
108
|
+
desc "Run the spec suite with the sudo tests"
|
109
|
+
task :sudo => %w[set_sudo spec clean_sudo]
|
110
|
+
|
111
|
+
task :set_sudo do
|
112
|
+
ENV["BUNDLER_SUDO_TESTS"] = "1"
|
113
|
+
end
|
114
|
+
|
115
|
+
task :clean_sudo do
|
116
|
+
puts "Cleaning up sudo test files..."
|
117
|
+
system "sudo rm -rf #{File.expand_path("../tmp/sudo_gem_home", __FILE__)}"
|
118
|
+
end
|
119
|
+
|
120
|
+
# Rubygems specs by version
|
121
|
+
namespace :rubygems do
|
122
|
+
rubyopt = ENV["RUBYOPT"]
|
123
|
+
# When editing this list, also edit .travis.yml!
|
124
|
+
branches = %w(master)
|
125
|
+
releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.3 v2.4.8)
|
126
|
+
(branches + releases).each do |rg|
|
127
|
+
desc "Run specs with Rubygems #{rg}"
|
128
|
+
RSpec::Core::RakeTask.new(rg) do |t|
|
129
|
+
t.rspec_opts = %w(--format documentation --color)
|
130
|
+
t.ruby_opts = %w(-w)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Create tasks like spec:rubygems:v1.8.3:sudo to run the sudo specs
|
134
|
+
namespace rg do
|
135
|
+
task :sudo => ["set_sudo", rg, "clean_sudo"]
|
136
|
+
task :realworld => ["set_realworld", rg]
|
137
|
+
end
|
138
|
+
|
139
|
+
task "clone_rubygems_#{rg}" do
|
140
|
+
unless File.directory?(RUBYGEMS_REPO)
|
141
|
+
system("git clone https://github.com/rubygems/rubygems.git tmp/rubygems")
|
142
|
+
end
|
143
|
+
hash = nil
|
144
|
+
|
145
|
+
Dir.chdir(RUBYGEMS_REPO) do
|
146
|
+
system("git remote update")
|
147
|
+
if rg == "master"
|
148
|
+
system("git checkout origin/master")
|
149
|
+
else
|
150
|
+
system("git checkout #{rg}") || raise("Unknown Rubygems ref #{rg}")
|
151
|
+
end
|
152
|
+
hash = `git rev-parse HEAD`.chomp
|
153
|
+
end
|
154
|
+
|
155
|
+
puts "Checked out rubygems '#{rg}' at #{hash}"
|
156
|
+
ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
|
157
|
+
puts "RUBYOPT=#{ENV["RUBYOPT"]}"
|
158
|
+
end
|
159
|
+
|
160
|
+
task rg => ["man:build", "clone_rubygems_#{rg}"]
|
161
|
+
task "rubygems:all" => rg
|
162
|
+
end
|
163
|
+
|
164
|
+
desc "Run specs under a Rubygems checkout (set RG=path)"
|
165
|
+
RSpec::Core::RakeTask.new("co") do |t|
|
166
|
+
t.rspec_opts = %w(--format documentation --color)
|
167
|
+
t.ruby_opts = %w(-w)
|
168
|
+
end
|
169
|
+
|
170
|
+
task "setup_co" do
|
171
|
+
rg = File.expand_path ENV["RG"]
|
172
|
+
puts "Running specs against Rubygems in #{rg}..."
|
173
|
+
ENV["RUBYOPT"] = "-I#{rg} #{rubyopt}"
|
174
|
+
end
|
175
|
+
|
176
|
+
task "co" => "setup_co"
|
177
|
+
task "rubygems:all" => "co"
|
178
|
+
end
|
179
|
+
|
180
|
+
desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
|
181
|
+
task :travis do
|
182
|
+
rg = ENV["RGV"] || raise("Rubygems version is required on Travis!")
|
183
|
+
|
184
|
+
if RUBY_VERSION > "1.9.3"
|
185
|
+
puts "\n\e[1;33m[Travis CI] Running bundler linter\e[m\n\n"
|
186
|
+
Rake::Task["rubocop"].invoke
|
187
|
+
end
|
188
|
+
|
189
|
+
puts "\n\e[1;33m[Travis CI] Running bundler specs against rubygems #{rg}\e[m\n\n"
|
190
|
+
specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
|
191
|
+
|
192
|
+
Rake::Task["spec:rubygems:#{rg}"].reenable
|
193
|
+
|
194
|
+
puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
|
195
|
+
sudos = system("sudo -E rake spec:rubygems:#{rg}:sudo")
|
196
|
+
# clean up by chowning the newly root-owned tmp directory back to the travis user
|
197
|
+
system("sudo chown -R #{ENV["USER"]} #{File.join(File.dirname(__FILE__), "tmp")}")
|
198
|
+
|
199
|
+
Rake::Task["spec:rubygems:#{rg}"].reenable
|
200
|
+
|
201
|
+
puts "\n\e[1;33m[Travis CI] Running bundler real world specs against rubygems #{rg}\e[m\n\n"
|
202
|
+
realworld = safe_task { Rake::Task["spec:rubygems:#{rg}:realworld"].invoke }
|
203
|
+
|
204
|
+
{ "specs" => specs, "sudo" => sudos, "realworld" => realworld }.each do |name, passed|
|
205
|
+
if passed
|
206
|
+
puts "\e[0;32m[Travis CI] #{name} passed\e[m"
|
207
|
+
else
|
208
|
+
puts "\e[0;31m[Travis CI] #{name} failed\e[m"
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
unless specs && sudos && realworld
|
213
|
+
raise "Spec run failed, please review the log for more information"
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
rescue LoadError
|
219
|
+
task :spec do
|
220
|
+
abort "Run `rake spec:deps` to be able to run the specs"
|
221
|
+
end
|
222
|
+
|
223
|
+
task :rubocop do
|
224
|
+
abort "Run `rake spec:deps` to be able to run rubocop"
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
begin
|
229
|
+
require "ronn"
|
230
|
+
|
231
|
+
namespace :man do
|
232
|
+
directory "lib/bundler/man"
|
233
|
+
|
234
|
+
sources = Dir["man/*.ronn"].map {|f| File.basename(f, ".ronn") }
|
235
|
+
sources.map do |basename|
|
236
|
+
ronn = "man/#{basename}.ronn"
|
237
|
+
roff = "lib/bundler/man/#{basename}"
|
238
|
+
|
239
|
+
file roff => ["lib/bundler/man", ronn] do
|
240
|
+
sh "#{Gem.ruby} -S ronn --roff --pipe #{ronn} > #{roff}"
|
241
|
+
end
|
242
|
+
|
243
|
+
file "#{roff}.txt" => roff do
|
244
|
+
sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
|
245
|
+
end
|
246
|
+
|
247
|
+
task :build_all_pages => "#{roff}.txt"
|
248
|
+
end
|
249
|
+
|
250
|
+
task :clean do
|
251
|
+
leftovers = Dir["lib/bundler/man/*"].reject do |f|
|
252
|
+
basename = File.basename(f).sub(/\.(txt|ronn)/, "")
|
253
|
+
sources.include?(basename)
|
254
|
+
end
|
255
|
+
rm leftovers if leftovers.any?
|
256
|
+
end
|
257
|
+
|
258
|
+
desc "Build the man pages"
|
259
|
+
task :build => ["man:clean", "man:build_all_pages"]
|
260
|
+
|
261
|
+
desc "Remove all built man pages"
|
262
|
+
task :clobber do
|
263
|
+
rm_rf "lib/bundler/man"
|
264
|
+
end
|
265
|
+
|
266
|
+
task(:require) {}
|
267
|
+
end
|
268
|
+
|
269
|
+
rescue LoadError
|
270
|
+
namespace :man do
|
271
|
+
task(:require) { abort "Install the ronn gem to be able to release!" }
|
272
|
+
task(:build) { warn "Install the ronn gem to build the help pages" }
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
begin
|
277
|
+
require "automatiek"
|
278
|
+
|
279
|
+
Automatiek::RakeTask.new("molinillo") do |lib|
|
280
|
+
lib.download = { :github => "https://github.com/CocoaPods/Molinillo" }
|
281
|
+
lib.namespace = "Molinillo"
|
282
|
+
lib.prefix = "Bundler"
|
283
|
+
lib.vendor_lib = "lib/bundler/vendor/molinillo"
|
284
|
+
end
|
285
|
+
|
286
|
+
Automatiek::RakeTask.new("thor") do |lib|
|
287
|
+
lib.download = { :github => "https://github.com/erikhuda/thor" }
|
288
|
+
lib.namespace = "Thor"
|
289
|
+
lib.prefix = "Bundler"
|
290
|
+
lib.vendor_lib = "lib/bundler/vendor/thor"
|
291
|
+
end
|
292
|
+
rescue LoadError
|
293
|
+
namespace :vendor do
|
294
|
+
task(:molinillo) { abort "Install the automatiek gem to be able to vendor gems." }
|
295
|
+
task(:thor) { abort "Install the automatiek gem to be able to vendor gems." }
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
desc "Update vendored SSL certs to match the certs vendored by Rubygems"
|
300
|
+
task :update_certs => "spec:rubygems:clone_rubygems_master" do
|
301
|
+
require "bundler/ssl_certs/certificate_manager"
|
302
|
+
Bundler::SSLCerts::CertificateManager.update_from!(RUBYGEMS_REPO)
|
303
|
+
end
|
304
|
+
|
305
|
+
require "bundler/gem_tasks"
|
306
|
+
task :build => ["man:build"]
|
307
|
+
task :release => ["man:require", "man:build"]
|
308
|
+
|
309
|
+
task :default => :spec
|