Skip to content

Commit

Permalink
Coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Sep 30, 2024
1 parent 8e7eff7 commit 3bf2f3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions lib/health_monitor.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# frozen_string_literal: true

# require external dependencies
require 'zeitwerk'
loader = Zeitwerk::Loader.for_gem
loader.setup

# load zeitwerk
Zeitwerk::Loader.for_gem.tap do |loader| # rubocop:disable Style/SymbolProc
loader.setup
end

module HealthMonitor
require 'health_monitor/engine' if defined?(Rails)
require_relative 'health_monitor/engine' if defined?(Rails)

STATUSES = {
ok: 'OK',
Expand Down
2 changes: 1 addition & 1 deletion lib/health_monitor/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def no_database
class_eval <<-METHOD, __FILE__, __LINE__ + 1
# frozen_string_literal: true
def #{provider_name} # def database
require "health_monitor/providers/#{provider_name}" # require "health_monitor/providers/database"
require_relative "providers/#{provider_name}" # require_relative "providers/database"
add_provider("HealthMonitor::Providers::#{klass}".constantize) # add_provider("HealthMonitor::Providers::Database".constantize)
end # end
METHOD
Expand Down

0 comments on commit 3bf2f3b

Please sign in to comment.