Skip to content

Latest commit

 

History

History
125 lines (76 loc) · 3.71 KB

README.md

File metadata and controls

125 lines (76 loc) · 3.71 KB

Barcoded

Barcoded intends to provide a simple API for the generation of barcodes in multiple symbologies.

Build Status Code Climate Coverage Status Dependency Status

Getting Started

Because we know how awesome you are, we've provided you options for running Barcoded:

Without Docker

  1. Install the required software dependencies if you have not already:

    • Ruby 2.0+

    • ImageMagick 6.8+

  2. At the command prompt, clone the project:

    git clone [email protected]/UtensilsUnion/barcoded

  3. Change directory to barcoded and install our gems:

    bundle install

  4. At last we are ready to get this show on the road:

    bundle exec rackup

With Docker

  1. Install required dependencies on your host:

  2. Run the following command from your host's terminal:

docker run -p 0.0.0.0:8080:8080 utensilsunion/barcoded
  1. Access the service at: http://yourhost:9000/

  2. Barcode!

Configuration

The following options are available for use with the container:

  • RACK_ENV (default: production)

  • RACK_CORS (default: disabled)

  • UNICORN_WORKERS (default: 1)

  • UNICORN_TIMEOUT (default: 30)

To run the application with 4 Unicorn workers:

docker run -P -e UNICORN_WORKERS=4 utensilsunion/barcoded

Symbologies

Formats

  • PNG
  • GIF
  • JPG
  • SVG

Examples

Download a code128 barcode as a jpeg with the value of 12345ABC

curl -O  http://localhost:8080/img/code128/1235ABC.jpg

Download a QR Code as a png with the value of BarcodedRocks, specifying a hight and width of 800x800.

curl -o BarcodedRocks.png \
  "http://localhost:8080/img/qr/BarcodedRocks.png?height=800&width=800"

Why?

Businesses need barcodes and adding support to legacy systems for new symbologies can be non-trival, enter Barcoded. Leveraging our simple API, businesses can generate barcodes in multiple symbologies on-demand without ever making a code change.

Demo

To see Barcoded in action check out the project page.

Testing

  1. As simple as:

    bundle exec rspec

Contributing

Feedback and features welcome! Please make use of Issues and Pull Requests, all code must have accompanying specs.

Author/Contact

Barcoded is written and maintained by @doomspork.

License

The project is made available under the MIT License.