From 266b935eff3c121d06f1baa4eecce59fcafb2b20 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 29 Jan 2024 17:45:53 +0100 Subject: [PATCH] precompile ignore `features` directories (cucumber) --- lib/bootsnap/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootsnap/cli.rb b/lib/bootsnap/cli.rb index f3f47a7..462aab2 100644 --- a/lib/bootsnap/cli.rb +++ b/lib/bootsnap/cli.rb @@ -64,7 +64,7 @@ def precompile_command(*sources) # So we look at the gem root. # Similarly, gems that include Rails engines generally file Ruby files in `app/`. # However some gems embed their tests, they're very unlikely to be loaded, so not worth precompiling. - gem_exclude = Regexp.union([exclude, "/spec/", "/test/"].compact) + gem_exclude = Regexp.union([exclude, "/spec/", "/test/", "/features/"].compact) gem_pattern = %r{^#{Regexp.escape(Bundler.bundle_path.to_s)}/?(?:bundler/)?gems/[^/]+} gem_paths = $LOAD_PATH.map { |p| p[gem_pattern] || p }.uniq