lib/dry/system/components/bootable.rb in dry-system-0.8.1 vs lib/dry/system/components/bootable.rb in dry-system-0.9.0

- old
+ new

@@ -1,8 +1,9 @@ require 'dry/system/lifecycle' require 'dry/system/settings' require 'dry/system/components/config' +require 'dry/system/constants' module Dry module System module Components # Bootable components can provide one or more objects and typically depend @@ -239,11 +240,11 @@ # @return [String] # # @api private def boot_file container_boot_files. - detect { |path| Pathname(path).basename('.rb').to_s == identifier.to_s } + detect { |path| Pathname(path).basename(RB_EXT).to_s == identifier.to_s } end # Return path to boot dir # # @return [String] @@ -257,10 +258,10 @@ # # @return [String] # # @api private def container_boot_files - Dir[container.boot_path.join('**/*.rb')] + Dir[container.boot_path.join("**/#{RB_GLOB}")] end private # Return lifecycle object used for this component