lib/aamva.rb in aamva-0.1.0 vs lib/aamva.rb in aamva-0.2.0
- old
+ new
@@ -1,35 +1,48 @@
# frozen_string_literal: true
require 'aamva/version'
-require 'aamva/card'
-require 'aamva/data_element'
require 'aamva/cli'
require 'aamva/generator'
require 'aamva/validator'
+require 'aamva/decoder'
+require 'aamva/standard'
+require 'aamva/encoder'
+require 'aamva/calculator'
+require 'aamva/header'
+require 'aamva/subfile_designator'
+require 'aamva/subfile'
+require 'aamva/data'
+require 'aamva/factory'
+require 'aamva/utils'
-module Aamva
- DAY_LENGTH = 3
- MAX_DAC_LENGTH = 40
+module AAMVA
+ UPPER_ALPHA_CHARACTERS = ('A'..'Z').to_a
+ LOWER_ALPHA_CHARACTERS = ('a'..'z').to_a
+ ALPHA_CHARACTERS = UPPER_ALPHA_CHARACTERS + LOWER_ALPHA_CHARACTERS
- DCG_MAPPING = {
- 'USA' => 'USA',
- 'CAN' => 'CAN'
- }
+ LENGTH_UNITS = %w[in cm].freeze
- DBC_MAPPING = {
- "1" => "Male",
- "2" => "Female",
- "9" => "Not Specified"
- }
+ DATE_FORMATS = {
+ can: '%Y%m%d',
+ usa: '%m%d%Y'
+ }.freeze
+ REQUIRED_DATA_ELEMENTS = %i[
+ dac
+ dbc
+ day
+ ddf
+ ddg
+ ].freeze
+
DAY_MAPPING = {
'BLK' => 'Black',
'BLU' => 'Blue',
'BRO' => 'Brown',
'GRY' => 'Gray',
'GRN' => 'Green',
'HAZ' => 'Hazel',
'MAR' => 'Maroon PNK Pink',
- 'DIC' => 'Dichromatic UNK Unknown',
- }
+ 'DIC' => 'Dichromatic UNK Unknown'
+ }.freeze
end