| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These hashes are actually modified. For example, to exclude some
dependencies under jruby.
So they should not be frozen.
Without this, running `bin/rake spec:deps` from jruby crashes with:
```
rake aborted!
FrozenError: can't modify frozen Hash
/path/to/bundler/spec/support/rubygems_ext.rb:36:in `dev_setup'
/path/to/bundler/Rakefile:29:in `block in <main>'
/path/to/bundler/Rakefile:14:in `block in invoke'
/path/to/bundler/Rakefile:13:in `invoke'
/path/to/bundler/spec/support/rubygems_ext.rb:98:in `gem_load_and_activate'
/path/to/bundler/spec/support/rubygems_ext.rb:45:in `gem_load'
Tasks: TOP => spec:deps
(See full trace by running task with --trace)
```
|
| |
|
|
|
|
|
|
|
| |
We run into a race condition when testing in parallel when all
processors install test gems to their test folder (due to shared gem
cache). So I figure we can instead run this setup sequentially
beforehand.
|
| |
|
|
|
|
| |
This is precisely what the `--conservative` flag to `gem install` does.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
```
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous version was overly complicated and brittle, and didn't support,
for example, using custom branches in rubygems inside the `RGV`
environment variable.
Now the `RGV` env variable supports:
* Local paths.
* Arbitrary tags or branches in rubygems repo.
* Released rubygems versions.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
7452: Bump rubocop and rubocop-performance r=deivid-rodriguez a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was not really a problem, but it's good to keep our dependencies up to date.
### What is your fix for the problem, implemented in this PR?
My fix is to bump rubocop and rubocop-performance.
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
|
| |
| |
| |
| | |
To the latest 0.76.0, and 1.5.1, respectively.
|
|/
|
|
|
|
|
|
| |
I mounted the local copy of bundler to a Windows VM. I would like system
gems to be reused between my Linux and Windows builds, but they are
currently not reused because the manifest is written differently from
both CIs, and when changing platform, it believes that it has changed
when it has not.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
7435: Fix RGV env variable specified as a path r=deivid-rodriguez a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was that using `RGV` (the environment variable we use to select the proper rubygems version to test bundler against) with a path was not quite working.
Setting `RGV` to a path (`RGV=..`) is used in the rubygems repo to test the vendored copy of bundler (that lives at `bundler/` inside that repo) against the checked out copy of the repository.
### What was your diagnosis of the problem?
My diagnosis was that the previous approach to switch the `rubygems` version, namely, reexec'ing with `--disable-gems` and explicitly requiring our "version switching code" was not quite working because nested subprocesses would end up "leaking" to the system copy of `rubygems` again.
### What is your fix for the problem, implemented in this PR?
My fix is to use `RUBYOPT` to configure the path to the rubygems copy that should be used, since I found that even the `require "rubygems"` present's in [ruby's `gem_prelude.rb`](https://github.com/ruby/ruby/blob/c5eb24349a4535948514fe765c3ddb0628d81004/gem_prelude.rb#L1) respects the `-I` option in the `RUBYOPT` env variable.
### Why did you choose this fix out of the possible options?
I chose this fix because it's simpler and works better.
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
|
| |
| |
| |
| |
| |
| |
| | |
Rely on adding a path with a `rubygems.rb` file to load paths in
RUBYOPT, instead of reexecing with `--disable-gems` and then explicitly
requiring the overriding file. By doing this, the correct override
mechanism is propagated around subprocesses.
|
|/
|
|
| |
To avoid unintentionally activating the default gem too early.
|
|
|
|
|
|
|
|
|
|
| |
This also avoids the following warning when running specs on any
platform:
```
`/home/deivid/Code/bundler/tmp/1/home` is not a directory.
Bundler will use `/tmp/bundler/home/deivid' as your home directory temporarily
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead, use a better rubygems version manager that makes sure that
`ENV["RGV"]` usage is always applied, and its usage is centralized at a
single place.
This simplifies the rake task organization and makes it much simpler to
run locally exactly what's run in CI. For example, since it doesn't rely
on the `RGV` being deleted for subsequent subprocesses, it also running
`bin/rake spec:travis` task locally which previously would lead to
```
rake aborted!
RubyGems version is required on Travis!
```
It also reduces duplication making it so that we only need to change the
`.travis.yml` file when updating tested rubies, and not the `Rakefile`
as well.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Instead of repeating `self` on every method.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Because we're using `config.bisect_runner` which is only available from
3.8.
|
| |
|
|
|
|
|
| |
And reenable exclusion because the bug why we added them has been fixed.
See https://github.com/rubocop-hq/rubocop/issues/6861.
|
| |
|
|
|
|
| |
And refactor development setup.
|
|
|
|
| |
And freeze the resulting hash to appease rubocop.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tests automatically download and install the test gems they need if not
installed, so this should be unnecessary.
However, removing it create a single spec failure only reproducible on a
fresh clone (where the path where the test gems are installed,
`tmp/gems`, has not yet been populated.
The problem was that the code branch that installs the gems uses the
`FileUtils` constant. Accessing that constant makes [this autoload]
trigger the custom rubygems `require` behavior which will end up setting
and memoizing `gem_home` to the value it has at that point (when calling
`to_spec` on the selected default gem). But at that point,
`Gem.clear_paths` call has already happened, that means `gem_home` won't
be changed during the duration of the test because it's memoized.
This situation makes a specific test that updates `ENV["HOME"]` and
expects he path to the configuration file rubygems uses to be updated fail.
This could be fixed by removing the `FileUtils` autoload, or stop
memoizing `Gem.home`, but the simplest fix seemed to require `fileutils`
early, so that `Gem.home` is not memoized again after calling
`Gem.clear_paths`.
[this autoload]: https://github.com/rubygems/rubygems/blob/511a0f5105ca95b8e389bf477b6c7cf3e90be7d1/lib/rubygems/source.rb#L3
|
|
|
|
|
|
|
| |
This is require "built-in" behavior, it only loads files unless they
have been loaded before. So if the constant is defined, the file
should've been already loaded. Unless another file is defining that
constant, but in that case I'd like to know.
|
| |
|
|
|
|
|
| |
It break the examples of bundler. Because some examples detect the
different version of system ruby than test target version like trunk.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Ruby 2.2.2 is no longer supported.
|
| |
|
|
|
|
| |
Since we no longer test against rubygems versions that old.
|
|
|
|
|
|
|
|
| |
@segiddins encouraged contributions towards support for Windows
https://github.com/bundler/bundler/issues/5992#issuecomment-326809543
As a first step towards this goal this commit fixes file path specification
in the first pieces of Ruby code called when setting up a test environment.
|
| |
|
| |
|
|
|
|
| |
and --no-rdoc options at RubyGems 3.0
|