0.02
No commit activity in last 3 years
No release in over 3 years
-
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

~> 0.9.6
>= 0.2.0
 Project Readme

Piet-Binary

Description

Piet-Binary its a gem that provides binaries for use with the Piet gem.

Its an harmless gem - you can add to your Gemfile without collateral effects. It will only be activated if you use Piet gem and you don't have the jpegoptim/optipng binaries (and any other used by the Piet gem) at your system.

This gem haven't the pretension to be an all-case solution to the problem of lack of binaries required by Piet in the system. But will resolve the problem in the mosts cases. If you use this gem and Piet still accuse a "not found" error for the binaries tools (jpegoptim/optipng), you must to manually install the tools at your system. In this case you can help to improve this gem and add the missing binaries (see the "Helping this gem" section).

Why?

This gem has the purpose to make the Piet gem works automagically, without having to manually install the jpegoptim/optipng tools. This is necessary to Piet work if you are using Heroku as your host, for instance, and in many others hosting providers (mainly the shared ones) who doesn't allow to compile and/or install apps.

Installation

gem install piet-binary

or, if you are using Rails just add to your Gemfile (and, of course, do a "bundle install"):

gem 'piet-binary'

This gem automatically calls the piet gem, so it's not necessary to you call the piet gem. In this case, you can just replace this:

gem 'piet'

to this:

gem 'piet-binary'

Usage

Just use "require" to load (not necessary in Rails):

require 'piet-binary'

Helping this gem

You can help to improve this gem in 2 ways:

  • keeping this gem updated, with the latests binaries
  • adding platforms: today it only have a linux/64 bits binaries

To compile the jpegoptim in linux/osx, clone the last version at https://github.com/tjko/jpegoptim and execute the configure with the "-static" CFLAG (it's necessary to create a non-dependable standalone exec file):

git clone https://github.com/tjko/jpegoptim.git
cd jpegoptim
CFLAGS="-static" ./configure
make

after this, copy the jpegoptim executable to the correct folder in this gem (the bin folder) and submit a pull request.