summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Auto merge of #5954 - ajwann:check-permissions-for-client-index-dir, r=segiddinsThe Bundler Bot2017-09-102-0/+19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ensure $HOME and Dir.tmpdir are writable Fixes #5518 ### What was the end-user problem that led to this PR? A user had issues installing gems due to a permissions issue on the temp dir, because Bundler was not checking for proper permissions on the temp directory or $HOME. ### What was your diagnosis of the problem? After discussing the issue with @colby-swandale, the solution was to check permissions on $HOME and the ```tmpdir```. ### What is your fix for the problem, implemented in this PR? The creation of the [temp dir](https://github.com/bundler/bundler/blob/master/lib/bundler/compact_index_client/updater.rb#L31) is now wrapped in the block passed to ```filesystem_access```, so ```filesystem_access``` will rescue the ```Errno::EACCES``` exception which is thrown if the effective user of the bundler process doesn't have sufficient permissions to create the temp dir. ### Why did you choose this fix out of the possible options? I chose this fix because it's what was discussed in the original issue thread.
| * | | keep block syntax so temp dir gets cleaned upAdam Wanninger2017-09-101-53/+48
| | | |
| * | | handle Dir.mktmpdir failure outside of filesystem_access blockAdam Wanninger2017-08-272-46/+53
| | | |
| * | | bundler already does validations on $HOMEAdam Wanninger2017-08-272-29/+0
| | | |
| * | | ensure $HOME and Dir.tmpdir are writableAdam Wanninger2017-08-272-41/+87
| | | |
* | | | Auto merge of #6014 - greysteil:failing-pre-release-spec, r=segiddinsThe Bundler Bot2017-09-103-0/+35
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add spec that pre-release versions aren't selected when not in the Gemfile ### What was the end-user problem that led to this PR? The problem was that a pre-release version was being installed when the user hadn't asked for one, and a non-prerelease install was possible. ### What was your diagnosis of the problem? My diagnosis was that this was caused by the change to the way pre-releases get selected for resolution when we moved to Molinillo 0.6.0. See the change to `lib/bundler/index.rb` in https://github.com/bundler/bundler/pull/5902. ### What is your fix for the problem, implemented in this PR? My fix... isn't present yet. Basically we want to replicate the `wants_prerelease || only_prerelease` behaviour in `Bundler::Resolver#requirement_satisfied_by?`, but it's late and I haven't thought about how to do that yet. Instead, here's a failing spec. ### Why did you choose this fix out of the possible options? I chose this fix because it's late and I haven't thought about how to fix this yet, but I at least wanted it flagged.
| * | | | Check all dependency requirements when determining if user wants pre-releaseGrey Baker2017-09-103-3/+13
| | | | |
| * | | | Avoid pre-releases for sub-dependencies tooGrey Baker2017-09-102-1/+6
| | | | |
| * | | | Consider prerelease versions last if in Gemfile as non-prereleaseGrey Baker2017-09-091-0/+10
| | | | |
| * | | | Add spec that pre-release versions aren't selected when not in the GemfileGrey Baker2017-09-092-0/+10
| | | | |
* | | | | Auto merge of #5803 - igorbozato:path_relative_to_pwd, r=indirectThe Bundler Bot2017-09-107-21/+112
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `install --path` relative to the pwd ### What was the end-user problem that led to this PR? > I ran the following > > bundle install --gemfile=src/main/webapp/WEB-INF/Gemfile --path ./target/bundler/ --standalone > and it generated the setup file in the following location target/bundler/bundler/setup.rb while it installed the gems in src/main/webapp/WEB-INF/target/bundler/. So it assumed that the --path was relative to the Gemfile instead of the PWD. It also created the .bundle/config in the WEB-INF folder. Closes #2048 ### Was was your diagnosis of the problem? As discussed on the issue, the path is currently being relative to the Gemfile instead of the cwd. ### What is your fix for the problem, implemented in this PR? Making the path relative to the cwd if the new feature flag `path_relative_to_cwd` is set t true. ### Why did you choose this fix out of the possible options? This work was started by @agis (https://github.com/agis/bundler/commit/1da8a7021bdd9bbe76398dddec8bc499655666dd).
| * | | | | Update regex path spec to pass an absolute pathSamuel Giddins2017-09-101-1/+1
| | | | | |
| * | | | | Expand path relative to pwd in the settings validatorSamuel Giddins2017-09-087-50/+71
| | | | | |
| * | | | | Test that standalone writes to path relative to cwd on 2.0Samuel Giddins2017-09-081-1/+3
| | | | | |
| * | | | | Print absolute paths outside of the bundle root as absoluteSamuel Giddins2017-09-081-2/+7
| | | | | |
| * | | | | [CLI::Common] Handle when setting a nil pathSamuel Giddins2017-09-081-1/+4
| | | | | |
| * | | | | Set CLI path options relative to the CWD on 2.0Samuel Giddins2017-09-086-13/+55
| | | | | |
| * | | | | Expand path where it is usedIgor Bozato2017-09-081-1/+3
| | | | | |
| * | | | | Refactor specIgor Bozato2017-09-081-2/+2
| | | | | |
| * | | | | Make `install --path` relative to the cwdIgor Bozato2017-09-085-1/+17
| | | | | |
* | | | | | Auto merge of #5985 - bundler:seg-multisource-error, r=indirectThe Bundler Bot2017-09-102-3/+57
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [2.0] [Resolver] Error when it is ambigous which transitive source a gem should come from ### What was the end-user problem that led to this PR? The problem was the "source priority" in ambiguous source situations was ... ambiguous. ### What was your diagnosis of the problem? My diagnosis was we should error and require a user explicitly pin the dependency to a source in those situations, rather than leaving the source used up to an implementation detail. ### What is your fix for the problem, implemented in this PR? My fix attempts to implement the priority described in the conversation in https://github.com/bundler/bundler/issues/4629. ### Why did you choose this fix out of the possible options? I chose this fix because it still allows using the default source as a backup, while only taking the "relevant" sources into account, so that the error/warning is not overzealous.
| * | | | | | [Resolver] Error when it is ambigous which transitive source a gem should ↵seg-multisource-errorSamuel Giddins2017-08-302-3/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | come from
* | | | | | | Auto merge of #6015 - ↵The Bundler Bot2017-09-101-0/+1
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | olleolleolle:fix/6013-rb_user_install_into_preserve_keys, r=segiddins Add RB_USER_INSTALL to preserved ENV keys This PR adds the environment variable `RB_USER_INSTALL` to the list of preserved keys. That variable is used on FreeBSD. - see #6013 Without this change, Bundler's usage of it with the shared helpers to set a preserved env would raise this: > ArgumentError: new key RB_USER_INSTALL (This seems to be the only env var which is used but not listed in the preserved keys list.)
| * | | | | | Order listOlle Jonsson2017-09-081-1/+1
| | | | | | |
| * | | | | | Add RB_USER_INSTALL to preserved ENV keysOlle Jonsson2017-09-081-0/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | - see #6103
* | | | | | Auto merge of #5991 - arbonap:pa-quality-spec-es, r=segiddinsThe Bundler Bot2017-09-082-1/+80
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create quality spec for docs in spanish Thanks so much for the contribution! To make reviewing this PR a bit easier, please fill out answers to the following questions. ### What was the end-user problem that led to this PR? The problem was... - Now that Spanish localization is under-way, there are no specs that test the localized documentation. ### What was your diagnosis of the problem? My diagnosis was... - To write a test that filters out gender-specific pronouns and "_Well, actually..._"'s and the like in Spanish ### What is your fix for the problem, implemented in this PR? My fix... - I looked at `quality_spec.rb` and took the format from that spec and localized it to be Spanish-specific. ### Why did you choose this fix out of the possible options? I chose this fix because... - testing documentation quality should also exist for other languages
| * | | | | | Create quality spec for docs in SpanishPatricia Arbona2017-09-072-1/+80
| | |/ / / / | |/| | | |
* | | | | | Auto merge of #6007 - hsbt:use-halper-methods-for-path, r=segiddinsThe Bundler Bot2017-09-078-19/+29
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use helper methods for relative path references in the specs Ruby core needs to change `Spec::Path.root` and gemspec, bin, spec directories structure. 1. I changed spec directory from `spec` to `spec/bundler` because ruby core has rubyspec files under the `spec/rubyspec`. 2. I changed gemspec location to `bundler.gemspec` to `lib/bundler.gemspec`. ref. https://bugs.ruby-lang.org/issues/12733#note-15 This pull request make we can modify root, gemspec path to flexible locations. After merging this pull request, I will add directory structure of ruby core repository to only `spec/support/path.rb`
| * | | | | | Remove `File.expand_path` when it given Pathname objectSHIBATA Hiroshi2017-09-076-13/+10
| | | | | | |
| * | | | | | Removed Spec::Path, Because it's included on rspec contexts of bundlerSHIBATA Hiroshi2017-09-075-12/+12
| | | | | | |
| * | | | | | Use Pathname#join instead of string interpolationSHIBATA Hiroshi2017-09-075-9/+9
| | | | | | |
| * | | | | | Removed needless loadedSHIBATA Hiroshi2017-09-071-2/+0
| | | | | | |
| * | | | | | Rename spec to spec_dir, bin to bindir on Spec::PathSHIBATA Hiroshi2017-09-075-12/+12
| | | | | | |
| * | | | | | Use Pathname#join instead of string interpolationSHIBATA Hiroshi2017-09-071-4/+4
| | | | | | |
| * | | | | | Added space before require sectionSHIBATA Hiroshi2017-09-061-0/+1
| | | | | | |
| * | | | | | To use helper methods for relative path references.SHIBATA Hiroshi2017-09-068-16/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby core needs to change `Spec::Path.root` and gemspec, bin, spec directories structure. * Added Spec::Path.bin, gemspec, spec methods. * Replace Spec::Path methods from relative references like "../../..".
* | | | | | | Auto merge of #6005 - bundler:seg-bundler-2, r=indirectThe Bundler Bot2017-09-075-86/+20
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump to a Bundler 2 version Now that we've branched `1-16-stable` and the [2.0 milestone](https://github.com/bundler/bundler/milestone/13) is nearly done, it's time that we target `master` to be Bundler 2. Until Bundler 2 final is released, I'd like us to keep testing rudimentary 1.x support, to make backporting things to `1-16-stable` easier, but I've severely cut down the matrix. I'm willing to take it upon myself that 1.x stable maintains esoteric Ruby/RubyGems version compatibility now, rather than requiring it from all those who try to contribute to the project (in reality, this just means fixing up `1-16-stable` after back porting and before a release). @bundler/core: 2.0 is finally happening!
| * | | | | | [Travis] Override version before installing depsseg-bundler-2Samuel Giddins2017-09-064-9/+11
| | | | | | |
| * | | | | | Bump to a Bundler 2 versionSamuel Giddins2017-09-063-77/+9
|/ / / / / /
* | | | | | Merge tag 'v1.16.0.pre.2'Samuel Giddins2017-09-062-1/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Version 1.16.0.pre.2
| * | | | | | Version 1.16.0.pre.2 with changelogv1.16.0.pre.2Samuel Giddins2017-09-062-1/+9
| | | | | | |
| * | | | | | Auto merge of #6009 - bundler:seg-molinillo-0-6-3, r=segiddinsThe Bundler Bot2017-09-062-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update vendored Molinillo to 0.6.3 See https://github.com/CocoaPods/Molinillo/releases/0.6.3. (cherry picked from commit 5548a238d4cf38ff2fbec9388e8ab64049c421ed)
| * | | | | | Auto merge of #5972 - wadetandy:master, r=segiddinsThe Bundler Bot2017-09-062-1/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Respect RUBYGEMS_HOST env var in release messaging ### What was the end-user problem that led to this PR? When running the `release` task, bundler didn't know anything about the RUBYGEMS_HOST environment variable that rubygems respects when doing a gem push. This resulted in incorrect messaging, as environments where this was set without an `allowed_push_host` configured would message that the gem had been pushed to rubygems.org, when in fact it was pushed elsewhere. ### What was your diagnosis of the problem? Bundler was hardcoding `rubygems.org` in the event that an `allowed_push_host` setting was not specified, and didn't know anything about the `RUBYGEMS_HOST` env var. ### What is your fix for the problem, implemented in this PR? Added a check for that variable and used it before the hardcoded `rubygems.org` if it exists. ### Why did you choose this fix out of the possible options? I chose this fix because it seemed the most straightforward way to solve the problem. (cherry picked from commit 19c239ea54f4448f95fefdead6d8a15bbd1af0ad)
| * | | | | | Auto merge of #6003 - greysteil:handle-missing-socket, r=segiddinsThe Bundler Bot2017-09-062-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle missing socket when warning about OpenSSL version ### What was the end-user problem that led to this PR? Stubbing Rubygems requests with WebMock was causing `undefined method 'io' for nil:NilClass` errors when using Bundler 1.16.0.pre.1 ### What was your diagnosis of the problem? My diagnosis was that the new warning text about old OpenSSL versions didn't consider the case that a connection might not have an `@socket` variable set. ### What is your fix for the problem, implemented in this PR? Guard against this by returning early in that case. ### Why did you choose this fix out of the possible options? I chose this fix because it works, and because `Net::HTTP` itself has some guards in it around `nil` values for `@socket` ([example](https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L858-L860)). This isn't my area, though, so it could be that a fix is needed in WebMock, not here... (cherry picked from commit f81b8ddaefa0528105c9e2dcb33e045b20588f42)
* | | | | | | Auto merge of #6009 - bundler:seg-molinillo-0-6-3, r=segiddinsThe Bundler Bot2017-09-062-3/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update vendored Molinillo to 0.6.3 See https://github.com/CocoaPods/Molinillo/releases/0.6.3.
| * | | | | | | Update vendored Molinillo to 0.6.3seg-molinillo-0-6-3Samuel Giddins2017-09-062-3/+7
| | |_|_|_|/ / | |/| | | | |
* | | | | | | Auto merge of #5986 - bundler:seg-jobs-count, r=indirectThe Bundler Bot2017-09-065-10/+43
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [2.0] Auto-configure job count Closes https://github.com/bundler/bundler/pull/5808. The description of that issue, copied verbatim: This argument comes in two parts, but luckily, the first one is both easier to understand and hopefully to agree with. Background: Bundler 1.4.0 added support for parallel installation via the `--jobs` param. Soon after, [this blog post](http://archlever.blogspot.com/2013/09/lies-damned-lies-and-truths-backed-by.html) (probably greatly amplified by [this Thoughtbot blog post](https://robots.thoughtbot.com/parallel-gem-installing-using-bundler)) popularized the recommendation "set `--jobs` to `nproc - 1`". Not long after, probably also inspired by the popularity of this tip, this "n - 1 jobs" advice got codified into Bundler itself: https://github.com/bundler/bundler/commit/66acd02de593a6c7ee271bcbce3917eb3a01825a However, my assertion here is _Bundler should not do that_. The first argument (the easy one) is just that it's not doing what the user asks for. For all the people following the (seemingly popular) tip to set their jobs to `nproc - 1`, they're actually ending up with the probably-worse `- 2`. Even worse than that, if a user does a conservative `--jobs 2`, they're getting _no benefit_ — Bundler is quietly taking their parallelization back down to "no parallelization". Hopefully that's a sufficient argument on its own, but the part II is that this blanket advice is probably out-of-date anyway. Using [this script](https://gist.github.com/tjschuck/ca1d37a8869d1cc01313171b4b318094), I repeatedly installed 29 gems (installing them to a `vendor/` dir and deleting it in between runs). I averaged the time over 10 runs per --jobs value, but the trend holds regardless of how many runs you do. Note that these numbers are for a machine with 2 physical cores and 4 virtual ones (a Mac, reporting 2 and 4 respectively from `sysctl -n hw.physicalcpu` and `sysctl -n hw.ncpu`, the latter corresponding to Linux's `nproc`). ``` ~/Code/tmp/bundler_jobs_bench ☠ ./bundler_jobs_bench.sh Installing 29 gems repeatedly... =============================================== Using Bundler version 1.15.1 (current release version) =============================================== --jobs 1 5.58435780 seconds on average (across 10 runs) --jobs 2 5.35010690 seconds on average (across 10 runs) --jobs 3 3.93493610 seconds on average (across 10 runs) --jobs 4 3.86082760 seconds on average (across 10 runs) --jobs 5 3.24673650 seconds on average (across 10 runs) --jobs 6 3.49340190 seconds on average (across 10 runs) --jobs 7 3.26473430 seconds on average (across 10 runs) --jobs 8 3.34560500 seconds on average (across 10 runs) =============================================== Using development version (no more n - 1 jobs) =============================================== --jobs 1 4.32629540 seconds on average (across 10 runs) --jobs 2 3.48100690 seconds on average (across 10 runs) --jobs 3 3.30937880 seconds on average (across 10 runs) --jobs 4 3.30868200 seconds on average (across 10 runs) --jobs 5 3.54932920 seconds on average (across 10 runs) --jobs 6 3.36123440 seconds on average (across 10 runs) --jobs 7 3.96490630 seconds on average (across 10 runs) --jobs 8 3.39955640 seconds on average (across 10 runs) ``` From the above, you can see: 1. In the first block, no notable change between `--jobs 1` and `--jobs 2` — that's because they're currently the same. 2. In both, a best time corresponding to the value that (effectively) matches nproc, _not_ nproc - 1. 3. Regardless of nproc coming out best in this run, there is close enough performance among the range of `nproc - 1` through to `nproc * 2` that it doesn't seem like anything in particular (like the `- 1` removed in this commit) should be codified — people seeking to particularly optimize their bundler runtimes should do their own tweaking of the value, and it should be respected as given.
| * | | | | | Default to 1 job when auto_config_jobs is not setseg-jobs-countSamuel Giddins2017-09-061-1/+3
| | | | | | |
| * | | | | | Ensure that rake is always installed first when presentSamuel Giddins2017-09-061-0/+3
| | | | | | |
| * | | | | | Warn in the quality spec when the exemption list is out of dateSamuel Giddins2017-09-061-5/+9
| | | | | | |