lib/vite_rails/engine.rb in vite_rails-1.0.12 vs lib/vite_rails/engine.rb in vite_rails-2.0.0

- old
+ new

@@ -2,39 +2,35 @@ require 'rails/railtie' class ViteRails::Engine < Rails::Engine initializer 'vite_rails.proxy' do |app| - app.middleware.insert_before 0, ViteRails::DevServerProxy, ssl_verify_none: true if ViteRails.run_proxy? + app.middleware.insert_before 0, ViteRuby::DevServerProxy, ssl_verify_none: true if ViteRuby.run_proxy? end initializer 'vite_rails.helper' do ActiveSupport.on_load(:action_controller) do - ActionController::Base.helper(ViteRails::Helper) + ActionController::Base.helper(ViteRails::TagHelpers) end ActiveSupport.on_load(:action_view) do - include ViteRails::Helper + include ViteRails::TagHelpers end end initializer 'vite_rails.logger' do config.after_initialize do - ViteRails.logger = if ::Rails.logger.respond_to?(:tagged) - ::Rails.logger - else - ActiveSupport::TaggedLogging.new(::Rails.logger) - end + ViteRuby.instance.logger = Rails.logger end end initializer 'vite_rails.bootstrap' do if defined?(Rails::Server) || defined?(Rails::Console) - ViteRails.bootstrap + ViteRuby.bootstrap if defined?(Spring) require 'spring/watcher' - Spring.after_fork { ViteRails.bootstrap } - Spring.watch(ViteRails.config.config_path) + Spring.after_fork { ViteRuby.bootstrap } + Spring.watch(ViteRuby.config.config_path) end end end end