Vin Checker allow to validate if a VIN's "check code" is correct, decode the "make" and "model year" from it, and suggest valid VIN code.
To setup the dev env, run bundle install
To test the code, execute: bundle exec rspec
To lint the code, execute: bundle exec rubocop -a
There is a list of common "World manufacturer identifier" on config/common_wmis.json
, you can add/remove items to it.
To check some demonstration output, run: ruby demo.rb SOME-VIN-CODE-HERE
.
$ ruby demo.rb JN1DA31D63T505967
Check Digit: VALID
This looks like a VALID vin!
Decoded data:
make: Nissan
model_year: 2003
$ ruby demo.rb 1XPTD40X0JD456115
Provided VIN: 1XPTD40X0JD456115
Check Digit: INVALID
Suggested VIN(s):
* 1XPTD40X6JD456115