lib/hanami/assets/static.rb in hanami-0.8.0 vs lib/hanami/assets/static.rb in hanami-0.9.0
- old
+ new
@@ -9,11 +9,11 @@
# Rack - Copyright (C) 2007 Christian Neukirchen
# Released under the MIT License
module Hanami
module Assets
- # Serve static assets in development enviroments (development, test).
+ # Serve static assets in development environments (development, test).
#
# While serving static assets is a role delegated in production to web
# servers (like Nginx), in development it's rare to use a web server.
# For this purpose Hanami enables this Rack middleware to serve static
# assets in development (and test) phase.
@@ -90,19 +90,13 @@
end
# @since 0.8.0
# @api private
def _sources_from_applications
- Hanami::Application.applications.each_with_object({}) do |application, result|
- config = _assets_configuration(application)
+ Hanami::Components.resolve('apps.assets.configurations')
+ Hanami::Components['apps.assets.configurations'].each_with_object({}) do |config, result|
result["#{config.prefix}/"] = config
end
- end
-
- # @since 0.8.0
- # @api private
- def _assets_configuration(application)
- application.configuration.namespace::Assets.configuration
end
end
end
end