lib/dry/system/plugins/bootsnap.rb in dry-system-0.12.0 vs lib/dry/system/plugins/bootsnap.rb in dry-system-0.13.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Dry
module System
module Plugins
module Bootsnap
DEFAULT_OPTIONS = {
@@ -26,15 +28,16 @@
# Set up bootsnap for faster booting
#
# @api public
def setup_bootsnap
return unless bootsnap_available?
+
::Bootsnap.setup(config.bootsnap.merge(cache_dir: root.join('tmp/cache').to_s))
end
# @api private
def bootsnap_available?
- RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.3.0" && RUBY_VERSION < "2.5.0"
+ RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '2.3.0' && RUBY_VERSION < '2.5.0'
end
end
end
end
end