An example Rails app that uses the LayerVault API.
What does it do? It makes sweet GIFs and MOVs of your work, like so:
The above GIF was created from this LayerVault public project.
To install those in one swift go with Homebrew:
brew install ffmpeg brew install gifsicle brew install imagemagick
You will also need to register a LayerVault application. You can do that from your LayerVault Development page. (Account required. Accounts are free.)
Next, define your API keys in your shell:
export LAYERVAULT_CLIENT_ID=MY_LAYERVAULT_CLIENT_ID_FROM_THE_SITE export LAYERVAULT_CLIENT_SECRET=MY_LAYERVAULT_SECRET_FROM_THE_SITE
git clone email@example.com:layervault/pummeldoge.git cd pummeldoge bundle bundle exec foreman start open http://localhost:3000
This app uses Sidekiq and postgres. That might seem a little heavy for a demo app. This is done to cut down on processing time, most folks likely have multi-core processors these days. If we're doing a lot of work at the same time, the Rails-default SQLite3 has terrible write performance. To fix that, we use postgres by default.
You will need to change your username in
config/database.yml to take advantage of postgres.
This example application is a good demonstration of top-to-bottom use of the LayerVault API.
Once we have URLs to all of the previews we need, it's just a matter of pulling them down and mushing them into GIFs and MOVs.