logstash/spec/coverage_helper.rb
2015-11-16 19:34:45 -05:00

23 lines
625 B
Ruby

# encoding: utf-8
# Useful module to help loading all logstash content when
# running coverage analysis
module CoverageHelper
##
# Skip list used to avoid loading certain patterns within
# the logstash directories, this patterns are excluded because
# of potential problems or because they are going to be loaded
# in another way.
##
SKIP_LIST = Regexp.union([
/^lib\/bootstrap\/rspec.rb$/,
/^logstash-core\/lib\/logstash\/util\/prctl.rb$/
])
def self.eager_load
Dir.glob("{logstash-core{/,-event/},}lib/**/*.rb") do |file|
next if file =~ SKIP_LIST
require file
end
end
end