This code takes an input CSV with some account information, uses it to gather more information from a WP Engine API, and merges the resulting information in an output CSV.
Ruby 2.2 (but should work on version 2.0 or greater)
Gems:
- csv (for CSV parsing)
- httparty (HTTP client)
- rspec (for testing)
- webmock (for HTTP stubbing)
This was built using OS X El Capitan.
Ruby should come with most Linux distributions and OS X.
gem install bundler
bundle install
You're done!
After installation, run bundle exec rspec
from the source root.
./wpe_merge <input_file> <output_file>
Your input CSV should be comma delimited and in UTF-8 format.