Camo

Ruby client for Camo - the SSL image proxy :lock:

Get Started

Note: If you have not set up the Camo server, start with Deploying the Server.

Add this line to your application’s Gemfile:

gem "camo"

Add your Camo host and key to your environment or create an initializer config/initializers/camo.rb.

ENV["CAMO_HOST"] = "https://camo.herokuapp.com"
ENV["CAMO_KEY"] = "rzsJbU5YxDfdP3FXHjshtgEN"

You can now use the camo method in your views and controllers.

<%= image_tag camo("http://placekitten.com/g/200/300") %>

It’s that easy!

Deploying the Server

Clone the camo repository.

git clone https://github.com/atmos/camo.git
cd camo

Create a new project on Heroku.

heroku create camo

Choose a random secret key and add it to your app.

heroku config:set CAMO_KEY=rzsJbU5YxDfdP3FXHjshtgEN

Open your app to make sure it’s working. You should see the text “hwhat”.

heroku open

Credit

Thanks to Corey Donohoe for creating Camo and providing most of the Ruby code for this gem.

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help: