vindetta 0.25.0 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/default.yml +25 -0
- data/.ruby-version +1 -1
- data/CODE_OF_CONDUCT.md +76 -0
- data/Gemfile +2 -0
- data/Guardfile +2 -0
- data/README.md +0 -3
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/exe/vindetta +2 -0
- data/lib/vindetta/calculator.rb +9 -7
- data/lib/vindetta/cli.rb +2 -0
- data/lib/vindetta/decoder.rb +23 -8
- data/lib/vindetta/generator.rb +12 -13
- data/lib/vindetta/standard/iso3779.rb +19 -51
- data/lib/vindetta/standard/iso3779.yml +63 -0
- data/lib/vindetta/standard.rb +3 -1
- data/lib/vindetta/validator.rb +7 -11
- data/lib/vindetta/version.rb +3 -1
- data/lib/vindetta.rb +2 -1
- data/vindetta.gemspec +5 -3
- metadata +18 -12
- data/.travis.yml +0 -5
- data/lib/vindetta/data/wmi.yaml +0 -474
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 33c373cebada40316b3054b27fb1dca9638eb4872134dfc3706cc758432da386
|
4
|
+
data.tar.gz: 443e9f2026669a75d653bbb45b99519dce337d6914854bc77fc25b0772068691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44682949067e0067650672671ad8306fb1fe0db2f2d7882602010db1e9c99ca78a714602b7a9c856b52e853dfae87f4de04d59957abff9787e53d484681804d7
|
7
|
+
data.tar.gz: 37bae06ca5999c02533f64223d39b8821a8fd8322c9ed1d60939a1ea74df79fd063b801a90ac70cdae6aad414fca7623d97d96c79623a5001ba76029f0070a7d
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
name: Ruby
|
3
|
+
|
4
|
+
on:
|
5
|
+
push:
|
6
|
+
branches: [ master ]
|
7
|
+
pull_request:
|
8
|
+
branches: [ master ]
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
build:
|
12
|
+
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby 2.6
|
18
|
+
uses: actions/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: 2.6.x
|
21
|
+
- name: Build and test with Rake
|
22
|
+
run: |
|
23
|
+
gem install bundler
|
24
|
+
bundle install --jobs 4 --retry 3
|
25
|
+
bundle exec rake
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.3
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at kyle.decot@icloud.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/Gemfile
CHANGED
data/Guardfile
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# Vindetta
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/kyledecot/vindetta.svg?branch=master)](https://travis-ci.org/kyledecot/vindetta)
|
4
|
-
[![Code Climate](https://codeclimate.com/github/kyledecot/vindetta/badges/gpa.svg)](https://codeclimate.com/github/kyledecot/vindetta)
|
5
|
-
|
6
3
|
## Installation
|
7
4
|
|
8
5
|
Add this line to your application's Gemfile:
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/exe/vindetta
CHANGED
data/lib/vindetta/calculator.rb
CHANGED
@@ -1,25 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vindetta
|
2
4
|
class Calculator
|
3
5
|
InvalidCharacterError = Class.new(StandardError)
|
4
6
|
|
5
7
|
def self.check_digit(vin)
|
6
|
-
transliterator =
|
8
|
+
transliterator = lambda do |c|
|
7
9
|
index = "0123456789.ABCDEFGH..JKLMN.P.R..STUVWXYZ".chars.index(c)
|
8
10
|
|
9
11
|
raise InvalidCharacterError if index.nil?
|
10
12
|
|
11
|
-
|
13
|
+
index % 10
|
12
14
|
end
|
13
15
|
|
14
|
-
summer =
|
16
|
+
summer = lambda do |sum, (a, b)|
|
15
17
|
sum + (a * b)
|
16
18
|
end
|
17
19
|
|
18
20
|
sum = vin
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
.chars
|
22
|
+
.map(&transliterator)
|
23
|
+
.zip([8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2])
|
24
|
+
.reduce(0, &summer)
|
23
25
|
|
24
26
|
"0123456789X"[sum % 11]
|
25
27
|
end
|
data/lib/vindetta/cli.rb
CHANGED
data/lib/vindetta/decoder.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vindetta
|
2
4
|
class Decoder
|
5
|
+
attr_reader :standard
|
6
|
+
|
3
7
|
BASE_MODEL_YEAR = 1980
|
4
|
-
ALPHA = (
|
8
|
+
ALPHA = ("A".."Z").to_a
|
5
9
|
NUMERIC = ("0".."9").to_a
|
6
10
|
|
7
11
|
def initialize(standard)
|
@@ -9,19 +13,30 @@ module Vindetta
|
|
9
13
|
end
|
10
14
|
|
11
15
|
def vin(vin)
|
12
|
-
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
16
|
+
{
|
17
|
+
plant_code: vin[PLANT_CODE_INDEX],
|
18
|
+
wmi: vin[WMI_RANGE],
|
19
|
+
check_digit: vin[CHECK_DIGIT_INDEX],
|
20
|
+
production_number: vin[PRODUCTION_NUMBER_RANGE],
|
21
|
+
model_year: model_year(vin),
|
22
|
+
region: region(vin)
|
18
23
|
}
|
19
24
|
end
|
20
25
|
|
21
26
|
private
|
22
27
|
|
28
|
+
def region(vin)
|
29
|
+
character = vin[0]
|
30
|
+
position = standard.wmi.detect { |p| p["name"] == "region" }
|
31
|
+
|
32
|
+
position["mapping"][character]
|
33
|
+
end
|
34
|
+
|
23
35
|
def model_year(vin)
|
24
|
-
|
36
|
+
position = standard.vis.detect { |p| p["name"] === "model_year" }
|
37
|
+
characters = position["characters"]
|
38
|
+
|
39
|
+
index = characters.find_index { |c| c == vin[9] }
|
25
40
|
|
26
41
|
if ALPHA.include?(vin[6])
|
27
42
|
BASE_MODEL_YEAR + index + 30
|
data/lib/vindetta/generator.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vindetta
|
2
4
|
class Generator
|
3
5
|
attr_reader :standard
|
@@ -6,31 +8,28 @@ module Vindetta
|
|
6
8
|
@standard = standard
|
7
9
|
end
|
8
10
|
|
9
|
-
def vin(
|
10
|
-
"#{wmi}#{vds}#{vis}".tap do |vin|
|
11
|
+
def vin(_options = {})
|
12
|
+
String.new("#{wmi}#{vds}#{vis}").tap do |vin|
|
11
13
|
vin[CHECK_DIGIT_INDEX] = Calculator.check_digit(vin)
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
15
17
|
def wmi(_options = {})
|
16
|
-
|
17
|
-
path = File.expand_path("../data/wmi.yaml", __FILE__)
|
18
|
-
YAML.load_file(path)["wmi"].keys
|
19
|
-
end
|
20
|
-
|
21
|
-
"#{@wmis.sample}".rjust(standard.wmi.length, "9")
|
18
|
+
characters("wmi").map(&:sample).join
|
22
19
|
end
|
23
20
|
|
24
21
|
def vds(_options = {})
|
25
|
-
characters
|
26
|
-
|
27
|
-
characters.map(&:sample).join
|
22
|
+
characters("vds").map(&:sample).join
|
28
23
|
end
|
29
24
|
|
30
25
|
def vis(_options = {})
|
31
|
-
characters
|
26
|
+
characters("vis").map(&:sample).join
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
32
30
|
|
33
|
-
|
31
|
+
def characters(section)
|
32
|
+
standard.send(section).map { |p| p["characters"] }
|
34
33
|
end
|
35
34
|
end
|
36
35
|
end
|
@@ -1,65 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vindetta
|
2
4
|
module Standard
|
3
5
|
class ISO3779
|
4
|
-
LENGTH = 17
|
5
|
-
|
6
6
|
def self.wmi
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
@wmi ||= yml.fetch("wmi")
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.length
|
11
|
+
@length ||= yml.fetch("length")
|
10
12
|
end
|
11
13
|
|
12
14
|
def self.vds
|
13
|
-
@vds ||=
|
14
|
-
OpenStruct.new({
|
15
|
-
:characters => "0123456789ABCDEFGHJKLMNPRSTUVWXYZ".chars
|
16
|
-
}),
|
17
|
-
OpenStruct.new({
|
18
|
-
:characters => "0123456789ABCDEFGHJKLMNPRSTUVWXYZ".chars
|
19
|
-
}),
|
20
|
-
OpenStruct.new({
|
21
|
-
:characters => "0123456789ABCDEFGHJKLMNPRSTUVWXYZ".chars
|
22
|
-
}),
|
23
|
-
OpenStruct.new({
|
24
|
-
:characters => "0123456789ABCDEFGHJKLMNPRSTUVWXYZ".chars
|
25
|
-
}),
|
26
|
-
OpenStruct.new({
|
27
|
-
:characters => "0123456789ABCDEFGHJKLMNPRSTUVWXYZ".chars
|
28
|
-
}),
|
29
|
-
OpenStruct.new({
|
30
|
-
:characters => "0123456789ABCDEFGHJKLMNPRSTUVWXYZ".chars
|
31
|
-
})
|
32
|
-
]
|
15
|
+
@vds ||= yml.fetch("vds")
|
33
16
|
end
|
34
17
|
|
35
18
|
def self.vis
|
36
|
-
@vis ||=
|
37
|
-
OpenStruct.new({
|
38
|
-
:characters => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "V", "W", "X", "Y"]
|
39
|
-
}),
|
40
|
-
OpenStruct.new({
|
41
|
-
:characters => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
42
|
-
}),
|
43
|
-
OpenStruct.new({
|
44
|
-
:characters => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
45
|
-
}),
|
46
|
-
OpenStruct.new({
|
47
|
-
:characters => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
48
|
-
}),
|
49
|
-
OpenStruct.new({
|
50
|
-
:characters => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
51
|
-
}),
|
52
|
-
OpenStruct.new({
|
53
|
-
:characters => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
54
|
-
}),
|
55
|
-
OpenStruct.new({
|
56
|
-
:characters => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
57
|
-
}),
|
58
|
-
OpenStruct.new({
|
59
|
-
:characters => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
60
|
-
})
|
61
|
-
]
|
19
|
+
@vis ||= yml.fetch("vis")
|
62
20
|
end
|
21
|
+
|
22
|
+
def self.yml
|
23
|
+
@yml ||= begin
|
24
|
+
File.open(File.expand_path("iso3779.yml", __dir__)) do |file|
|
25
|
+
YAML.load_file(file)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
private_class_method :yml
|
63
31
|
end
|
64
32
|
end
|
65
33
|
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
length: 17
|
3
|
+
|
4
|
+
wmi:
|
5
|
+
- name: region
|
6
|
+
characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
7
|
+
mapping:
|
8
|
+
"A": Africa
|
9
|
+
"B": Africa
|
10
|
+
"C": Africa
|
11
|
+
"D": Africa
|
12
|
+
"E": Africa
|
13
|
+
"F": Africa
|
14
|
+
"G": Africa
|
15
|
+
"H": Africa
|
16
|
+
"J": Asia
|
17
|
+
"K": Asia
|
18
|
+
"L": Asia
|
19
|
+
"M": Asia
|
20
|
+
"N": Asia
|
21
|
+
"P": Asia
|
22
|
+
"R": Asia
|
23
|
+
"S": Europe
|
24
|
+
"T": Europe
|
25
|
+
"U": Europe
|
26
|
+
"V": Europe
|
27
|
+
"W": Europe
|
28
|
+
"X": Europe
|
29
|
+
"Y": Europe
|
30
|
+
"Z": Europe
|
31
|
+
"1": North America
|
32
|
+
"2": North America
|
33
|
+
"3": North America
|
34
|
+
"4": North America
|
35
|
+
"5": South America
|
36
|
+
"6": Oceania
|
37
|
+
"7": Oceania
|
38
|
+
"8": South America
|
39
|
+
"9": South America
|
40
|
+
"0": South America
|
41
|
+
- name: country
|
42
|
+
characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
43
|
+
- name: manufacturer
|
44
|
+
characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
45
|
+
|
46
|
+
vds:
|
47
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
48
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
49
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
50
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
51
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
52
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
53
|
+
vis:
|
54
|
+
-
|
55
|
+
name: model_year
|
56
|
+
characters: ["A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "V", "W", "X", "Y", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
57
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
58
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
59
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
60
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
61
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
62
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
63
|
+
- characters: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
data/lib/vindetta/standard.rb
CHANGED
data/lib/vindetta/validator.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Vindetta
|
2
4
|
class Validator
|
3
5
|
attr_reader :standard
|
@@ -7,29 +9,23 @@ module Vindetta
|
|
7
9
|
end
|
8
10
|
|
9
11
|
def vin(vin)
|
10
|
-
return false unless vin.length == standard
|
12
|
+
return false unless vin.length == standard.length
|
11
13
|
|
12
14
|
Calculator.check_digit(vin) == Decoder.new(Vindetta::Standard::ISO3779).vin(vin)[:check_digit]
|
13
15
|
rescue Calculator::InvalidCharacterError
|
14
|
-
|
16
|
+
false
|
15
17
|
end
|
16
18
|
|
17
19
|
def wmi(wmi)
|
18
|
-
|
19
|
-
|
20
|
-
true
|
20
|
+
wmi.length == standard.wmi.length
|
21
21
|
end
|
22
22
|
|
23
23
|
def vds(vds)
|
24
|
-
|
25
|
-
|
26
|
-
true
|
24
|
+
vds.length == standard.vds.length
|
27
25
|
end
|
28
26
|
|
29
27
|
def vis(vis)
|
30
|
-
|
31
|
-
|
32
|
-
true
|
28
|
+
vis.length == standard.vis.length
|
33
29
|
end
|
34
30
|
end
|
35
31
|
end
|
data/lib/vindetta/version.rb
CHANGED
data/lib/vindetta.rb
CHANGED
data/vindetta.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require "vindetta/version"
|
4
6
|
|
@@ -21,9 +23,9 @@ Gem::Specification.new do |spec|
|
|
21
23
|
spec.require_paths = ["lib"]
|
22
24
|
|
23
25
|
spec.add_dependency "gli", "~> 2.16"
|
24
|
-
spec.add_dependency "i18n", "
|
26
|
+
spec.add_dependency "i18n", "> 0.8", "<2"
|
25
27
|
|
26
|
-
spec.add_development_dependency "bundler", "~> 1
|
28
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
27
29
|
spec.add_development_dependency "guard-rspec", "~> 4.7.3"
|
28
30
|
spec.add_development_dependency "pry", "~> 0.11.3"
|
29
31
|
spec.add_development_dependency "rake", "~> 12.3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vindetta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Decot
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|
@@ -28,30 +28,36 @@ dependencies:
|
|
28
28
|
name: i18n
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.8'
|
34
|
+
- - "<"
|
32
35
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
36
|
+
version: '2'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.8'
|
44
|
+
- - "<"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: '2'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: bundler
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1
|
53
|
+
version: '2.1'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1
|
60
|
+
version: '2.1'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: guard-rspec
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,12 +150,13 @@ executables:
|
|
144
150
|
extensions: []
|
145
151
|
extra_rdoc_files: []
|
146
152
|
files:
|
153
|
+
- ".github/workflows/default.yml"
|
147
154
|
- ".gitignore"
|
148
155
|
- ".rspec"
|
149
156
|
- ".rubocop.yml"
|
150
157
|
- ".ruby-gemset"
|
151
158
|
- ".ruby-version"
|
152
|
-
-
|
159
|
+
- CODE_OF_CONDUCT.md
|
153
160
|
- Gemfile
|
154
161
|
- Guardfile
|
155
162
|
- LICENSE.txt
|
@@ -161,12 +168,12 @@ files:
|
|
161
168
|
- lib/vindetta.rb
|
162
169
|
- lib/vindetta/calculator.rb
|
163
170
|
- lib/vindetta/cli.rb
|
164
|
-
- lib/vindetta/data/wmi.yaml
|
165
171
|
- lib/vindetta/decoder.rb
|
166
172
|
- lib/vindetta/generator.rb
|
167
173
|
- lib/vindetta/locale/en.yml
|
168
174
|
- lib/vindetta/standard.rb
|
169
175
|
- lib/vindetta/standard/iso3779.rb
|
176
|
+
- lib/vindetta/standard/iso3779.yml
|
170
177
|
- lib/vindetta/validator.rb
|
171
178
|
- lib/vindetta/version.rb
|
172
179
|
- vindetta.gemspec
|
@@ -189,8 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
196
|
- !ruby/object:Gem::Version
|
190
197
|
version: '0'
|
191
198
|
requirements: []
|
192
|
-
|
193
|
-
rubygems_version: 2.6.11
|
199
|
+
rubygems_version: 3.0.3
|
194
200
|
signing_key:
|
195
201
|
specification_version: 4
|
196
202
|
summary: Ruby gem for generating VINs
|
data/.travis.yml
DELETED
data/lib/vindetta/data/wmi.yaml
DELETED
@@ -1,474 +0,0 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
wmi:
|
4
|
-
AAV: Volkswagen South Africa
|
5
|
-
AC5: Hyundai South Africa
|
6
|
-
ADD: Hyundai South Africa
|
7
|
-
AFA: Ford South Africa
|
8
|
-
AHT: Toyota South Africa
|
9
|
-
JA3: Mitsubishi
|
10
|
-
JA4: Mitsubishi
|
11
|
-
JA: Isuzu
|
12
|
-
JD: Daihatsu
|
13
|
-
JF: Fuji Heavy Industries (Subaru)
|
14
|
-
JH: Honda
|
15
|
-
JK: Kawasaki (motorcycles)
|
16
|
-
JL5: Mitsubishi Fuso
|
17
|
-
JMB: Mitsubishi Motors
|
18
|
-
JMY: Mitsubishi Motors
|
19
|
-
JMZ: Mazda
|
20
|
-
JN: Nissan
|
21
|
-
JS: Suzuki
|
22
|
-
JT: Toyota
|
23
|
-
JY: Yamaha (motorcycles)
|
24
|
-
KL: Daewoo General Motors South Korea
|
25
|
-
KM: Hyundai
|
26
|
-
KMY: Daelim (motorcycles)
|
27
|
-
KM1: Hyosung (motorcycles)
|
28
|
-
KN: Kia
|
29
|
-
KNM: Renault Samsung
|
30
|
-
KPA: SsangYong
|
31
|
-
KPT: SsangYong
|
32
|
-
LAN: Changzhou Yamasaki Motorcycle
|
33
|
-
LBB: Zhejiang Qianjiang Motorcycle (Keeway/Generic)
|
34
|
-
LBE: Beijing Hyundai
|
35
|
-
LBM: Zongshen Piaggio
|
36
|
-
LBP: Chongqing Jainshe Yamaha (motorcycles)
|
37
|
-
LB2: Geely Motorcycles
|
38
|
-
LCE: Hangzhou Chunfeng Motorcycles (CFMOTO)
|
39
|
-
LDC: Dong Feng Peugeot Citroen (DPCA), China
|
40
|
-
LDD: Dandong Huanghai Automobile
|
41
|
-
LDN: SouEast Motor
|
42
|
-
LDY: Zhongtong Coach, China
|
43
|
-
LET: Jiangling-Isuzu Motors, China
|
44
|
-
LE4: Beijing Benz, China
|
45
|
-
LFB: FAW, China (busses)
|
46
|
-
LFG: Taizhou Chuanl Motorcycle Manufacturing
|
47
|
-
LFP: FAW, China (passenger vehicles)
|
48
|
-
LFT: FAW, China (trailers)
|
49
|
-
LFV: FAW-Volkswagen, China
|
50
|
-
LFW: FAW JieFang, China
|
51
|
-
LFY: Changshu Light Motorcycle Factory
|
52
|
-
LGB: Dong Feng (DFM), China
|
53
|
-
LGH: Qoros (formerly Dong Feng (DFM)), China
|
54
|
-
LGX: BYD Auto, China
|
55
|
-
LHB: Beijing Automotive Industry Holding
|
56
|
-
LH1: FAW-Haima, China
|
57
|
-
LJC: JAC, China
|
58
|
-
LJ1: JAC, China
|
59
|
-
LKL: Suzhou King Long, China
|
60
|
-
LL6: Hunan Changfeng Manufacture Joint-Stock
|
61
|
-
LL8: Linhai (ATV)
|
62
|
-
LMC: Suzuki Hong Kong (motorcycles)
|
63
|
-
LPR: Yamaha Hong Kong (motorcycles)
|
64
|
-
LSG: Shanghai General Motors, China
|
65
|
-
LSJ: MG Motor UK Limited - SAIC Motor, Shanghai, China
|
66
|
-
LSV: Shanghai Volkswagen, China
|
67
|
-
LSY: Brilliance Zhonghua
|
68
|
-
LTV: Toyota Tian Jin
|
69
|
-
LUC: Guangqi Honda, China
|
70
|
-
LVS: Ford Chang An
|
71
|
-
LVV: Chery, China
|
72
|
-
LVZ: Dong Feng Sokon Motor Company (DFSK)
|
73
|
-
LZM: MAN China
|
74
|
-
LZE: Isuzu Guangzhou, China
|
75
|
-
LZG: Shaanxi Automobile Group, China
|
76
|
-
LZP: Zhongshan Guochi Motorcycle (Baotian)
|
77
|
-
LZY: Yutong Zhengzhou, China
|
78
|
-
LZZ: Chongqing Shuangzing Mech & Elec (Howo)
|
79
|
-
L4B: Xingyue Group (motorcycles)
|
80
|
-
L5C: KangDi (ATV)
|
81
|
-
L5K: Zhejiang Yongkang Easy Vehicle
|
82
|
-
L5N: Zhejiang Taotao, China (ATV & motorcycles)
|
83
|
-
L5Y: Merato Motorcycle Taizhou Zhongneng
|
84
|
-
L85: Zhejiang Yongkang Huabao Electric Appliance
|
85
|
-
L8X: Zhejiang Summit Huawin Motorcycle
|
86
|
-
MAB: Mahindra & Mahindra
|
87
|
-
MAC: Mahindra & Mahindra
|
88
|
-
MAJ: Ford India
|
89
|
-
MAK: Honda Siel Cars India
|
90
|
-
MAL: Hyundai
|
91
|
-
MAT: Tata Motors
|
92
|
-
MA1: Mahindra & Mahindra
|
93
|
-
MA3: Suzuki India (Maruti)
|
94
|
-
MA6: GM India
|
95
|
-
MA7: Mitsubishi India (formerly Honda)
|
96
|
-
MBH: Suzuki India (Maruti)
|
97
|
-
MBJ: Toyota India
|
98
|
-
MBR: Mercedes-Benz India
|
99
|
-
MB1: Ashok Leyland
|
100
|
-
MCA: Fiat India
|
101
|
-
MCB: GM India
|
102
|
-
MC2: Volvo Eicher commercial vehicles limited.
|
103
|
-
MDH: Nissan India
|
104
|
-
MD2: Bajaj Auto
|
105
|
-
MEE: Renault India
|
106
|
-
MEX: Volkswagen India
|
107
|
-
MHF: Toyota Indonesia
|
108
|
-
MHR: Honda Indonesia
|
109
|
-
MLC: Suzuki Thailand
|
110
|
-
MLH: Honda Thailand
|
111
|
-
MMB: Mitsubishi Thailand
|
112
|
-
MMC: Mitsubishi Thailand
|
113
|
-
MMM: Chevrolet Thailand
|
114
|
-
MMT: Mitsubishi Thailand
|
115
|
-
MM8: Mazda Thailand
|
116
|
-
MNB: Ford Thailand
|
117
|
-
MNT: Nissan Thailand
|
118
|
-
MPA: Isuzu Thailand
|
119
|
-
MP1: Isuzu Thailand
|
120
|
-
MRH: Honda Thailand
|
121
|
-
MR0: Toyota Thailand
|
122
|
-
NLA: Honda Türkiye
|
123
|
-
NLE: Mercedes-Benz Türk Truck
|
124
|
-
NLH: Hyundai Assan
|
125
|
-
NLT: TEMSA
|
126
|
-
NMB: Mercedes-Benz Türk Buses
|
127
|
-
NMC: BMC
|
128
|
-
NM0: Ford Turkey
|
129
|
-
NM4: Tofaş Türk
|
130
|
-
NMT: Toyota Türkiye
|
131
|
-
NNA: Isuzu Turkey
|
132
|
-
PE1: Ford Phillipines
|
133
|
-
PE3: Mazda Phillipines
|
134
|
-
PL1: Proton, Malaysia
|
135
|
-
PNA: NAZA, Malaysia (Peugeot)
|
136
|
-
RA1: Steyr Trucks International FZE, UAE
|
137
|
-
RFB: Kymco, Taiwan
|
138
|
-
RFG: Sanyang SYM, Taiwan
|
139
|
-
RFL: Adly, Taiwan
|
140
|
-
RFT: CPI, Taiwan
|
141
|
-
RF3: Aeon Motor, Taiwan
|
142
|
-
SAL: Land Rover
|
143
|
-
SAJ: Jaguar
|
144
|
-
SAR: Rover
|
145
|
-
SB1: Toyota UK
|
146
|
-
SBM: McLaren
|
147
|
-
SCA: Rolls Royce
|
148
|
-
SCB: Bentley
|
149
|
-
SCC: Lotus Cars
|
150
|
-
SCE: DeLorean Motor Cars N. Ireland (UK)
|
151
|
-
SCF: Aston
|
152
|
-
SDB: Peugeot UK (formerly Talbot)
|
153
|
-
SED: General Motors Luton Plant
|
154
|
-
SEY: LDV
|
155
|
-
SFA: Ford UK
|
156
|
-
SFD: Alexander Dennis UK
|
157
|
-
SHH: Honda UK
|
158
|
-
SHS: Honda UK
|
159
|
-
SJN: Nissan UK
|
160
|
-
SKF: Vauxhall
|
161
|
-
SLP: JCB Research UK
|
162
|
-
SMT: Triumph Motorcycles
|
163
|
-
SUF: Fiat Auto Poland
|
164
|
-
SUL: FSC (Poland)
|
165
|
-
SUP: FSO-Daewoo (Poland)
|
166
|
-
SUU: Solaris Bus & Coach (Poland)
|
167
|
-
TCC: Micro Compact Car AG (smart 1998-1999)
|
168
|
-
TDM: QUANTYA Swiss Electric Movement (Switzerland)
|
169
|
-
TK9: SOR buses (Czech Republic)
|
170
|
-
TMA: Hyundai Motor Manufacturing Czech
|
171
|
-
TMB: Škoda (Czech Republic)
|
172
|
-
TMK: Karosa (Czech Republic)
|
173
|
-
TMP: Škoda trolleybuses (Czech Republic)
|
174
|
-
TMT: Tatra (Czech Republic)
|
175
|
-
TM9: Škoda trolleybuses (Czech Republic)
|
176
|
-
TNE: TAZ
|
177
|
-
TN9: Karosa (Czech Republic)
|
178
|
-
TRA: Ikarus Bus
|
179
|
-
TRU: Audi Hungary
|
180
|
-
TSE: Ikarus Egyedi Autobuszgyar, (Hungary)
|
181
|
-
TSM: Suzuki Hungary
|
182
|
-
TW1: Toyota Caetano Portugal
|
183
|
-
TYA: Mitsubishi Trucks Portugal
|
184
|
-
TYB: Mitsubishi Trucks Portugal
|
185
|
-
UU1: Renault Dacia, (Romania)
|
186
|
-
UU3: ARO
|
187
|
-
UU6: Daewoo Romania
|
188
|
-
U5Y: Kia Motors Slovakia
|
189
|
-
U6Y: Kia Motors Slovakia
|
190
|
-
VAG: Magna Steyr Puch
|
191
|
-
VAN: MAN Austria
|
192
|
-
VBK: KTM (Motorcycles)
|
193
|
-
VF1: Renault
|
194
|
-
VF2: Renault
|
195
|
-
VF3: Peugeot
|
196
|
-
VF4: Talbot
|
197
|
-
VF6: Renault (Trucks & Buses)
|
198
|
-
VF7: Citroën
|
199
|
-
VF8: Matra
|
200
|
-
VF9: Bugatti
|
201
|
-
795: Bugatti
|
202
|
-
VG5: MBK (motorcycles)
|
203
|
-
VLU: Scania France
|
204
|
-
VN1: SOVAB (France)
|
205
|
-
VNE: Irisbus (France)
|
206
|
-
VNK: Toyota France
|
207
|
-
VNV: Renault-Nissan
|
208
|
-
VSA: Mercedes-Benz Spain
|
209
|
-
VSE: Suzuki Spain (Santana Motors)
|
210
|
-
VSK: Nissan Spain
|
211
|
-
VSS: SEAT
|
212
|
-
VSX: Opel Spain
|
213
|
-
VS6: Ford Spain
|
214
|
-
VS7: Citroën Spain
|
215
|
-
VS9: Carrocerias Ayats (Spain)
|
216
|
-
VTH: Derbi (motorcycles)
|
217
|
-
VTL: Yamaha Spain (motorcycles)
|
218
|
-
VTT: Suzuki Spain (motorcycles)
|
219
|
-
VV9: TAURO Spain
|
220
|
-
VWA: Nissan Spain
|
221
|
-
VWV: Volkswagen Spain
|
222
|
-
VX1: Zastava / Yugo Serbia
|
223
|
-
WAG: Neoplan
|
224
|
-
WAU: Audi
|
225
|
-
WA1: Audi SUV
|
226
|
-
WBA: BMW
|
227
|
-
WBS: BMW M
|
228
|
-
WBY: BMW
|
229
|
-
WDA: Daimler
|
230
|
-
WDB: Mercedes-Benz
|
231
|
-
WDC: DaimlerChrysler
|
232
|
-
WDD: Mercedes-Benz
|
233
|
-
WDF: Mercedes-Benz (commercial vehicles)
|
234
|
-
WEB: Evobus GmbH (Mercedes-Bus)
|
235
|
-
WJM: Iveco Magirus
|
236
|
-
WF0: Ford Germany
|
237
|
-
WKK: Kässbohrer/Setra
|
238
|
-
WMA: MAN Germany
|
239
|
-
WME: smart
|
240
|
-
WMW: MINI
|
241
|
-
WMX: Mercedes-AMG
|
242
|
-
WP0: Porsche
|
243
|
-
WP1: Porsche SUV
|
244
|
-
W0L: Opel
|
245
|
-
W0V: Opel
|
246
|
-
WUA: quattro GmbH
|
247
|
-
WVG: Volkswagen MPV/SUV
|
248
|
-
WVW: Volkswagen
|
249
|
-
WV1: Volkswagen Commercial Vehicles
|
250
|
-
WV2: Volkswagen Bus/Van
|
251
|
-
WV3: Volkswagen Trucks
|
252
|
-
XLB: Volvo (NedCar)
|
253
|
-
XLE: Scania Netherlands
|
254
|
-
XLR: DAF (trucks)
|
255
|
-
XL9: Spyker
|
256
|
-
363: Spyker
|
257
|
-
XMC: Mitsubishi (NedCar)
|
258
|
-
XTA: Lada/AvtoVAZ (Russia)
|
259
|
-
XTC: KAMAZ (Russia)
|
260
|
-
XTH: GAZ (Russia)
|
261
|
-
XTT: UAZ/Sollers (Russia)
|
262
|
-
XTY: LiAZ (Russia)
|
263
|
-
XUF: General Motors Russia
|
264
|
-
XUU: AvtoTor (Russia, General Motors SKD)
|
265
|
-
XW8: Volkswagen Group Russia
|
266
|
-
XWB: UZ-Daewoo (Uzbekistan)
|
267
|
-
XWE: AvtoTor (Russia, Hyundai-Kia SKD)
|
268
|
-
X1M: PAZ (Russia)
|
269
|
-
X4X: AvtoTor (Russia, BMW SKD)
|
270
|
-
X7L: Renault AvtoFramos (Russia)
|
271
|
-
X7M: Hyundai TagAZ (Russia)
|
272
|
-
YBW: Volkswagen Belgium
|
273
|
-
YB1: Volvo Trucks Belgium
|
274
|
-
YCM: Mazda Belgium
|
275
|
-
YE2: Van Hool (buses)
|
276
|
-
YH2: BRP Finland (Lynx snowmobiles)
|
277
|
-
YK1: Saab-Valmet Finland
|
278
|
-
YS2: Scania AB
|
279
|
-
YS3: Saab
|
280
|
-
YS4: Scania Bus
|
281
|
-
YTN: Saab NEVS
|
282
|
-
YT9: Koenigsegg
|
283
|
-
007: Koenigsegg
|
284
|
-
YT9: Carvia
|
285
|
-
034: Carvia
|
286
|
-
YU7: Husaberg (motorcycles)
|
287
|
-
YV1: Volvo Cars
|
288
|
-
YV4: Volvo Cars
|
289
|
-
YV2: Volvo Trucks
|
290
|
-
YV3: Volvo Buses
|
291
|
-
Y3M: MAZ (Belarus)
|
292
|
-
Y6D: Zaporozhets/AvtoZAZ (Ukraine)
|
293
|
-
ZAA: Autobianchi
|
294
|
-
ZAM: Maserati
|
295
|
-
ZAP: Piaggio/Vespa/Gilera
|
296
|
-
ZAR: Alfa Romeo
|
297
|
-
ZBN: Benelli
|
298
|
-
ZCG: Cagiva SpA / MV Agusta
|
299
|
-
ZCF: Iveco
|
300
|
-
ZDM: Ducati Motor Holdings SpA
|
301
|
-
ZDF: Ferrari Dino
|
302
|
-
ZD0: Yamaha Italy
|
303
|
-
ZD3: Beta Motor
|
304
|
-
ZD4: Aprilia
|
305
|
-
ZFA: Fiat
|
306
|
-
ZFC: Fiat V.I.
|
307
|
-
ZFF: Ferrari
|
308
|
-
ZGU: Moto Guzzi
|
309
|
-
ZHW: Lamborghini
|
310
|
-
ZJM: Malaguti
|
311
|
-
ZJN: Innocenti
|
312
|
-
ZKH: Husqvarna Motorcycles Italy
|
313
|
-
ZLA: Lancia
|
314
|
-
ZOM: OM
|
315
|
-
Z8M: Marussia (Russia)
|
316
|
-
1B3: Dodge
|
317
|
-
1C3: Chrysler
|
318
|
-
1C6: Chrysler
|
319
|
-
1D3: Dodge
|
320
|
-
1FA: Ford Motor Company
|
321
|
-
1FB: Ford Motor Company
|
322
|
-
1FC: Ford Motor Company
|
323
|
-
1FD: Ford Motor Company
|
324
|
-
1FM: Ford Motor Company
|
325
|
-
1FT: Ford Motor Company
|
326
|
-
1FU: Freightliner
|
327
|
-
1FV: Freightliner
|
328
|
-
1F9: FWD Corp.
|
329
|
-
1G: General Motors USA
|
330
|
-
1GC: Chevrolet Truck USA
|
331
|
-
1GT: GMC Truck USA
|
332
|
-
1G1: Chevrolet USA
|
333
|
-
1G2: Pontiac USA
|
334
|
-
1G3: Oldsmobile USA
|
335
|
-
1G4: Buick USA
|
336
|
-
1G6: Cadillac USA
|
337
|
-
1G8: Saturn USA
|
338
|
-
1GM: Pontiac USA
|
339
|
-
1GY: Cadillac USA
|
340
|
-
1H: Honda USA
|
341
|
-
1HD: Harley-Davidson
|
342
|
-
1J4: Jeep
|
343
|
-
1L: Lincoln USA
|
344
|
-
1ME: Mercury USA
|
345
|
-
1M1: Mack Truck USA
|
346
|
-
1M2: Mack Truck USA
|
347
|
-
1M3: Mack Truck USA
|
348
|
-
1M4: Mack Truck USA
|
349
|
-
1M9: Mynatt Truck & Equipment
|
350
|
-
1N: Nissan USA
|
351
|
-
1NX: NUMMI USA
|
352
|
-
1P3: Plymouth USA
|
353
|
-
1R9: Roadrunner Hay Squeeze USA
|
354
|
-
1VW: Volkswagen USA
|
355
|
-
1XK: Kenworth USA
|
356
|
-
1XP: Peterbilt USA
|
357
|
-
1YV: Mazda USA (AutoAlliance International)
|
358
|
-
1ZV: Ford (AutoAlliance International)
|
359
|
-
2A4: Chrysler Canada
|
360
|
-
2BP: Bombardier Recreational Products
|
361
|
-
2B3: Dodge Canada
|
362
|
-
2B7: Dodge Canada
|
363
|
-
2C3: Chrysler Canada
|
364
|
-
2CN: CAMI
|
365
|
-
2D3: Dodge Canada
|
366
|
-
2FA: Ford Motor Company Canada
|
367
|
-
2FB: Ford Motor Company Canada
|
368
|
-
2FC: Ford Motor Company Canada
|
369
|
-
2FM: Ford Motor Company Canada
|
370
|
-
2FT: Ford Motor Company Canada
|
371
|
-
2FU: Freightliner
|
372
|
-
2FV: Freightliner
|
373
|
-
2FZ: Sterling
|
374
|
-
2G: General Motors Canada
|
375
|
-
2G1: Chevrolet Canada
|
376
|
-
2G2: Pontiac Canada
|
377
|
-
2G3: Oldsmobile Canada
|
378
|
-
2G4: Buick Canada
|
379
|
-
2HG: Honda Canada
|
380
|
-
2HK: Honda Canada
|
381
|
-
2HJ: Honda Canada
|
382
|
-
2HM: Hyundai Canada
|
383
|
-
2M: Mercury
|
384
|
-
2NV: Nova Bus Canada
|
385
|
-
2P3: Plymouth Canada
|
386
|
-
2T: Toyota Canada
|
387
|
-
2V4: Volkswagen Canada
|
388
|
-
2V8: Volkswagen Canada
|
389
|
-
2WK: Western Star
|
390
|
-
2WL: Western Star
|
391
|
-
2WM: Western Star
|
392
|
-
3C4: Chrysler Mexico
|
393
|
-
3D3: Dodge Mexico
|
394
|
-
3FA: Ford Motor Company Mexico
|
395
|
-
3FE: Ford Motor Company Mexico
|
396
|
-
3G: General Motors Mexico
|
397
|
-
3H: Honda Mexico
|
398
|
-
3JB: BRP Mexico (all-terrain vehicles)
|
399
|
-
3MD: Mazda Mexico
|
400
|
-
3MZ: Mazda Mexico
|
401
|
-
3N: Nissan Mexico
|
402
|
-
3P3: Plymouth Mexico
|
403
|
-
3VW: Volkswagen Mexico
|
404
|
-
4F: Mazda USA
|
405
|
-
4JG: Mercedes-Benz USA
|
406
|
-
4M: Mercury
|
407
|
-
4RK: Nova Bus USA
|
408
|
-
4S: Subaru-Isuzu Automotive
|
409
|
-
4T: Toyota
|
410
|
-
4T9: Lumen Motors
|
411
|
-
4UF: Arctic Cat Inc.
|
412
|
-
4US: BMW USA
|
413
|
-
4UZ: Frt-Thomas Bus
|
414
|
-
4V1: Volvo
|
415
|
-
4V2: Volvo
|
416
|
-
4V3: Volvo
|
417
|
-
4V4: Volvo
|
418
|
-
4V5: Volvo
|
419
|
-
4V6: Volvo
|
420
|
-
4VL: Volvo
|
421
|
-
4VM: Volvo
|
422
|
-
4VZ: Volvo
|
423
|
-
538: Zero Motorcycles (USA)
|
424
|
-
5F: Honda USA-Alabama
|
425
|
-
5L: Lincoln
|
426
|
-
5N1: Nissan USA
|
427
|
-
5NP: Hyundai USA
|
428
|
-
5T: Toyota USA - trucks
|
429
|
-
5YJ: Tesla Motors
|
430
|
-
6AB: MAN Australia
|
431
|
-
6F4: Nissan Motor Company Australia
|
432
|
-
6F5: Kenworth Australia
|
433
|
-
6FP: Ford Motor Company Australia
|
434
|
-
6G1: General Motors-Holden (post Nov 2002)
|
435
|
-
6G2: Pontiac Australia (GTO & G8)
|
436
|
-
6H8: General Motors-Holden (pre Nov 2002)
|
437
|
-
6MM: Mitsubishi Motors Australia
|
438
|
-
6T1: Toyota Motor Corporation Australia
|
439
|
-
6U9: Privately Imported car in Australia
|
440
|
-
8AD: Peugeot Argentina
|
441
|
-
8AF: Ford Motor Company Argentina
|
442
|
-
8AG: Chevrolet Argentina
|
443
|
-
8AJ: Toyota Argentina
|
444
|
-
8AK: Suzuki Argentina
|
445
|
-
8AP: Fiat Argentina
|
446
|
-
8AW: Volkswagen Argentina
|
447
|
-
8A1: Renault Argentina
|
448
|
-
8GD: Peugeot Chile
|
449
|
-
8GG: Chevrolet Chile
|
450
|
-
935: Citroën Brazil
|
451
|
-
936: Peugeot Brazil
|
452
|
-
93H: Honda Brazil
|
453
|
-
93R: Toyota Brazil
|
454
|
-
93U: Audi Brazil
|
455
|
-
93V: Audi Brazil
|
456
|
-
93X: Mitsubishi Motors Brazil
|
457
|
-
93Y: Renault Brazil
|
458
|
-
94D: Nissan Brazil
|
459
|
-
9BD: Fiat Brazil
|
460
|
-
9BF: Ford Motor Company Brazil
|
461
|
-
9BG: Chevrolet Brazil
|
462
|
-
9BM: Mercedes-Benz Brazil
|
463
|
-
9BR: Toyota Brazil
|
464
|
-
9BS: Scania Brazil
|
465
|
-
9BW: Volkswagen Brazil
|
466
|
-
9FB: Renault Colombia
|
467
|
-
|
468
|
-
region:
|
469
|
-
'Africa': [A, B, C, D, E, F, G, H]
|
470
|
-
'Asia': [J, K, L, M, N, O, P, Q, R]
|
471
|
-
'Europe': [S, T, U, V, W, X, Y, Z]
|
472
|
-
'North America': ['1', '2', '3', '4', '5']
|
473
|
-
'Oceania': ['6', '7']
|
474
|
-
'South America': ['8', '9', '0']
|