Sha256: 0482f0dec36c48abf7cb523c29f56298e10c9812771dab4bbdf11f2e84f094b6

Contents?: true

Size: 1.8 KB

Versions: 11

Compression:

Stored size: 1.8 KB

Contents

                                      ____                   __     
 /'\_/`\                             /\  _`\    __          /\ \    
/\      \   __  __     ___       __  \ \ \L\ \ /\_\   _ __  \_\ \   
\ \ \__\ \ /\ \/\ \  /' _ `\   /'__`\ \ \  _ <'\/\ \ /\`'__\/'_` \  
 \ \ \_/\ \\ \ \_\ \ /\ \/\ \ /\ \L\.\_\ \ \L\ \\ \ \\ \ \//\ \L\ \ 
  \ \_\\ \_\\/`____ \\ \_\ \_\\ \__/.\_\\ \____/ \ \_\\ \_\\ \___,_\
   \/_/ \/_/ `/___/> \\/_/\/_/ \/__/\/_/ \/___/   \/_/ \/_/ \/__,_ /
                /\___/                                              
                \/__/                                               

MynaBird converts email addresses into "account names" suitable for use in a
host name.

We use this here at Wistia. A user can sign up for an account using just
their email address, and in typical trendy SaaS fashion, they get an account 
URL in the form of http://account-name.wistia.com. MynaBird performs the 
conversion of their email into their new account name.

It works like this: if the domain is a that of a known ISP or email provider
(like Comcast or Gmail), then MynaBird uses the local part of their address as
the name. Otherwise, MynaBird builds the account name from the domain.

For example:

  brendan@wistia.com                  -> wistia
  brendan.schwartz@gmail.com          -> brendan-schwartz
  brendan+nospam@gmail.com            -> brendan
  support@gmail.com                   -> support-at-gmail
	
Ok, that last one is a bit of a special case, but you get the idea.


Usage:

  require 'myna_bird'
  MynaBird.convert('brendan@wistia.com')  #=> 'wistia'
	
	
Specs:

  Just run "rake spec" to run the specs.
  Don't be shy, feel free to add more examples.
	
	
Questions:

  Feel free to email me at brendan@wistia.com with any questions.
  
  
License:

  Go nuts. See LICENSE for full details.

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
myna_bird-0.2.9 README
myna_bird-0.2.8 README
myna_bird-0.2.7 README
myna_bird-0.2.6 README
myna_bird-0.2.5 README
myna_bird-0.2.4 README
myna_bird-0.2.3 README
myna_bird-0.2.2 README
myna_bird-0.2.1 README
myna_bird-0.2.0 README
myna_bird-0.1.0 README