Skip to content

Commit

Permalink
Introduce require directive to load custom checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
toydestroyer committed Sep 14, 2024
1 parent 191a81a commit 0fdeec1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/database_consistency/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def initialize(file_paths = DEFAULT_PATH)
end
extract_configurations(existing_paths)
end

load_custom_checkers
end

def debug?
Expand Down Expand Up @@ -123,5 +125,13 @@ def log_level
settings && settings['log_level']
end
end

def load_custom_checkers
return unless configuration.key?('require') && configuration['require'].is_a?(Array)

configuration['require'].each do |path|
require path
end
end
end
end

0 comments on commit 0fdeec1

Please sign in to comment.