Sha256: 8b4e69ed2530b1c2c6836c22f40fc92bfdc72c24f9fa860babc2cd6a19a8a300

Contents?: true

Size: 1.63 KB

Versions: 1

Compression:

Stored size: 1.63 KB

Contents

= has_addresses

+has_addresses+ demonstrates a reference implementation for handling countries,
regions, and addresses.

== Resources

API

* http://api.pluginaweek.org/has_addresses

Bugs

* http://pluginaweek.lighthouseapp.com/projects/13271-has_addresses

Development

* http://github.com/pluginaweek/has_addresses

Source

* git://github.com/pluginaweek/has_addresses.git

== Description

Countries, regions, and addresses are all simple models whose data and
functionality should be able to be standardized across multiple applications.
has_addresses adds support for countries and regions based on the ISO 3166 and
ISO 3166-2 standard.  The data for these standards is obtained through the
open-source Debian package, iso-codes.

Along with the simple Country and Region models, addresses can be defined and
integrated based on the data in these models.  Addresses are minimalistic in
terms of the type of data required.

== Usage

Note that this is a reference implementation and, most likely, should be
modified for your own usage.

=== Example

  address = Address.new(
    :street_1 => '1600 Amphitheatre Parkway',
    :city => 'Mountain View',
    :region => 'US-CA',
    :postal_code => '94043'
  )
  address.single_line # => "1600 Amphitheatre Parkway, Mountain View, California  94043, United States"

== Testing

Before you can run any tests, the following gem must be installed:
* plugin_test_helper[http://github.com/pluginaweek/plugin_test_helper]

To run against a specific version of Rails:

  rake test RAILS_FRAMEWORK_ROOT=/path/to/rails

== Dependencies

* Rails 2.3 or later
* enumerate_by[http://github.com/pluginaweek/enumerate_by] 0.4.1 or later

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
has_addresses-0.5.1 README.rdoc