Skip to content

Commit

Permalink
DEV: we amended core internals to allow for "demon/base"
Browse files Browse the repository at this point in the history
this avoids all this complex logic and a rename.
  • Loading branch information
SamSaffron committed Oct 2, 2019
1 parent 584f766 commit 4dc9acb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/demon.rb
@@ -1,14 +1,8 @@
# frozen_string_literal: true
#
require_dependency 'demon/base'

if Rails.autoloaders.main.class == Zeitwerk::Loader
require_dependency 'demon/demon_base'
else
require_dependency 'demon/base'
end

base_class = Rails.autoloaders.main.class == Zeitwerk::Loader ? Demon::DemonBase : Demon::Base

class DiscoursePrometheus::Demon < base_class
class DiscoursePrometheus::Demon < ::Demon::Base
def self.prefix
"prometheus-demon"
end
Expand Down

0 comments on commit 4dc9acb

Please sign in to comment.