# \[ANN\] Snail, a plugin for international mailing addresses

**URL:** <https://www.ruby-forum.com/t/ann-snail-a-plugin-for-international-mailing-addresses/172166>\
**Category:** Rails\
**Created:** [July 16, 2009, 2:18am UTC](https://www.ruby-forum.com/t/ann-snail-a-plugin-for-international-mailing-addresses/172166 "2009-07-16T02:18:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lance](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@lance](https://www.ruby-forum.com/u/lance)\
**Post date:** [July 16, 2009, 2:18am UTC](https://www.ruby-forum.com/t/ann-snail-a-plugin-for-international-mailing-addresses/172166/1 "2009-07-16T02:18:40Z")

</div>

Howdy –

I couldn’t find any existing libraries to help format international  
mailing addresses. Turns out it’s rather tedious. Not only do  
different countries have different names for the components of an  
address, but many countries have different formats for the city line.  
And then there’s Great Britain, er England, er … yeah.

So I’ve started work on a plugin called Snail. My dream is that it  
will grow to encapsulate the rules of international address formatting  
and basic validation. It’s just quite a lot for any one person.

The first release is up on GitHub at [GitHub - cainlevy/snail: A Ruby gem to assist with collecting and formatting international addresses](http://github.com/cainlevy/snail).  
If your application has anything to do with addresses, and you think  
it may need to go international, I hope you’ll check it out!

-Lance

---

<div class="post-metadata">

**Author:** ![lance](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@lance](https://www.ruby-forum.com/u/lance)\
**Post date:** [July 16, 2009, 3:18am UTC](https://www.ruby-forum.com/t/ann-snail-a-plugin-for-international-mailing-addresses/172166/2 "2009-07-16T03:18:16Z")

</div>

Lance,

I commend you on taking this on. This has been a huge pet peeve of  
mine over the years, and only very expensive commercial solutions were  
available to even do a fraction of the things necessary to manage  
mailing addresses.

Have you thought about also creating parsers to help identify what the  
address is, and which formatter to use? (like, identify which state/  
province and country, then determine the rules around parsing and  
formatting)

Also, I find that I often work with addresses that were inputted in  
odd ways, and requires me to “scrub” them a lot. There are very  
expensive commercial solutions for this, but no good open source  
solutions, and especially no Ruby ones. Thought about putting in some  
basic scrubbing rules as well (and possibly address verification  
services)?

I’ll keep an eye on Snail, and help where I can.

-Kevin

---

<div class="post-metadata">

**Author:** ![lance](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@lance](https://www.ruby-forum.com/u/lance)\
**Post date:** [July 16, 2009, 6:49am UTC](https://www.ruby-forum.com/t/ann-snail-a-plugin-for-international-mailing-addresses/172166/3 "2009-07-16T06:49:43Z")

</div>

Thanks Kevin! Looking forward to the assistance. 🙂

I haven’t thought about scrubbers and parsers. Sounds like a good fit,  
but  
I’m not in a position to really know the best approach, nor do I have an  
application requiring them that I could use for real-world test data.

My first priority with Snail is to make it easy for people to improve  
the  
areas that are most important to them. Right now I have a fixed  
origination  
country (USA) and no validation rules. I think the next step is to  
sketch  
out the validation system and make the origination country configurable,  
even if it still only supports USA. From there I hope that people will  
find  
it easy to add rules for the countries they know best.

-Lance

On Wed, Jul 15, 2009 at 6:17 PM, Kevin E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> province and country, then determine the rules around parsing and
> 
> > different countries have different names for the components of an
> > 
> > -Lance
> > 
> > >
> 
> >

–  
rails blog: [http://codelevy.com](http://codelevy.com)

---

<div class="post-metadata">

**Author:** ![lance](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@lance](https://www.ruby-forum.com/u/lance)\
**Post date:** [July 16, 2009, 10:34am UTC](https://www.ruby-forum.com/t/ann-snail-a-plugin-for-international-mailing-addresses/172166/4 "2009-07-16T10:34:17Z")

</div>

Lance wrote:

> Howdy –
> 
> I couldn’t find any existing libraries to help format international  
> mailing addresses.  
> […]  
> So I’ve started work on a plugin called Snail. My dream is that it  
> will grow to encapsulate the rules of international address formatting  
> and basic validation. It’s just quite a lot for any one person.

This sounds great. I’m currently considering what I need to do to  
Quorum ( [http://quorum2.sourceforge.net](http://quorum2.sourceforge.net) ) to handle international  
addresses decently, and Snail may well play a role in that. In any  
case, I’ll have a closer look at Snail, and perhaps find someplace that  
I can contribute…

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
