summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Compress lint tasks to a single jobmove_man_check_to_lintsDavid Rodríguez2019-12-221-7/+1
|
* Move `rake man:check` to `linting` phaseDavid Rodríguez2019-12-221-1/+3
| | | | So that it's only run once.
* Merge #7514Bundlerbot2019-12-212-1/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7514: Fix `rake build` when path has spaces on it r=colby-swandale a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that `rake build` can no longer be run from a path that has spaces on it. ### What was your diagnosis of the problem? My diagnosis was that we need to escape the path for the shell somewhere. ### What is your fix for the problem, implemented in this PR? My fix is to add `.shellescape` at the right place. ### Why did you choose this fix out of the possible options? I chose this fix because it fixes the problem. Fixes #7512. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Fix `rake build` when path has spaces on itfix/rake_build_with_spaced_pathDavid Rodríguez2019-12-202-1/+15
|/
* Merge #7509Bundlerbot2019-12-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7509: Add `travis_retry` to apt-get operation r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was another failed build due to [apt-get install failing](https://travis-ci.org/bundler/bundler/jobs/627348743). ### What was your diagnosis of the problem? My diagnosis was TravisCI networking is unstable at the moment. ### What is your fix for the problem, implemented in this PR? Not a permanent fix, since that doesn't depend on us, but using `travis_retry` should increase reliability. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Add `travis_retry` to apt-get operationDavid Rodríguez2019-12-191-1/+1
|/ | | | To increase reliability.
* Merge #7505Bundlerbot2019-12-192-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7505: Make sure to `require "rubygems"` explicitly r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was some setups have `--disable=gem` in `RUBYOPT`, and sometimes use `bundler` without modifying that env. ### What was your diagnosis of the problem? My diagnosis was that we shouldn't break those setups just to save a `require`. ### What is your fix for the problem, implemented in this PR? My fix is to add a `require "rubygems"` on top of the file that needs it. Fixes #7487. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Make sure to `require "rubygems"` explicitlyrequire_rubygemsDavid Rodríguez2019-12-182-0/+8
| | | | | | | | | | | | Some setups have `--disable=gems` in `RUBYOPT`, and sometimes use `bundler` without modifying that env. Let's not break those setups just to save a `require`.
* | Merge #7506Bundlerbot2019-12-193-21/+12
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7506: Remove unnecessary CI steps r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that merging #7505 failed. ### What was your diagnosis of the problem? My diagnosis was that some `apt` operation installing `graphviz` failed, but installing `graphviz` was unnecessary in the specific job that failed. ### What is your fix for the problem, implemented in this PR? My fix is to only modifying the OS when strictly necessary. Also fixed another test issue with the recently added test for integration with the `rubygems-bundler` gem by `rvm`. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Fix test issue when using `rubygems-bundler` gemsmaller_os_depsDavid Rodríguez2019-12-192-2/+2
| |
| * Do extra root setup only when neededDavid Rodríguez2019-12-182-15/+10
| | | | | | | | | | Regular builds shouldn't need any extra configuration deviating from a standard ubuntu setup.
| * Remove unnecessary setupDavid Rodríguez2019-12-181-4/+0
|/ | | | | | That version of groff is already installed. As a result, the previous `apt-get update` is not needed either.
* Merge #7503Bundlerbot2019-12-182-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 7503: Bump version and changelog after release r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was changelog and version bump not yet in master. ### What is your fix for the problem, implemented in this PR? My fix is to merge back changelog and version bump after the release from the stable branch. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Changelog for 2.1.1bump_version_and_changelog_after_releaseDavid Rodríguez2019-12-181-0/+7
| |
| * Version 2.1.1David Rodríguez2019-12-181-1/+1
|/
* Merge #7498Bundlerbot2019-12-173-1/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7498: Add compatibility methods for `rubygems-bundler` gem r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that `bundler install` on a `ruby` installation using `rvm` is broken by default. ### What was your diagnosis of the problem? My diagnosis was that during 2.1.0 development phase I removed some stuff I thought it was internal and nobody would be using. ### What is your fix for the problem, implemented in this PR? My fix is to restore a minimal compatibility layer so that this stuff works again. ### Why did you choose this fix out of the possible options? I chose this fix because I think this is the minimum set of additions that gets stuff working again. Fixes #7488. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Add compatibility methods for `rubygems-bundler` gemfix_rubygems_bundler_integrationDavid Rodríguez2019-12-173-0/+19
| | | | | | | | | | Hopefully `rvm` won't install this gem by default, but for now I'm adding the following two methods for compatibility with it.
| * Avoid some redefinition warningsDavid Rodríguez2019-12-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | Sometimes `rake` will load the default version of `bundler` and then the `Rakefile` will change the LOAD_PATH and require the same code again using the version of `bundler` in `lib`. The only `bundler` code that gets used by the `Rakefile` is `bundler/gem_tasks`. This is used, for example, for releasing. I think it's fine to use an installed version of `bundler` for this in any case.,
* | Merge #7497Bundlerbot2019-12-172-1/+25
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | 7497: Merge changelog and version bump back to master r=hsbt a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that version and changelog need to be cherry-picked from the stable branch. ### What is your fix for the problem, implemented in this PR? My fix is to do just that. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Merge changelog and version bump back to masterDavid Rodríguez2019-12-172-1/+25
|/
* Merge #7493Bundlerbot2019-12-163-12/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7493: Fix another silent rubygems issue r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that we still have some issues where using the `gem` script on a `bundler` context is silenced. ### What was your diagnosis of the problem? My diagnosis was that `bundle exec` adds `-rbundler/setup` to RUBYOPT which silences `rubygems` output, and that we need to reset `rubygems` UI after that so that if we end up shelling out to `gem`, it is not silent. The previous approach worked for loading the `gem` script in-process, but didn't work in other case. ### What is your fix for the problem, implemented in this PR? My fix is to reset rubygems UI right after `bundler/setup`. ### Why did you choose this fix out of the possible options? I chose this fix because it fixes the problem independently of the rubygems version being run, but we can probably also fix this more cleanly inside the `gem` script by adding something like `Gem::DefaultUserInteraction.ui = Gem::ConsoleUI.new` at the top of the script. Fixes #7490. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Fix another silent rubygems issuefix_another_silent_rubygems_issueDavid Rodríguez2019-12-163-12/+14
|/ | | | | | | | | | | | | | We might be shelling out to rubygems in a `bundle exec` context. In the case where we don't shell out to the `gem` binstub directly, the previous trick wouldn't work. Instead, reset the rubygems ui right after `bundler/setup`, so that if we end up shelling out to rubygems, it will use its default shell (non-silent). The best place to fix this would probably be right inside the `gem` script, but even if we fix it there, we'll need workarounds for previous rubygems versions inside `bundler` so I think this is good for now.
* Merge #7482Bundlerbot2019-12-144-4/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7482: Fixed test failures with gem command path on ruby core repo r=deivid-rodriguez a=hsbt ### What was the end-user problem that led to this PR? Some of the examples failed with ruby-core repository. ### What was your diagnosis of the problem? The ruby-core repository used `gem` commands under the its repository named `bin/gem` directory. But the current examples points `gem` command with a global path. ### What is your fix for the problem, implemented in this PR? I fixed them used by `ruby_core?` helper methods. Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
| * Fixed test failures with gem command path on ruby core repo.fixed-bundler-specs-on-ruby-repoHiroshi SHIBATA2019-12-144-4/+8
| |
* | Merge #7483Bundlerbot2019-12-141-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7483: Delegate should be supported now r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that delegate is now supported since `did_you_mean` drop its dependency on it at https://github.com/ruby/ruby/commit/e2708068ad65f7f9986adf4fb3a4fa660f430a5a. ### What was your diagnosis of the problem? My diagnosis was that we can test that arbitrary `delegate` versions can be included in Gemfiles again. ### What is your fix for the problem, implemented in this PR? My fix removes `delegate` from the exemptions. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Delegate should be supported nowdelegate_is_now_supportedDavid Rodríguez2019-12-141-1/+1
|/ | | | Since `did_you_mean` dropped its dependency on it.
* Merge #7480Bundlerbot2019-12-143-9/+44
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 7480: Vendor thor 1.0.0 r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that `thor` 1.0.0 has been released, so we should vendor it. ### What is your fix for the problem, implemented in this PR? My fix is to vendor it. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Vendor thor 1.0.0David Rodríguez2019-12-143-9/+44
| |
* | Merge #7478Bundlerbot2019-12-132-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7478: Revert "Write & read dummy gems binarily" r=deivid-rodriguez a=deivid-rodriguez This reverts commit f11c4757a17bea029e1a83ad67c425ccf16133ff. ### What was the end-user problem that led to this PR? The problem was that since #7451, azure logs are flooded with messages like ``` The file will have its original line endings in your working directory warning: LF will be replaced by CRLF in foo.gemspec. ``` This makes it hard to scan for other potential errors. ### What was your diagnosis of the problem? My diagnosis was that some commit in that PR introduced this warnings. ### What is your fix for the problem, implemented in this PR? My fix is to revert the offending commit. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Revert "Write & read dummy gems binarily"cleanup_windows_ci_logsDavid Rodríguez2019-12-132-2/+2
|/ | | | This reverts commit f11c4757a17bea029e1a83ad67c425ccf16133ff.
* Merge #7477Bundlerbot2019-12-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7477: Skip `did_you_mean` and `delegate` failures on MRI 2.7 r=deivid-rodriguez a=deivid-rodriguez # What was the end-user problem that led to this PR? `ruby-head` build [is broken again](https://travis-ci.org/bundler/bundler/jobs/624581155). ### What was your diagnosis of the problem? Ruby 2.7 will turn `did_you_mean` into a default gem. That means that bundler tests that make sure that an arbritary version of default gems can be specified in the `Gemfile` will now run against `did_you_mean`. And this doesn't work because `did_you_mean` is activated in ruby's `prelude.rb`, way before `bundler/setup` is required, so the latest version will always be activated, regardless of what the user specifies. If these versions are not the same, a gem activation conflict error will happen. Note that this problem is not specific to ruby 2.7, it simply gets triggered by the change of making it a default gem, but it would also happen on older versions if the user `did_you_mean` version specified in the `Gemfile` does not match the latest version installed on her system. As a consequence of this, we also get activation trouble because `did_you_mean` depends on `delegate` which is also a default gem on ruby 2.7. This problem _is_ specific to ruby 2.7 because `delegate` was not gemified before that, but can probably be workarounded by removing the `delegate` dependendcy from `did_you_mean`. ### What is your fix for the problem, implemented in this PR? My "fix" allow these failures, because there's not much we can do about this at the moment. However, I'd like to ping @yuki24 and ask how difficult would be to remove the dependency on `delegate` from `did_you_mean`, because that would fix the issue with the `delegate` gem. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Skip `did_you_mean` and `delegate` failures on MRI 2.7skip_did_you_mean_on_2_7David Rodríguez2019-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 2.7 will turn `did_you_mean` into a default gem. That means that bundler tests that make sure that an arbritary version of default gems can be specified in the `Gemfile` will now run against `did_you_mean`. And this doesn't work because `did_you_mean` is activated in ruby's `prelude.rb`, way before `bundler/setup` is required, so the latest version will always be activated, regardless of what the user specifies. If these versions are not the same, a gem activation conflict error will happen. Note that this problem is not specific to ruby 2.7, it simply gets triggered by the change of making it a default gem, but it would also happen on older versions if the user `did_you_mean` version specified in the `Gemfile` does not match the latest version installed on her system. As a consequence of this, we also get activation trouble because `did_you_mean` depends on `delegate` which is also a default gem on ruby 2.7. This problem _is_ specific to ruby 2.7 because `delegate` was not gemified before that, but can probably be workarounded by removing the `delegate` dependendcy from `did_you_mean`.
* | Merge #7475Bundlerbot2019-12-134-12/+12
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7475: Delay deprecation of `bundle config` and `bundle update` without args r=hsbt a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem I was thinking about the upcoming release of bundler 2.1.0, and I'm not convinced about these two deprecations. I'm not necessarily against them, but these command are very common IMO, and we'll be making them harder to run. Again, maybe for good reasons, but still. That will be combined with the fact that: * In this same release, we'll be enabling all of the other deprecations. * Ruby 2.7 will include bundler 2.1 and ruby 2.7 will also come with a lot of warnings about keyword arguments. ### What was your diagnosis of the problem? My diagnosis was that I think it's better to postpone these two deprecations for now. Get the other deprecations going and get user feedback about them, and then worry about these two later. ### What is your fix for the problem, implemented in this PR? My fix is to delay both deprecations. ### Why did you choose this fix out of the possible options? I chose this fix because I don't want to be too annoying to users at this moment. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Delay deprecation of `bundle config` and `bundle update` without argsundeprecate_argless_config_and_updateDavid Rodríguez2019-12-134-12/+12
|/
* Merge #7460Bundlerbot2019-12-1346-115/+4267
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7460: Vendor `uri` library r=hsbt a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that after the gemification of the `uri` library (which will happen in ruby 2.7), `bundler` will activate the default version of the new library inside its own `bundler/setup` code. That means users won't be able to specify the version of the library they want/need to use in their own Gemfiles. ### What was your diagnosis of the problem? My diagnosis was that we should avoid using `uri` inside `bundler/setup` code. ### What is your fix for the problem, implemented in this PR? My fix is to vendor the `uri` library, like we did with `fileutils`. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * No longer need workarounds since our uri version is fixedvendorize_uri_libraryDavid Rodríguez2019-12-081-2/+0
| |
| * Use vendorized version of uri libraryDavid Rodríguez2019-12-0827-81/+81
| |
| * Vendorize "uri" libraryDavid Rodríguez2019-12-0816-26/+4179
| | | | | | | | | | We vendorize it as a dependency of `net-http-persistent`, so usages inside `net-http-persistent` get automatically replaced by `automatiek`.
| * This `require` seems unneededDavid Rodríguez2019-12-081-1/+0
| |
| * Refactor stuff to not load URI if not neededDavid Rodríguez2019-12-082-5/+11
| |
| * Remove unneeded `to_s` callsDavid Rodríguez2019-12-082-2/+2
| |
| * Lazily load uriDavid Rodríguez2019-12-087-9/+5
| |
* | Merge #7476Bundlerbot2019-12-122-13/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7476: Bump RuboCop to 0.77.0 r=deivid-rodriguez a=koic ### What was the end-user problem that led to this PR? RuboCop 0.77.0 has been released. https://github.com/rubocop-hq/rubocop/releases/tag/v0.77.0 This PR updates the following changes. ```console % bin/rake rubocop bin/rubocop --parallel Error: The `Layout/AlignArray` cop has been renamed to `Layout/ArrayAlignment`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/AlignParameters` cop has been renamed to `Layout/ParameterAlignment`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/IndentAssignment` cop has been renamed to `Layout/AssignmentIndentation`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/IndentFirstArgument` cop has been renamed to `Layout/FirstArgumentIndentation`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/IndentFirstArrayElement` cop has been renamed to `Layout/FirstArrayElementIndentation`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/IndentFirstHashElement` cop has been renamed to `Layout/FirstHashElementIndentation`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/LeadingBlankLines` cop has been renamed to `Layout/LeadingEmptyLines`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/TrailingBlankLines` cop has been renamed to `Layout/TrailingEmptyLines`. (obsolete configuration found in .rubocop.yml, please update it) The `Lint/DuplicatedKey` cop has been renamed to `Lint/DuplicateHashKey`. (obsolete configuration found in .rubocop.yml, please update it) The `Lint/MultipleCompare` cop has been renamed to `Lint/MultipleComparison`. (obsolete configuration found in .rubocop.yml, please update it) The `Lint/StringConversionInInterpolation` cop has been renamed to `Lint/RedundantStringCoercion`. (obsolete configuration found in .rubocop.yml, please update it) The `Naming/UncommunicativeBlockParamName` cop has been renamed to `Naming/BlockParameterName`. (obsolete configuration found in .rubocop.yml, please update it) rake aborted! Command failed with status (2): [bin/rubocop --parallel...] /Users/koic/src/github.com/bundler/bundler/Rakefile:123:in `block in <top (required)>' /Users/koic/src/github.com/bundler/bundler/Rakefile:15:in `block in invoke' /Users/koic/src/github.com/bundler/bundler/Rakefile:14:in `invoke' /Users/koic/src/github.com/bundler/bundler/spec/support/rubygems_ext.rb:87:in `load' /Users/koic/src/github.com/bundler/bundler/spec/support/rubygems_ext.rb:87:in `gem_load_and_activate' /Users/koic/src/github.com/bundler/bundler/spec/support/rubygems_ext.rb:45:in `gem_load' Tasks: TOP => rubocop (See full trace by running task with --trace) ``` ### What is your fix for the problem, implemented in this PR? And this PR has auto-correction of .rubocop.yml using Mry gem. https://github.com/pocke/mry ```console % gem i mry Fetching mry-0.77.0.2.gem Successfully installed mry-0.77.0.2 1 gem installed % mry .rubocop.yml ``` Co-authored-by: Koichi ITO <koic.ito@gmail.com>
| * | Bump RuboCop to 0.77.0Koichi ITO2019-12-122-13/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RuboCop 0.77.0 has been released. https://github.com/rubocop-hq/rubocop/releases/tag/v0.77.0 This PR updates the following changes. ```console % bin/rake rubocop bin/rubocop --parallel Error: The `Layout/AlignArray` cop has been renamed to `Layout/ArrayAlignment`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/AlignParameters` cop has been renamed to `Layout/ParameterAlignment`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/IndentAssignment` cop has been renamed to `Layout/AssignmentIndentation`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/IndentFirstArgument` cop has been renamed to `Layout/FirstArgumentIndentation`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/IndentFirstArrayElement` cop has been renamed to `Layout/FirstArrayElementIndentation`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/IndentFirstHashElement` cop has been renamed to `Layout/FirstHashElementIndentation`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/LeadingBlankLines` cop has been renamed to `Layout/LeadingEmptyLines`. (obsolete configuration found in .rubocop.yml, please update it) The `Layout/TrailingBlankLines` cop has been renamed to `Layout/TrailingEmptyLines`. (obsolete configuration found in .rubocop.yml, please update it) The `Lint/DuplicatedKey` cop has been renamed to `Lint/DuplicateHashKey`. (obsolete configuration found in .rubocop.yml, please update it) The `Lint/MultipleCompare` cop has been renamed to `Lint/MultipleComparison`. (obsolete configuration found in .rubocop.yml, please update it) The `Lint/StringConversionInInterpolation` cop has been renamed to `Lint/RedundantStringCoercion`. (obsolete configuration found in .rubocop.yml, please update it) The `Naming/UncommunicativeBlockParamName` cop has been renamed to `Naming/BlockParameterName`. (obsolete configuration found in .rubocop.yml, please update it) rake aborted! Command failed with status (2): [bin/rubocop --parallel...] /Users/koic/src/github.com/bundler/bundler/Rakefile:123:in `block in <top (required)>' /Users/koic/src/github.com/bundler/bundler/Rakefile:15:in `block in invoke' /Users/koic/src/github.com/bundler/bundler/Rakefile:14:in `invoke' /Users/koic/src/github.com/bundler/bundler/spec/support/rubygems_ext.rb:87:in `load' /Users/koic/src/github.com/bundler/bundler/spec/support/rubygems_ext.rb:87:in `gem_load_and_activate' /Users/koic/src/github.com/bundler/bundler/spec/support/rubygems_ext.rb:45:in `gem_load' Tasks: TOP => rubocop (See full trace by running task with --trace) ``` And this PR has auto-correction of .rubocop.yml using Mry gem. https://github.com/pocke/mry ```console % gem i mry Fetching mry-0.77.0.2.gem Successfully installed mry-0.77.0.2 1 gem installed % mry .rubocop.yml ```
* | Merge #7474Bundlerbot2019-12-127-21/+45
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7474: Fix `bundle exec rake install` failing r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that I noticed `bundle exec rake install` was failing on my gem using the latest prerelease of bundler. ### What was your diagnosis of the problem? My diagnosis was that `bundler` silences output of rubygems by default, and in a `bundle exec` context, `bundler/setup` is always required by subprocesses. So, the `rake install` task is silencing rubygems, but it requires it to not be silent: https://github.com/bundler/bundler/blob/bada03dd6d4d15828fb5b2cf7f744948e88a69a3/lib/bundler/gem_helper.rb#L91-L92 ### What is your fix for the problem, implemented in this PR? My fix is to wrap the execution of the rubygems subprocess with `Bundler.with_original_env` so that the `gem` command runs without `bundler` involved. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Remove unnecessary -I optionfix_gem_tasksDavid Rodríguez2019-12-101-1/+1
| | | | | | | | This is leftover code that should've been removed on a previous PR.
| * Fix `bundle exec rake install` not workingDavid Rodríguez2019-12-102-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These gem task checks for a specific string in the gem subcommand output. However, if we are inside a bundled environment (`bundle exec rake install` instead of `rake install`), the ruby process will require `bundler/setup` first thing, and initialize a silent UI for rubygems. As a result, the output string will be always empty and the condition for success will always fail. So, even if installation succeeded, user will always be notified of a failure like: ``` foo 1.0 built to pkg/foo-1.0.gem. rake aborted! Couldn't install gem, run `gem install /home/deivid/Code/bundler/tmp/1/bundled_app/pkg/foo-1.0.gem' for more detailed output ... ``` So, don't check for a specific string in the output and only rely on the exit status.
| * Extract a `gem_command` methodDavid Rodríguez2019-12-091-5/+7
| | | | | | | | And use it consistently.
| * Name variable consistenlyDavid Rodríguez2019-12-091-4/+4
| | | | | | | | Like it is named in the other analogous methods.
| * Prefer `be_empty` to `eq("")`David Rodríguez2019-12-095-10/+10
|/