lib/rails/service/engine.rb in rails-service-0.1.0 vs lib/rails/service/engine.rb in rails-service-0.2.0
- old
+ new
@@ -8,13 +8,28 @@
class Engine < Rails::Engine
engine_name 'rails-service'
isolate_namespace Rails::Service
config.autoload_paths << File.expand_path('../../../', __FILE__)
- config.service = Rails::Service.config
+ # Serve static asssets for Admin UI.
+ config.serve_static_assets = true
+
+ config.before_configuration do
+ Rails::Service.initialize!
+ config.service = Rails::Service.config
+ end
+
+ config.to_prepare do
+ # TODO: Do config/manifest reloading here
+ end
+
initializer 'rails.service.lograge' do |app|
Rails::Service::Boot.lograge(app)
+ end
+
+ initializer 'rails.service.static_assets' do |app|
+ app.middleware.use(::ActionDispatch::Static, "#{root}/public")
end
end
end
end