Wednesday, December 19, 2012

Bundle Discount Extension for Piggybak e-commerce framework

I recently authored an extension for the piggybak e-commerce framework: The extension can be found here.

Piggybak is a rails e-commerce maintained by End Point.

There was no go-to guide on writing an extension for piggybak so I went wrote one. It is was recently posted on End Point's blog here.

Sunday, December 2, 2012

Configuring CouchDB for Travis CI

Today I made a new release on the DPLA platform that updated requests for single records. I added some new cucumber integration steps that passed locally but broke the Travis CI build.

The new record "Fetch" mechanism is performing a fetch on CouchDB after doing a simple "transformation" on the requested record ID. The id for the CouchDB is pulled from an ID assigned at the time of ingestion and indexed in ElasticSearch.

The new method and integration tests require hitting CouchDB, so fixing the build entailed enabling CouchDB in Travis. Check out the commit with the new Travis configuration here.

Instructions for setting up the CouchDB service in Travis can be found here. To get the DPLA platform configuration set up correctly for the test suite, I needed to ensure we had an Admin user set up in CouchDB, which was different from the vanilla CouchDB setup with Travis. The final solution entailed a small change to the config files so the search endpoint can be defined independent of the test environment.