Wrapper gem to read a csv of addresses and validate them with Smarty
valid8 u l8r, sk8r... sorry, i'll go.
As of writing these instructions, I used:
- gem -v
3.3.26 - ruby -v
3.1.4p223 - bundler -v
2.3.26
-
Pull this repo to your machine
-
cd into the AddressValid8r directory
-
run
gem build address-valid8r.gemspecoutput:
WARNING: licenses is empty, but is recommended. Use a license identifier from http://spdx.org/licenses or 'Nonstandard' for a nonstandard license. WARNING: See https://guides.rubygems.org/specification-reference/ for help Successfully built RubyGem Name: address-valid8r Version: 0.1.0 File: address-valid8r-0.1.0.gem -
run
gem install ./address-valid8r-0.1.0.gemoutput:
Successfully installed address-valid8r-0.1.0 Parsing documentation for address-valid8r-0.1.0 Done installing documentation for address-valid8r after 0 seconds 1 gem installed
the command address-valid8r should now be available in your terminal
If there is issues with the installation, this can be run directly via:
- make sure your terminal is at the location of the root dir of this code base
./exe/address-valid8r -f /your/file/path
Upon first run, address-valid8r will ask you for these values.
Enter your Auth id:
Enter your Auth token:
Enter your License type:The values that are input are hidden. They will be added to your local .env file within the root directory of this code base. (only locally)
The values can be reset by adding the -r or --reset flag, which will prompt the script to ask you for these values again
Address Valid8r takes one option that can be assigned with the shorthand -f or longer --file followed by the file path to the addresses you want to validate
Example:
address-valid8r -f /Users/you/documents/addresses/address_list.csvOR
address-valid8r --file /Users/you/documents/addresses/address_list.csvThere is a small help page if this option is forgotten by running
address-valid8r --helpthe csv at the file path provided must have a header row.
The accepted headers are street, city, state, zip code
Ex:
Street, City, Zip Code
143 e Maine Street, Columbus, 43215
1 Empora St, Title, 11111
, Dublin, 00000note state is left out here and the gem should still be able to send it through for validation. The Street field is the only absolutely required field, but if that is all that is sent in, it must include at least a street address and the zip code
From the root directory of this code base, run:
bundle exec rspec
From the root directory of this code base, run:
bundle exec rubocop