summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Ensure the rackup binstub is present on 2.0 when it should beseg-auto-cleanSamuel Giddins2017-08-281-0/+1
|
* Pretty-print commad invocationsSamuel Giddins2017-08-281-1/+12
|
* [Index] Return self in #eachSamuel Giddins2017-08-281-0/+1
|
* Automatically bundle clean without a path set on 2.0Samuel Giddins2017-08-2822-31/+69
|
* Auto merge of #5638 - bundler:seg-warn-old-tls, r=indirectThe Bundler Bot2017-08-283-2/+107
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warn when making an outdated TLS connection to rubygems.org Right now, output looks like ``` Your Ruby version does not support TLSv1.1 or newer, which will be required to connect to https://index.rubygems.org by June 2018. Fetching gem metadata from https://rubygems.org/........... Fetching version metadata from https://rubygems.org/.. Resolving dependencies... Using rake 11.3.0 Using automatiek 0.1.2 from source at `.` Using rspec-support 3.5.0 Using diff-lcs 1.3 Using bundler 1.15.0.pre.3 Using rspec-core 3.5.4 Using rspec-expectations 3.5.0 Using rspec-mocks 3.5.0 Using rspec 3.5.0 Bundle updated! ``` Obviously this requires tests, and also backing out forcing the TLS version (which I did to make testing easier). The message could also use improvement, but I figured I'd ask for input from @indirect and @dwradcliffe
| * Update outdated TLS warning to link to new bundler guideseg-warn-old-tlsSamuel Giddins2017-08-122-7/+14
| |
| * Use URI#host instead of #hostname for 1.8.7 compatibilitySamuel Giddins2017-08-121-1/+1
| |
| * Add specs for warning for old TLS versionsSamuel Giddins2017-08-121-0/+68
| |
| * Warn when making an outdated TLS connection to rubygems.orgSamuel Giddins2017-08-122-2/+32
| |
* | Auto merge of #5955 - bundler:seg-bundler-2-defaults, r=indirectThe Bundler Bot2017-08-2814-29/+38
|\ \ | | | | | | | | | | | | | | | | | | | | | Default to packaging all on 2.0 This is going to be the last set of changes to defaults in Bundler 2. @colby-swandale @indirect are there other changes I should be making here?
| * | Completely remove the package --all option on 2.0 and force its behaviorseg-bundler-2-defaultsSamuel Giddins2017-08-2813-29/+36
| | |
| * | Default to packaging all on 2.0Samuel Giddins2017-08-283-4/+6
| | |
* | | Auto merge of #5973 - bundler:seg-molinillo-0.6.2, r=segiddinsThe Bundler Bot2017-08-282-8/+9
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update Molinillo to 0.6.2 ### What was the end-user problem that led to this PR? The problem was Molinillo 0.6.2 fixes a potential problem. ### What is your fix for the problem, implemented in this PR? My fix is to update to Molinillo 0.6.2.
| * | Update Molinillo to 0.6.2seg-molinillo-0.6.2Samuel Giddins2017-08-252-8/+9
| | |
* | | Auto merge of #5976 - bundler:colby/bundler-binstubs-standalone, r=segiddinsThe Bundler Bot2017-08-284-9/+40
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bundle binstubs stanadlone flag ### What was the end-user problem that led to this PR? Currently, specifying the `--standalone` flag breaks `bundler binstubs` unless you have the `path` setting set in your bundle config. This is breaking in different ways but mostly for the same reason. Bundler Master: ``` RuntimeError: Can't standalone without an explicit path set /Users/c/Desktop/Projects/bundler/lib/bundler/installer.rb:158:in `generate_standalone_bundler_executable_stubs' /Users/c/Desktop/Projects/bundler/lib/bundler/cli/binstubs.rb:36:in `block in run' /Users/c/Desktop/Projects/bundler/lib/bundler/cli/binstubs.rb:26:in `each' ``` Bundler 1.15.4: ``` TypeError: no implicit conversion of nil into String /Users/c/.rubies/ruby-2.4.1/lib/ruby/2.4.0/pathname.rb:409:in `initialize' /Users/c/.rubies/ruby-2.4.1/lib/ruby/2.4.0/pathname.rb:409:in `new' /Users/c/.rubies/ruby-2.4.1/lib/ruby/2.4.0/pathname.rb:409:in `join' /Users/c/.gem/ruby/2.4.1/gems/bundler-1.15.4/lib/bundler/installer.rb:142:in `generate_standalone_bundler_executable_stubs' ``` This was not caught in our tests because the `--standalone` flag was infact not being tested. Another issue is that we have command options for the `bundle binstubs` command which are missing documentation in the man pages. ### What was your diagnosis of the problem? This error occurs when the `path` setting is not set which `generate_standalone_bundler_executable_stubs` expects to be set ### What is your fix for the problem, implemented in this PR? Set a temporary path setting in the binstubs command of either any currently set `path` setting or use `Bundler.root` instead. ### Why did you choose this fix out of the possible options? This was the most simplest solution that i can think of without having to change the standalone binstub generator.
| * | | fix breaking binstubs standalone flagcolby/bundler-binstubs-standaloneColby Swandale2017-08-263-9/+37
| | | | | | | | | | | | | | | | | | | | Also move the bundler-install standalone flag tests into the the bundle install tests
| * | | document `shebang` option for bundler-binstubColby Swandale2017-08-261-0/+3
| | | |
* | | | Auto merge of #5957 - bundler:seg-bundler-binstub-under-2, r=indirectThe Bundler Bot2017-08-273-11/+24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the locked bundler is under 2.0, allow any version < 2 ### What was the end-user problem that led to this PR? The problem was the bin stub would lock to a specific version even for a 1.x version, which was an incompatible change. See @indirect's comment in https://github.com/rubygems/rubygems/pull/1977#issuecomment-322852799 ### What was your diagnosis of the problem? My diagnosis was we needed to only pin to a specific version for 2.0+. ### What is your fix for the problem, implemented in this PR? My fix transforms any 1.x bundler version to a "< 2" constraint.
| * | | | RG < 1.8 compatibility in bundle binstubseg-bundler-binstub-under-2Samuel Giddins2017-08-251-1/+2
| | | | |
| * | | | Stop installing bundler 1.12 for the specsSamuel Giddins2017-08-251-1/+0
| | | | |
| * | | | Allow spaces in bundle update --bundler versionSamuel Giddins2017-08-251-3/+11
| | | | |
| * | | | When the locked bundler is under 2.0, allow any version < 2Samuel Giddins2017-08-252-6/+11
| | |/ / | |/| |
* | | | Auto merge of #5956 - bundler:seg-bundle-update-bundler-no-reresolve, r=indirectThe Bundler Bot2017-08-274-4/+34
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Update] Avoid a normal update when running with only --bundler ### What was the end-user problem that led to this PR? The problem was `bundle update --bundler` went through the full update/resolution path when really we just want to pin to a different bundler version. ### What was your diagnosis of the problem? My diagnosis was we should just update the lockfile, without threading the rest of the process like an update. This implements what @indirect requested in https://github.com/rubygems/rubygems/pull/1977#issuecomment-322852799.
| * | | [Update] Avoid a normal update when running with only --bundlerseg-bundle-update-bundler-no-reresolveSamuel Giddins2017-08-204-4/+34
| | | |
* | | | Auto merge of #5960 - shyouhei:master, r=segiddinsThe Bundler Bot2017-08-222-1/+19
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid namespace pollution fixes #5958. ### What was the end-user problem that led to this PR? The problem was that local variables are magically introduced into the global toplevel, when there is a local gemspec that has such local variables. ### What was your diagnosis of the problem? My diagnosis was that `TOPLEVEL_BINDING` is used with `eval` ### What is your fix for the problem, implemented in this PR? My fix is to duplicate that binding. ### Why did you choose this fix out of the possible options? I chose this fix because it is clean and concise. Other possible options are like reinventions of wheel.
| * | | support ruby < 2.2.0Urabe, Shyouhei2017-08-221-1/+1
| | | |
| * | | Add specs for TOPLEVEL_BINDING pollutionUrabe, Shyouhei2017-08-211-0/+18
| | | |
| * | | avoid TOPLEVEL_BINDING pollutionUrabe, Shyouhei2017-08-211-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Evaluating user inputs in the TOPLEVEL_BINDING can pollute global toplevel local variable namespace because there is only one TOPLEVEL_BINDING across the entire process. Here in this method we do not need such thing. Duplicating that binding to create dedicated one for this purpose should effectively kill such global side effects.
* | | Auto merge of #5873 - bundler:seg-deprecations-hard-error-in-2, r=segiddinsThe Bundler Bot2017-08-2030-78/+101
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure deprecations become a hard error in Bundler 2 ### What was the end-user problem that led to this PR? The problem was some deprecations aren't guaranteed to be behind a feature flag, so we want to guarantee that we won't continue to support those behaviors when they're intended to be removed. ### What was your diagnosis of the problem? My diagnosis was we needed to ensure that deprecations don't stay deprecations past the point they're supported. ### What is your fix for the problem, implemented in this PR? My fix adds a `major_version` argument to the deprecation method, and raises an error if the current version is `>=` that version ### Why did you choose this fix out of the possible options? I chose this fix because it will ensure that everything deprecated won't continue to work past when it's supposed to, reducing the chance we'll need to accidentally support things we won't want to.
| * | fix tests/functionality breaking with new deprecation errorseg-deprecations-hard-error-in-2Colby Swandale2017-08-2015-38/+35
| | |
| * | Fix detecting binstubs mismatchSamuel Giddins2017-08-201-1/+1
| | |
| * | Update major deprecation specs for narrower gems.rb warningSamuel Giddins2017-08-201-3/+6
| | |
| * | Deprecate the vlad & capistrano tasksSamuel Giddins2017-08-202-0/+8
| | |
| * | Ensure deprecations become a hard error in Bundler 2Samuel Giddins2017-08-2013-36/+51
|/ /
* | Merge tag 'v1.15.4'Samuel Giddins2017-08-192-1/+10
|\ \ | | | | | | | | | Version 1.15.4
| * | Version 1.15.4 with changelogv1.15.41-15-stableSamuel Giddins2017-08-192-1/+10
| | |
| * | Auto merge of #5933 - NickLaMuro:bundle-pristine-respect-bundler-config, ↵The Bundler Bot2017-08-193-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=segiddins Use Bundler::Installer for bundle pristine Fixes bundler pristine to respect the `bundle config` options for particular gems. In my particular case, on OSX I have a keg version of `pg` and a bundle config with the following entry: ```console $ bundle config ... build.pg Set for the current user (/Users/nicklamuro/.bundle/config): "--with-pg-config=/usr/local/Cellar/postgresql@9.5/9.5.6/bin/pg_config" ``` This would not be respected What was the end-user problem that led to this PR? -------------------------------------------------- See above, but steps to reproduce (requires `bundler` >= 1.15): 1. Install postgres on your machine if it is not already there (OS dependent) 2. Add the following bundler build arg for `pg`: ```console $ bundle config build.pg -- --with-pg-config=$(which pg_config) ``` 2. Make sure `pg_config` is not in your `$PATH`: ```console $ export PATH=$(echo "$PATH" | sed "s|:$(dirname $(which pg_conf)))||") ``` * Create a simple project with `pg` as a single gem in your Gemfile: ``` # Gemfile gem "pg" ``` * Bundle: ```console $ bundle install ``` * Attempt to `bundle pristine` (you should get an error): ```console $ bundle pristine ``` What was your diagnosis of the problem? --------------------------------------- The newly added `bundle pristine` did no use the same code that was used by `bundle install` to execute the re-installation of the gem. What is your fix for the problem, implemented in this PR? --------------------------------------------------------- By making use of the `Bundler::Installer` and `Bundler::Installer::GemInstaller` code that is already used with `bundle install`, we can reuse the code that injects the `bundle config` options into each gem that is being installed. Why did you choose this fix out of the possible options? -------------------------------------------------------- Didn't want to repeat code that was already being used elsewhere. Caused a few lines of code to be added that weren't there previously, but nothing obscene. (cherry picked from commit da6a52a9b255147b389d29e2b22ce397bbb8377b) # Conflicts: # lib/bundler/cli/pristine.rb # spec/commands/pristine_spec.rb
| * | Auto merge of #5849 - rafaelfranca:thor-0.20, r=segiddinsThe Bundler Bot2017-08-1920-68/+182
| | | | | | | | | | | | | | | | | | | | | | | | Upgrade thor to 0.20.0 Thor 0.20.0 was released so I'm upgrading bundler to the newest version. (cherry picked from commit 1f4e890304a5dae7c83d40305e2d878ca7c0362e)
| * | Auto merge of #5927 - ajwann:warn-if-path-contains-colon, r=segiddinsThe Bundler Bot2017-08-192-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exit if bundle bin path contains a path separator fixes #5485 ### What was the end-user problem that led to this PR? Bundler does not work with paths that contain the path separator. ### What was your diagnosis of the problem? The ```bundle_bin``` path can't contain a path separator. ### What is your fix for the problem, implemented in this PR? We can validate the ```bundle_path``` to make sure that it does not contain the current ```File::PATH_SEPARATOR```. If we find the path separator, we exit with a non-zero code and give the user an error message. ### Why did you choose this fix out of the possible options? I chose this fix because it was recommended by @colby-swandale. (cherry picked from commit 605beb0a4800c923380f2dfe903f2fd2eee8b7c5) # Conflicts: # lib/bundler/shared_helpers.rb
| * | Auto merge of #5928 - shayonj:s/download-retry, r=segiddinsThe Bundler Bot2017-08-192-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retry downloading gems consistently across all versions of RubyGems ### What was the end-user problem that led to this PR? `Gem::RemoteFetcher::FetchError` failures were not being retried when downloading gems. Retrying downloading of gems for network blips is very ideal and helpful in CI environment. ### What was your diagnosis of the problem? - The retry logic that existed (using `Bundler::Retry`) for `Bundler::RubygemsIntegration#download_gem` was not getting called, becase `Bundler.rubygems` defaulted to a sub class of `Bundler::RubygemsIntegration::MoreFuture`, which inherited from `Bundler::RubygemsIntegration::Future` and `#download_gem` in there didn't perform download with retry logic. - Sending `Gem::RemoteFetcher::FetchError` as an argument to `Bundler::Retry` meant, `Bundler::Retry` would fail first thing,[ if exception being raised was the one being supplied](https://github.com/bundler/bundler/blob/5a61b65ad5ec1df1539ecf8bc5d124f2b254ba14/lib/bundler/retry.rb#L46..L49). The intent is to retry when downloading fails. **Example of how sub classing issue looked like:** ```ruby class RubygemsIntegration def download_gem "I retry when downloading" end end class Future < RubygemsIntegration def download_gem "I don't retry when downloading" end end class MoreFuture < Future # no download_gem end mf = MoreFuture.new #=> Bundler.rubygems where RubyGem version is > 2.1.0 mf.download_gem => "I don't retry when downloading" ``` **Example of Bundler::Retry** ```ruby Bundler::Retry.new("download gem from", StandardError).attempts do puts "I will only print once, whereas I should print 4 times" raise StandardError.new("FooBar") end ``` ### What is your fix for the problem, implemented in this PR? I added the retry logic for to `Bundler::RubygemsIntegration::Future#download_gem` and removed `Gem::RemoteFetcher::FetchError` as an argument for failed exceptions. ### Why did you choose this fix out of the possible options? I chose this fix because this fix fulfills the expected behavior(https://github.com/bundler/bundler/issues/4846). Also added specs that makes sure retry logic is intact, which otherwise would have failed without the current logic in place. (cherry picked from commit c14d59a29739ea1a4bb73f664fc6620a711250b0)
| * | Fix spec error from bad mergeSamuel Giddins2017-08-191-2/+2
| | |
* | | Auto merge of #5720 - bundler:seg-compatibility-guard, r=indirectThe Bundler Bot2017-08-1912-13/+88
|\ \ \ | | | | | | | | | | | | | | | | | | | | [2.0] Add a compatibility guard that prints friendly errors on bundler 2+ This way, if someone manages to get bundler 2 installed on a system we don't support, they'll get a very obvious message saying so
| * | | Ensure versions are unfrozen for super old RGseg-compatibility-guardSamuel Giddins2017-08-171-1/+1
| | | |
| * | | Allow ignoring the compatibilty guard in specsSamuel Giddins2017-08-175-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # spec/install/bundler_spec.rb # spec/other/compatibility_guard_spec.rb
| * | | [Gemspec] Set 2.0 required ruby/rubygems versionsSamuel Giddins2017-08-171-2/+7
| | | |
| * | | Always bundle exec to Gem.ruby in the specsSamuel Giddins2017-08-171-9/+9
| | | |
| * | | Update supported versions according to ↵Samuel Giddins2017-08-175-8/+11
| | | | | | | | | | | | | | | | https://github.com/bundler/bundler/issues/5789
| * | | Add a compatibility guard that prints friendly errors on bundler 2+Samuel Giddins2017-08-175-0/+40
| | | |
| * | | Allow simulating different RubyGems versions in the specsSamuel Giddins2017-08-172-0/+13
| | | |
* | | | Auto merge of #5908 - bundler:seg-globally-cache-built-extensions, r=indirectThe Bundler Bot2017-08-199-8/+108
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [2.0] Globally cache built extensions for RG & Git sources ### What was the end-user problem that led to this PR? The problem was with the switch to defaulting the install path to `./.bundle`, you'd need to rebuild extensions for each app you use a gem in. Closes #5905 ### What was your diagnosis of the problem? My diagnosis was we could globally cache built extensions in a per-ruby, per-source directory, similar to how 2.0 global `.gem` caching and the git cache works. ### What is your fix for the problem, implemented in this PR? My fix implements that cache. ### Remaining questions: - [x] Tests - [x] Right now, the directory structure is `cache/gems/remote_name/extensions/ruby_scope/gem_full_name`. I'm wondering whether we should make it `cache/extensions/ruby_scope/source_slug/gem_full_name` instead to make removing the cache for an old ruby version easier? - [x] Should the cache path include something about the local OS? ie. do we want to force a re-compile when the user updates OS versions?