Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A ruby project for generating USPS Intelligent Mail Barcodes
branch: master

This branch is 53 commits ahead of rtlong:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
spec
.gitignore
Changelog.md
Gemfile
Gemfile.lock
LICENSE.md
README.rdoc
Rakefile
USPS-intelligent-barcode.gemspec
VERSION

README.rdoc

USPS-intelligent-barcode

USPS-intelligent-barcode is a pure ruby gem to generate a USPS Intelligent Mail Barcode. More specifically, it generates the string of characters you should print using one of the USPS Intelligent Barcode fonts.

FORKED FROM

This project was forked from github.com/rtlong/USPS-intelligent-barcode by Ryan Taylor Long, in order to add tests and refactor. It is not a drop-in replacement: I renamed most methods and classes, and eliminated the #draw method.

INSTALL

$ gem install USPS-intelligent-barcode

EXAMPLE

#!/usr/bin/env ruby

require 'rubygems'
require 'USPS-intelligent-barcode'

barcode_id = '01'
service_type = '234'
mailer_id = '567094'
serial_number = '987654321'
routing_code = '01234567891'
barcode = Imb::Barcode.new(barcode_id,
                           service_type,
                           mailer_id,
                           serial_number,
                           routing_code)
p barcode.barcode_letters
# => "AADTFFDFTDADTAADAATFDTDDAAADDTDTTDAFADADDDTFFFDDTTTADFAAADFTDAADA"

STANDARD

This gem is based upon standard USPS-B-3200G

RUBY VERSIONS

The tests are known to pass in MRI 1.8.7, MRI 1.9.3 and MRI 2.0.0.

WHOAMI

Wayne Conrad <wconrad@yagni.com>

CREDITS

Thanks to Ryan Taylor Long for his original work, without which I would have been lost in the USPS specification.

Something went wrong with that request. Please try again.