From 31a349e0db78f6a466a096065860688ea273b877 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Fri, 20 Jul 2018 13:58:17 +0200 Subject: Add bootsnap to development/test bundle and enable it if available This will enable bootsnap whenver the gem is available. --- Gemfile | 1 + Gemfile.lock | 4 ++++ Gemfile.rails5.lock | 4 ++++ config/boot.rb | 5 +++++ 4 files changed, 14 insertions(+) diff --git a/Gemfile b/Gemfile index 7eac9e6a7b3..0ad5df90c3c 100644 --- a/Gemfile +++ b/Gemfile @@ -323,6 +323,7 @@ group :development do end group :development, :test do + gem 'bootsnap', '~> 1.3' gem 'bullet', '~> 5.5.0', require: !!ENV['ENABLE_BULLET'] gem 'pry-byebug', '~> 3.4.1', platform: :mri gem 'pry-rails', '~> 0.3.4' diff --git a/Gemfile.lock b/Gemfile.lock index 6415f9e6132..1d9c75f154c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -87,6 +87,8 @@ GEM binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) blankslate (2.1.2.4) + bootsnap (1.3.1) + msgpack (~> 1.0) bootstrap_form (2.7.0) brakeman (4.2.1) browser (2.2.0) @@ -500,6 +502,7 @@ GEM mini_portile2 (2.3.0) minitest (5.7.0) mousetrap-rails (1.4.6) + msgpack (1.2.4) multi_json (1.13.1) multi_xml (0.6.0) multipart-post (2.0.0) @@ -986,6 +989,7 @@ DEPENDENCIES benchmark-ips (~> 2.3.0) better_errors (~> 2.1.0) binding_of_caller (~> 0.7.2) + bootsnap (~> 1.3) bootstrap_form (~> 2.7.0) brakeman (~> 4.2) browser (~> 2.2) diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock index 50ca0d5a729..2d12faa28d9 100644 --- a/Gemfile.rails5.lock +++ b/Gemfile.rails5.lock @@ -90,6 +90,8 @@ GEM binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) blankslate (2.1.2.4) + bootsnap (1.3.1) + msgpack (~> 1.0) bootstrap_form (2.7.0) brakeman (4.2.1) browser (2.2.0) @@ -503,6 +505,7 @@ GEM mini_portile2 (2.3.0) minitest (5.7.0) mousetrap-rails (1.4.6) + msgpack (1.2.4) multi_json (1.13.1) multi_xml (0.6.0) multipart-post (2.0.0) @@ -996,6 +999,7 @@ DEPENDENCIES benchmark-ips (~> 2.3.0) better_errors (~> 2.1.0) binding_of_caller (~> 0.7.2) + bootsnap (~> 1.3) bootstrap_form (~> 2.7.0) brakeman (~> 4.2) browser (~> 2.2) diff --git a/config/boot.rb b/config/boot.rb index 84f390f3228..655c54ddb84 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -9,3 +9,8 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__) # Set up gems listed in the Gemfile. require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) +begin + require 'bootsnap/setup' +rescue LoadError + # bootsnap is optional dependency, so if we don't have it it's fine +end -- cgit v1.2.1