luhnacy can be used to validate strings for Luhn compliance as well as generating valid or invalid strings for the purposes of testing
Rory McKinley
gem "luhnacy", "~> 0.2.0"