diff --git a/lib/foreman_azure_rm/engine.rb b/lib/foreman_azure_rm/engine.rb index caf5cef..3792fcc 100644 --- a/lib/foreman_azure_rm/engine.rb +++ b/lib/foreman_azure_rm/engine.rb @@ -4,12 +4,12 @@ class Engine < ::Rails::Engine #autoloading all files inside lib dir config.eager_load_paths += Dir["#{config.root}/lib"] - config.eager_load_paths += Dir["#{config.root}/app/models/concerns/foreman_azure_rm/vm_extensions/"] + config.eager_load_paths += Dir["#{config.root}/app/models/concerns/"] config.eager_load_paths += Dir["#{config.root}/app/helpers/"] initializer 'foreman_azure_rm.register_plugin', :before => :finisher_hook do Foreman::Plugin.register :foreman_azure_rm do - requires_foreman '>= 3.7' + requires_foreman '>= 3.13' register_gettext compute_resource ForemanAzureRm::AzureRm parameter_filter ComputeResource, :azure_vm, :tenant, :app_ident, :secret_key, :sub_id, :region, :cloud @@ -29,6 +29,14 @@ class Engine < ::Rails::Engine end end + initializer "foreman_azure_rm.zeitwerk" do + Rails.autoloaders.each do |loader| + loader.ignore( + ForemanAzureRm::Engine.root.join('lib/foreman_azure_rm/version.rb') + ) + end + end + config.to_prepare do require 'azure_mgmt_resources' require 'azure_mgmt_network'