| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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).
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[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.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
come from
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.)
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
- see #6103
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | |/ / / /
| |/| | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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`
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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 "../../..".
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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!
|
| | | | | | | |
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Version 1.16.0.pre.2
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Update vendored Molinillo to 0.6.3
See https://github.com/CocoaPods/Molinillo/releases/0.6.3.
(cherry picked from commit 5548a238d4cf38ff2fbec9388e8ab64049c421ed)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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)
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Update vendored Molinillo to 0.6.3
See https://github.com/CocoaPods/Molinillo/releases/0.6.3.
|
| | |_|_|_|/ /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[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.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|