mini_racer 0.3.1 isn't compatible with more recent macOS versions (in part due to lack of python 2) which made `script/setup` fail with:
```
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/cvx/dev/licensed/test/fixtures/bundler/vendor/gems/ruby/2.7.0/gems/libv8-8.4.255.0/ext/libv8
/Users/cvx/.rubies/ruby-2.7.6/bin/ruby -I /Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0 extconf.rb
creating Makefile
/Users/cvx/dev/licensed/test/fixtures/bundler/vendor/gems/ruby/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:57:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently
3.9.13 (RuntimeError)
from /Users/cvx/dev/licensed/test/fixtures/bundler/vendor/gems/ruby/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:39:in `build_libv8!'
from /Users/cvx/dev/licensed/test/fixtures/bundler/vendor/gems/ruby/2.7.0/gems/libv8-8.4.255.0/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/cvx/dev/licensed/test/fixtures/bundler/vendor/gems/ruby/2.7.0/gems/libv8-8.4.255.0 for inspection.
Results logged to /Users/cvx/dev/licensed/test/fixtures/bundler/vendor/gems/ruby/2.7.0/extensions/arm64-darwin-21/2.7.0-static/libv8-8.4.255.0/gem_make.out
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:102:in `run'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:171:in `build_extension'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:205:in `block in build_extensions'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:202:in `each'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:202:in `build_extensions'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/installer.rb:851:in `build_extensions'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/rubygems_gem_installer.rb:28:in `install'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/source/rubygems.rb:207:in `install'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/installer/gem_installer.rb:54:in `install'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/installer/gem_installer.rb:16:in `install_from_spec'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/installer/parallel_installer.rb:186:in `do_install'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:62:in `apply_func'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:57:in `block in process_queue'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:54:in `loop'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:54:in `process_queue'
/Users/cvx/.rubies/ruby-2.7.6/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:91:in `block (2 levels) in create_threads'
An error occurred while installing libv8 (8.4.255.0), and Bundler cannot continue.
In Gemfile:
mini_racer was resolved to 0.3.1, which depends on
libv8
Encountered an error running script/source-setup/bundler.
```
Updating it caused a different problem - a bug in bundler caused it to install both `linux` and `linux-musl` variants in the CI environment. (see: https://github.com/rubyjs/libv8-node/issues/5 and https://github.com/rubygems/rubygems/issues/3174)
This instead replaces `mini_racer` example with `loofah`. That gem depends on `nokogiri` which provides different binary variants, like `libv8`/`libv8-node` did.
But this one builds properly on macOS and does not provide `linux-musl` variant so it should not cause any issues on CI.
suggested by ljharb as an improvement by ignoring
package.json files that don't represent installed packages
this also moves the dependency_paths method to the
shared class to consolidate the functionality across
both source versions
This removes more custom logic from the bundler
source, and relies more on bundler internals to
the appropriate files
There are two significant changes here
1. Using ::Bundler.load after ::Bundler.reset!
reconfigures the local bundler runtime. This
forces bundler to pick up any changes to the
available platforms
2. Monkeypatching ::Bundler::Definition in order
to remove as much custom logic as possible. As
bundler changes, it's become increasingly brittle
to use custom behaviors outside of how Bundler
normally operates. This move is intended to focus
the source more on configuring Bundler to operate
over multiple directories similar to how Bundler
configures RubyGems to operate over multiple
projects.
and prepare for modules on always in 1.17
- turn off mods when setting up non-module fixture
- recreate most dependency tests for modules
- use modules by default for non-dependency tests