Skip to content

Commit c237bc0

Browse files
feat: Add Zeitwerk loader support (#355)
1 parent 00db43f commit c237bc0

37 files changed

+82
-87
lines changed

app/controllers/concerns/foreman_fog_proxmox/hosts_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module HostsController
2424
prepend Overrides
2525
end
2626
module Overrides
27-
include ForemanFogProxmox::ProxmoxVmNew
27+
include ForemanFogProxmox::ProxmoxVMNew
2828
# Clone the host
2929
def clone
3030
super

app/helpers/proxmox_vm_attrs_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
require 'foreman_fog_proxmox/hash_collection'
2525

2626
# Convert a foreman form server hash into a fog-proxmox server attributes hash
27-
module ProxmoxVmAttrsHelper
27+
module ProxmoxVMAttrsHelper
2828
def object_to_attributes_hash(vms, from_profile, start_checked)
2929
param_scope = from_profile ? "compute_attribute[vm_attrs]" : "host[compute_attributes]"
3030
vm_h = ActiveSupport::HashWithIndifferentAccess.new

app/helpers/proxmox_vm_cdrom_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
require 'foreman_fog_proxmox/hash_collection'
2424

2525
# Convert a foreman form server hash into a fog-proxmox server attributes hash
26-
module ProxmoxVmCdromHelper
26+
module ProxmoxVMCdromHelper
2727
def parse_server_cdrom(args)
2828
cdrom_media = args['cdrom'] if args.key?('cdrom')
2929
cdrom_image = args['volid'] if args.key?('volid')

app/helpers/proxmox_vm_cloudinit_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
require 'foreman_fog_proxmox/hash_collection'
2424

2525
# Convert a foreman form server hash into a fog-proxmox server attributes hash
26-
module ProxmoxVmCloudinitHelper
26+
module ProxmoxVMCloudinitHelper
2727
def parse_server_cloudinit(args)
2828
cloudinit_h = {}
2929
cloudinit = args['cloudinit']

app/helpers/proxmox_vm_config_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
require 'foreman_fog_proxmox/hash_collection'
2525

2626
# Convert a foreman form server hash into a fog-proxmox server attributes hash
27-
module ProxmoxVmConfigHelper
27+
module ProxmoxVMConfigHelper
2828
def object_to_config_hash(vm, type)
2929
vm_h = ActiveSupport::HashWithIndifferentAccess.new
3030
main_a = ['vmid', 'type']

app/helpers/proxmox_vm_helper.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
require 'fog/proxmox/helpers/nic_helper'
2222
require 'foreman_fog_proxmox/value'
2323

24-
module ProxmoxVmHelper
25-
include ProxmoxVmInterfacesHelper
26-
include ProxmoxVmVolumesHelper
27-
include ProxmoxVmConfigHelper
28-
include ProxmoxVmOsTemplateHelper
24+
module ProxmoxVMHelper
25+
include ProxmoxVMInterfacesHelper
26+
include ProxmoxVMVolumesHelper
27+
include ProxmoxVMConfigHelper
28+
include ProxmoxVMOsTemplateHelper
2929

3030
def vm_collection(type)
3131
collection = :servers

app/helpers/proxmox_vm_interfaces_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
require 'foreman_fog_proxmox/hash_collection'
2424

2525
# Convert a foreman form server hash into a fog-proxmox server attributes hash
26-
module ProxmoxVmInterfacesHelper
26+
module ProxmoxVMInterfacesHelper
2727
def parsed_typed_interfaces(args, type, parsed_vm)
2828
interfaces_to_add, interfaces_to_delete = parse_typed_interfaces(args, type)
2929
interfaces_to_add.each { |interface| parsed_vm = parsed_vm.merge(interface) }

app/helpers/proxmox_vm_os_template_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
require 'foreman_fog_proxmox/value'
2323
require 'foreman_fog_proxmox/hash_collection'
2424

25-
module ProxmoxVmOsTemplateHelper
25+
module ProxmoxVMOsTemplateHelper
2626
def ostemplate_keys
2727
['ostemplate_storage', 'ostemplate_file']
2828
end

app/helpers/proxmox_vm_uuid_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# You should have received a copy of the GNU General Public License
1818
# along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>.
1919

20-
module ProxmoxVmUuidHelper
20+
module ProxmoxVMUuidHelper
2121
UUID_REGEXP = /(?<cluster_id>\d+)_(?<vmid>\d+)/.freeze
2222
def extract(uuid, name)
2323
captures_h = uuid ? UUID_REGEXP.match(uuid.to_s) : { cluster_id: '', vmid: '' }

app/helpers/proxmox_vm_volumes_helper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
require 'foreman_fog_proxmox/hash_collection'
2424

2525
# Convert a foreman form server hash into a fog-proxmox server attributes hash
26-
module ProxmoxVmVolumesHelper
27-
include ProxmoxVmCdromHelper
28-
include ProxmoxVmCloudinitHelper
26+
module ProxmoxVMVolumesHelper
27+
include ProxmoxVMCdromHelper
28+
include ProxmoxVMCloudinitHelper
2929

3030
def add_disk_options(disk, args)
3131
options = ForemanFogProxmox::HashCollection.new_hash_reject_keys(args,

0 commit comments

Comments
 (0)