lib/hanami/assets/configuration.rb in hanami-assets-1.2.0 vs lib/hanami/assets/configuration.rb in hanami-assets-1.3.0.beta1

- old
+ new

@@ -80,11 +80,11 @@ # @since 0.1.0 # @api private def self.for(base) # TODO: this implementation is similar to Hanami::Controller::Configuration consider to extract it into Hanami::Utils namespace = Utils::String.namespace(base) - framework = Utils::Class.load_from_pattern!("(#{namespace}|Hanami)::Assets") + framework = Utils::Class.load("#{namespace}::Assets") || Utils::Class.load!('Hanami::Assets') framework.configuration end # @since 0.4.0 # @api private @@ -380,9 +380,19 @@ # @since 0.3.0 # @api private def source(file) pathname = Pathname.new(file) pathname.absolute? ? pathname : find(file) + end + + # @since 1.3.0 + def base_directories + @base_directories ||= %w[ + stylesheets + javascripts + images + fonts + ] end # Find a file from sources # # @since 0.1.0