From cfd230dcaf458e6af54f58d843ba3b6a3132ad94 Mon Sep 17 00:00:00 2001 From: Russell Garner Date: Wed, 17 Apr 2019 08:33:10 +0100 Subject: [PATCH 1/2] Update bundler to 2.0.1 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 38ec6f0f9..5d0c249ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -466,4 +466,4 @@ RUBY VERSION ruby 2.5.5p157 BUNDLED WITH - 1.17.3 + 2.0.1 From d3cf2389708e7079788283ee382c129cff639f0b Mon Sep 17 00:00:00 2001 From: Russell Garner Date: Wed, 17 Apr 2019 08:42:41 +0100 Subject: [PATCH 2/2] Run brakeman in a separate process We were getting HAML errors; this is down to brakeman not being able to keep track of every possible dependency and needing to be run in its own process so as to not load the world (including HAML which is causing the problem in this instance) https://github.com/presidentbeef/brakeman/issues/1044 --- lib/tasks/brakeman.rake | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/tasks/brakeman.rake b/lib/tasks/brakeman.rake index 4b429fec1..9a5cc08be 100644 --- a/lib/tasks/brakeman.rake +++ b/lib/tasks/brakeman.rake @@ -2,14 +2,7 @@ if Rails.env.development? || Rails.env.test? namespace :brakeman do desc 'Run Brakeman' task :run do - require 'brakeman' - - Brakeman.run( - app_path: '.', - quiet: true, - pager: false, - print_report: true - ) + system("bundle exec brakeman --quiet --no-pager #{Rails.root}") end end end