lib/hanami/config/load_paths.rb in hanami-0.8.0 vs lib/hanami/config/load_paths.rb in hanami-0.9.0

- old
+ new

@@ -1,27 +1,28 @@ -require 'hanami/utils/load_paths' +require 'hanami/utils' module Hanami module Config # Define the load paths where the application should load # # @since 0.1.0 # @api private class LoadPaths < Utils::LoadPaths - PATTERN = '**/*.rb'.freeze - - def load!(root) + def initialize(root) + super() @root = root + end + def load! each do |path| - Dir.glob(path.join(PATTERN)).each { |file| require file } + Utils.require!(path) end end protected + def realpath(path) @root.join(path).realpath end end end end -