summaryrefslogtreecommitdiff
path: root/lib/bundler
Commit message (Collapse)AuthorAgeFilesLines
* Fix `bundle doctor` commandfix_bundle_doctorDavid Rodríguez2019-08-161-1/+1
| | | | | | | | | | | | Previously `bundle doctor` would fail on any bundle that does not include git gems or plugins. This is because the previously used `Bundler.home` does not exist unless the bundle includes git gems or plugins. For example, with `bundle config set path .bundle`, it points to which does not exist unless this kind of gems exist in the Gemfile. The name `Bundler.home` is really unfortunate, it should probably be have more descriptive name, and be private. But for now I just want to make `bundle doctor` usable.
* Merge #7301Bundlerbot2019-08-161-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7301: Track changes from ruby core master r=hsbt a=hsbt ### What was the end-user problem that led to this PR? I'm going to merge https://github.com/bundler/bundler/pull/7274. But the ruby-core source has some of the changes for bundler source. ### What was your diagnosis of the problem? ### What is your fix for the problem, implemented in this PR? ruby core team fixed them: * Removed circular require warning at `shared_helper.rb` * Support test at GitHub Actions, It helps that bundler will migrate Actions from Azure Pipelines too. * Fixed broken examples at ruby core repository ### Why did you choose this fix out of the possible options? Co-authored-by: ohbarye <over.rye@gmail.com> Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org> Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
| * lib/bundler/shared_helpers.rb: remove require "rubygems"Yusuke Endoh2019-08-141-1/+0
| | | | | | | | Because it causes circular require.
* | Merge #7263Bundlerbot2019-08-142-1/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7263: Add `--[no-]git` option to `bundle gem` r=simi a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that while reproducing #7262, I actually wanted a single git repo, and every subgem source controlled under a single git repository. However, this cannot be done by default. ### What was your diagnosis of the problem? My diagnosis was that we could add a `--no-git` option to `bundle gem`, so that git repository initialization is skipped. I think this can be specially useful for monorepos. ### What is your fix for the problem, implemented in this PR? My fix is to implement the flag. ### Why did you choose this fix out of the possible options? I chose this fix because it's quite simple, and it solves my request. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Add `--[no-]git` option to `bundle gem`git_option_to_bundle_gemDavid Rodríguez2019-07-312-1/+2
| | | | | | | | | | I think using `--no-git` can be useful when creating gems inside monorepos.
* | Stop printing deprecation messages during specsfix_deprecation_warnings_during_specsDavid Rodríguez2019-08-111-2/+18
| | | | | | | | | | | | | | | | | | | | Previously under some circunstances (met during some specs), bundler would print deprecations to a separate UI different from "bundler's UI". This UI would not be captured by the specs, and thus would be printed to screen during the specs. This commit fixes that by making sure all deprecation messages always go through bundler's UI.
* | Fix typo in comment: attibutes -> attributesMasato Ohba2019-08-101-1/+1
| |
* | Merge #7264Bundlerbot2019-08-051-3/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7264: Consistent lockfiles r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that when a Gemfile would specify path sources with paths starting with "./", the generated lockfile would be inconsistent on `bundle install` and `bundle update`. ### What was your diagnosis of the problem? My diagnosis was that when running `bundle update`, the bundle would be unlocked, and bundler would order the path sources according to the path present in the Gemfile ("./aaa" for example). On the other hand, when running `bundle install`, bundler would read the relative paths from the lockfile, where they are normalized ("aaa" for example). ### What is your fix for the problem, implemented in this PR? My fix is to normalize relative paths when creating the source list, so that "aaa" is always used over "./aaa". ### Why did you choose this fix out of the possible options? I chose this fix because it fixes the problem and it's backwards compatible (as in, it doesn't break any specs that assert for specific lockfiles). Fixes #7262. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | Fix inconsistent lockfile orderconsistent_lockfilesDavid Rodríguez2019-07-241-1/+6
| | | | | | | | | | | | | | | | | | When Gemfile would specify path sources as relative paths starting with "./", the lockfile would have inconsistent order on `bundle install` and `bundle update`.
| * | Reuse `root` methodDavid Rodríguez2019-07-241-2/+2
| | |
* | | Use the standard RUBY_ENGINE_VERSION instead of JRUBY_VERSIONBenoit Daloze2019-08-041-11/+1
| | | | | | | | | | | | | | | * RUBY_ENGINE and RUBY_ENGINE_VERSION are defined on every modern Ruby. * There is no such constant as TRUFFLERUBY_VERSION or RBX_VERSION.
* | | Merge #7267Bundlerbot2019-08-021-4/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7267: Use RbConfig::CONFIG directly instead of Gem::ConfigMap. r=deivid-rodriguez a=hsbt ### What was the end-user problem that led to this PR? When we try to remove `Gem::ConfigMap` on rubygems repository, It breaks the bundler examples. https://github.com/rubygems/rubygems/pull/2848#issuecomment-515726585 ### What was your diagnosis of the problem? Gem::ConfigMap is compatibility code for the old Ruby like 1.8/1.9. ### What is your fix for the problem, implemented in this PR? Use RbConfig instead of `Gem::ConfigMap` directly. It was always provided after the Ruby 2.x. Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
| * | | Remove Bundler.rubygems.config_map because it was deprecated.remove-gem-configmapHiroshi SHIBATA2019-08-011-4/+0
| | | |
| * | | Use RbConfig::CONFIG directly instead of Gem::ConfigMap.Hiroshi SHIBATA2019-07-281-1/+1
| | | | | | | | | | | | | | | | Gem::ConfigMap is compatibility code for the old Ruby like 1.8/1.9.
* | | | Bump rubocop to 0.74.0bump_rubocopDavid Rodríguez2019-07-313-3/+3
| |_|/ |/| | | | | | | | | | | And reenable exclusion because the bug why we added them has been fixed. See https://github.com/rubocop-hq/rubocop/issues/6861.
* | | Merge #7123Bundlerbot2019-07-311-77/+77
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7123: Refactors to `bundle outdated` r=deivid-rodriguez a=ryanfox1985 ### What was the end-user problem that led to this PR? Code in `bundle outdated` code be simpler and more readable. ### What is your fix for the problem, implemented in this PR? My fix is to refactor the command. Co-authored-by: Guillermo Guerrero <wolf.fox1985@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Add exclamation mark to methodDavid Rodríguez2019-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To indicate that it can raise. Co-authored-by: Guillermo Guerrero <wolf.fox1985@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Move `strict` to an attributeDavid Rodríguez2019-07-241-8/+8
| | | | | | | | | | | | | | | | | | | | Co-authored-by: Guillermo Guerrero <wolf.fox1985@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Extract some methodsDavid Rodríguez2019-07-241-19/+31
| | | | | | | | | | | | | | | | | | | | Co-authored-by: Guillermo Guerrero <wolf.fox1985@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Unfold message to single line for readabilityDavid Rodríguez2019-07-241-2/+1
| | | |
| * | | Extract a `print_gems` methodGuillermo Guerrero2019-07-241-16/+13
| | | |
| * | | Less complexityGuillermo Guerrero2019-07-241-15/+8
| | | |
| * | | Move more locals to attributesDavid Rodríguez2019-07-241-10/+11
| | | | | | | | | | | | | | | | | | | | Co-authored-by: Guillermo Guerrero <wolf.fox1985@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Move `any?` logic to the attributeDavid Rodríguez2019-07-241-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's the only usage of the `options_include_groups` attribute and its name suggests a boolean, so it fits better now. Co-authored-by: Guillermo Guerrero <wolf.fox1985@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Move `options_include_groups` to an attributeDavid Rodríguez2019-07-241-5/+5
| | |/ | |/| | | | | | | | | | Co-authored-by: Guillermo Guerrero <wolf.fox1985@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
* | | Merge #7259Bundlerbot2019-07-291-13/+22
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7259: Relax bundler binstub r=indirect a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that the logic to select bundler versions was different when bundler is run from a rubygems binstub that when bundler is run from a bundler binstub. ### What was your diagnosis of the problem? My diagnosis was that we should unify the logic. ### What is your fix for the problem, implemented in this PR? My fix is to use the same logic implemented in the rubygems version finder, namely, only fail if the major version of bundler does not match. ### Why did you choose this fix out of the possible options? I chose this fix because it makes things consistent. Fixes #7243. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Add workaround from old rubygemsrelax_bundler_binstubDavid Rodríguez2019-07-231-1/+9
| | | | | | | | | | | | | | | | | | | | In these versions, the `approximate_recommendation` method doesn't include the prerelease logic.
| * | | Update error messages to be more preciseDavid Rodríguez2019-07-231-1/+1
| | | |
| * | | Remove unnecessary method parameterDavid Rodríguez2019-07-231-2/+2
| | | |
| * | | Use a consistent requirement in binstubDavid Rodríguez2019-07-231-9/+12
| | | |
| * | | Remove redundant begin-end blockDavid Rodríguez2019-07-231-2/+1
| | | |
| * | | Don't need 1.8 compatibilityDavid Rodríguez2019-07-231-2/+1
| | | |
* | | | Merge #7258Bundlerbot2019-07-292-4/+5
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7258: Restore the removal of the `--all` flag for `bundle cache` in Bundler 3 r=indirect a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that I accidentally restored this flag on Bundler 3 in #7249, but the plan still is to remove it. ### What was your diagnosis of the problem? My diagnosis was that I need to remove it again. ### What is your fix for the problem, implemented in this PR? My fix is to remove it. ### Why did you choose this fix out of the possible options? I chose this fix because it's the original plan and makes sense. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Prefer feature flag to harcoded checkDavid Rodríguez2019-07-241-1/+1
| | | |
| * | | Restore `cache_all` flag removalDavid Rodríguez2019-07-241-3/+4
| | |/ | |/|
* | | Merge #6809Bundlerbot2019-07-262-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6809: Fix using gemspec & force_ruby_platform on windows r=deivid-rodriguez a=segiddins ### What was the end-user problem that led to this PR? The problem was using `gemspec` and `force_ruby_platform` on Windows would lead to gems not being requirable. Fixes #6801. ### What was your diagnosis of the problem? My diagnosis was there was a place where `force_ruby_platform` wasn't being taken into account, namely the query methods on `Bundler.current_ruby` ### What is your fix for the problem, implemented in this PR? My fix was to add a check for the local platform in `current_ruby`, so the `force_ruby_platform` override would be taken into account. ### Why did you choose this fix out of the possible options? I chose this fix because it avoids hard-coding knowledge of the setting in more places. Co-authored-by: Samuel Giddins <segiddins@segiddins.me> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | [CurrentRuby] Say we are ruby? when the generic local platform is ↵segiddins/gemspec-force-ruby-platformSamuel Giddins2019-07-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Gem::Platform::RUBY This allows us to always say we're ruby? when force_ruby_platform is set, and fixes using gemspec & force_ruby_platform on windows.
| * | | [GemHelpers] Remove the special code path for ruby platform being its own ↵Samuel Giddins2019-07-091-3/+1
| | | | | | | | | | | | | | | | generic
* | | | net-http-persistent 3.1.0 has been releasedbump_net_http_persistentDavid Rodríguez2019-07-253-9/+31
| | | |
* | | | Adapt to the way my automatiek patch worksDavid Rodríguez2019-07-241-1/+1
| | | |
* | | | Bump net-http-persistent to 3.0.1David Rodríguez2019-07-2412-440/+811
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds an extra artifice task to vendorize new `connection_pool` dependency. * Cherry-pick's needed Windows fix not yet merged into master branch of `net-http-persistent`. * Update bundler usages to be compatible with the new version, and fix unit specs.
* | | Merge #7261Bundlerbot2019-07-243-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7261: Enable `Style/UnneededInterpolation` cop r=hsbt a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that sometimes we have some unneeded string interpolations in our code base. ### What was your diagnosis of the problem? My diagnosis was that we could remove them, because interpolating string variables seems weird and redundant. ### What is your fix for the problem, implemented in this PR? My fix is to remove the unnecessary interpolations, and enable the corresponding rubocop cop. ### Why did you choose this fix out of the possible options? I chose this fix because it fixes the current issues and it enforces the style rule from now on. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Enable `Style/UnneededInterpolation` copenable_unneeded_interpolation_copDavid Rodríguez2019-07-233-3/+3
| | | |
* | | | Merge #7226Bundlerbot2019-07-241-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7226: Improve quality specs r=hsbt a=deivid-rodriguez ### What was the end-user problem that led to this PR? I'm not really sure of the exact context when I made these changes, but I recall I was getting some invalid encoding errors somehow, and they turned out to be an estraneous `’` quote in one of the documentation files. ### What was your diagnosis of the problem? My diagnosis was that we should not include this character anywhere, but instead use regular quotes. ### What is your fix for the problem, implemented in this PR? My fix is to add a quality spec for this, and while I was at it, I added some improvements to quality specs in general. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * | | Check for straneous quotesimprove_quality_specsDavid Rodríguez2019-07-101-1/+1
| |/ / | | | | | | | | | And use single quotes consistenly.
* | | Merge #7238Bundlerbot2019-07-231-1/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7238: Point to CoC which contains the contributor covenant r=deivid-rodriguez a=ajwann ### What was the end-user problem that led to this PR? The generated README contains two different links to contributor covenant. Since the generated Code of Conduct *contains* the text of the Contributor Covenant, we can just point the generated README to the generated CoC, and explicitly refer to it as the code of conduct. ### What is your fix for the problem, implemented in this PR? The generated readme now points to the gems CoC (which contains the Contributor Covenant) Closes #6905. Co-authored-by: Adam Wanninger <ajwann@ajwann.com>
| * | | Point to CoC which contains the contributor covenantAdam Wanninger2019-07-231-1/+2
| | |/ | |/|
* | | Remove uneeded bundler keyDavid Rodríguez2019-07-231-1/+0
|/ / | | | | | | | | | | | | It sounds like this was mistankenly added in 4337a499d0108fc3748084934aaed7591b355a26. Then the forgotten MANPATH key was added in bf5bf106230772934602768bb31a68dc925691f0, but this one should've been removed I think.
* | Merge #7250Bundlerbot2019-07-221-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7250: Fix ruby core dsl spec.rb failure, warning on build_metadata.rb r=deivid-rodriguez a=MSP-Greg ### What was the end-user problem that led to this PR? Travis CI job on Ruby master was failing & had a nuisance warning. ### What is your fix for the problem, implemented in this PR? 1. dls_spec.rb - Minor change to the error msg regexp match string 2. build_metadata.rb - change `if @git_commit_sha` to `if instance_variable_defined? :@git_commit_sha` Co-authored-by: MSP-Greg <msp-greg@users.noreply.github.com>
| * | build_metadata.rb - fix 'warning: instance variable @git_commit_sha not ↵MSP-Greg2019-07-161-1/+1
| | | | | | | | | | | | initialized'