Open cgunther opened 4 months ago
The changes introduce new configurations for Old Dominion Freight Line tracking numbers and add a Luhn algorithm validation method to spec_helper.rb
. Configurations include regex patterns, validation methods, and tracking URLs. The Luhn algorithm method is incorporated into the ChecksumValidations
module for enhanced validation processes.
Files | Change Summary |
---|---|
couriers/old_dominion.json |
Introduced configurations for Old Dominion Freight Line, including regex patterns and tracking URLs. |
spec/spec_helper.rb |
Added a validates_luhn? method in the ChecksumValidations module for Luhn algorithm validation. |
In code we trust, our paths aligned,
With regex true and Luhn refined,
Old Dominion’s track now set,
In digital realms, our goals are met.
🎉✨ Keep on coding, swift and bright,
We journey forth from day to night. 🌙🚀
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
I've been maintaining this for a while privately, but figured it was worth trying to upstream.
I'm not confident on the actual regex for the tracking numbers, as this is largely based just on some example tracking (pro) numbers I've seen. I've gradually had to tweak the regex to accommodate new tracking numbers.
One of the valid tracking numbers I included (78045768393) does match both Old Dominion and DHL, however DHL's website doesn't recognize the tracking number, so maybe DHL is too loose (or maybe it's a possible DHL number, they just haven't used it yet).
Summary by CodeRabbit
New Features
Enhancements