Skip to content

Commit

Permalink
#230: Accuracy is failing on Windows due to unloaded rules
Browse files Browse the repository at this point in the history
Fixed #230
  • Loading branch information
dgroup committed Oct 3, 2020
1 parent 6c0c5df commit f85cc10
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/lazylead/task/accuracy/accuracy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def initialize(log = Log.new)
end

def run(sys, postman, opts)
require_rules
Dir[File.join(__dir__, "*.rb")].sort.each { |f| require f }
rules = opts.slice("rules", ",")
.map(&:constantize)
.map(&:new)
Expand All @@ -53,12 +53,6 @@ def run(sys, postman, opts)
.each(&:post)
postman.send opts.merge(tickets: raised) unless raised.empty?
end

# Load all ticket accuracy rules for future verification
def require_rules
rules = File.dirname(__FILE__)
$LOAD_PATH.unshift(rules) unless $LOAD_PATH.include?(rules)
end
end
end

Expand Down

0 comments on commit f85cc10

Please sign in to comment.