Skip to content

Commit

Permalink
Merge pull request #205 from jrafanie/zeitwerk
Browse files Browse the repository at this point in the history
Make rails engines zeitwerk autoloader friendly
  • Loading branch information
kbrock committed Apr 28, 2023
2 parents 3f9d8c8 + d883ad5 commit 377567a
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DataRollup < ApplicationRecord

extend ActiveSupport::Concern

Dir.glob(Pathname.new(File.dirname(__dir__)).join("showback/data_rollup/*")).each { |lib| include_concern lib.split("showback/data_rollup/")[1].split(".rb")[0].upcase }
Dir.glob(Pathname.new(File.dirname(__dir__)).join("showback/data_rollup/*")).each { |lib| include_concern lib.split("showback/data_rollup/")[1].split(".rb")[0].capitalize }

self.table_name = 'showback_data_rollups'

Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup/cpu.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManageIQ::Showback::DataRollup::CPU
module ManageIQ::Showback::DataRollup::Cpu
#
# Return the average acumulated with the new one
#
Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup/disk.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManageIQ::Showback::DataRollup::DISK
module ManageIQ::Showback::DataRollup::Disk
# for old chargeback integration
def disk_io_disk_usage_rate_average
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup/fixed.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManageIQ::Showback::DataRollup::FIXED
module ManageIQ::Showback::DataRollup::Fixed
def fixed_fixed_compute_1
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup/flavor.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManageIQ::Showback::DataRollup::FLAVOR
module ManageIQ::Showback::DataRollup::Flavor
#
# Return Number Ocurrences
#
Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup/mem.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManageIQ::Showback::DataRollup::MEM
module ManageIQ::Showback::DataRollup::Mem
#
# Return the average acumulated with the new one
#
Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup/metering.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManageIQ::Showback::DataRollup::METERING
module ManageIQ::Showback::DataRollup::Metering
# for old chargeback integration
def metering_metering_used_hours
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup/net.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManageIQ::Showback::DataRollup::NET
module ManageIQ::Showback::DataRollup::Net
# for old chargeback integration
def net_io_net_usage_rate_average
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/showback/data_rollup/storage.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManageIQ::Showback::DataRollup::STORAGE
module ManageIQ::Showback::DataRollup::Storage
# for old chargeback integration
def storage_derived_vm_used_disk_storage
end
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion spec/models/data_rollup/cpu_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe ManageIQ::Showback::DataRollup::CPU do
describe ManageIQ::Showback::DataRollup::Cpu do
let(:data_rollup) { FactoryBot.build(:data_rollup) }
let(:con_data_rollup) { FactoryBot.build(:data_rollup) }
context "CPU in vm" do
Expand Down
2 changes: 1 addition & 1 deletion spec/models/data_rollup/flavor_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe ManageIQ::Showback::DataRollup::FLAVOR do
describe ManageIQ::Showback::DataRollup::Flavor do
let(:data_rollup) { FactoryBot.build(:data_rollup) }
context "FLAVOR in vm" do
before(:each) do
Expand Down
2 changes: 1 addition & 1 deletion spec/models/data_rollup/mem_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe ManageIQ::Showback::DataRollup::MEM do
describe ManageIQ::Showback::DataRollup::Mem do
let(:data_rollup) { FactoryBot.build(:data_rollup) }
let(:con_data_rollup) { FactoryBot.build(:data_rollup) }
context "memory in vm" do
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
Dir[Rails.root.join("spec/shared/**/*.rb")].each { |f| require f }
Dir[File.join(__dir__, "support/**/*.rb")].each { |f| require f }

require "manageiq-consumption"
require "manageiq/consumption"

0 comments on commit 377567a

Please sign in to comment.