Pulling in Remote Data

I’m trying to get Prismic.io setup as a very basic CMS for a client to use with Middleman. What Prismic.io essentially does is publish an API feed with JSON data that corresponds to each page or post.

I would ideally like to setup a system where when I push the site to Heroku Middleman would pull down all of Prismic’s API feeds into its data folder and build the pages from there. I currently have my app setup to create the pages and posts from JSON files in the data folder.

I tried to use the middleman-remote-data gem, but I couldn’t get it to work with this current version of Middleman.

Does anyone have any ideas on how to pull this off?

Thanks in advance.

I know that you can do something similar with google docs using this gem: https://github.com/gimite/google-drive-ruby

It’s not really a Middleman question - you can just write normal Ruby code to call the API and write JSON files. Look at HTTParty for a good lead on that.