NAME

flatulent : CAPTCHA for FIGLET.

SYNOPSIS

the flatulent gem provides brain dead simple to use, but internally cunning,
ascii art (figlet) captcha for ruby.

URI

http://codeforpeople.com/lib/ruby
http://rubyforge.org/projects/codeforpeople

HOW DO I GET FLATULENT?

gem install flatulent

HISTORY 0.0.3: - following are now all equivalent when posting (thanks botp)

    0==o==O==Q (zero, oh's, and queue)
    l==l       (one and el)
    2==z==Z    (two and z's)
    5==s==S    (5 and s's)

- random horizontal and vertical displacement of each char

- vastly improved background noise based on figlet char shapes

- inputs are case sensitive (thanks john joyce, chris carter)

- expanded rails examples

0.0.2

- ajax gets stinky: Flatulent.ajax!  the result of this new addition is
  that the captcha itself doesn't appear in the source file at all

- blowfish encoding for timebomb and captcha fields

- auto server key configuration using hostname and mac address

- improved noise algorithm

- improved character placement (chars shared edges to make ocr'ing harder)

0.0.1

- initial version

RAILS EXAMPLES

REGULAR METHOD (LESS SECURE):

def controller_action 
  if params.has_key? 'flatulent'
    Flatulent.validate! params
  end

  render :inline => "    <html><body>\n      \#{ Flatulent.form }\n    </body></html>\n  html\nend\n\nAJAX METHOD (MORE SECURE):\n\ndef controller_action\n  if params.has_key? 'flatulent'\n    Flatulent.validate! params\n  end\n\n  render :inline => <<-html\n    <html>\n      <head> <%= javascript_include_tag 'prototype' %> </head>\n      <body>\n        <form action='./' method='post'>\n          <%= Flatulent.ajax %>\n          <input type='submit' name='submit' value='submit' />\n        </form>\n      </body>\n    </html>\n  html\nend\n"

DOCS

see source in ./lib/*
see the example rails project in ./rails

ONLINE SAMPLES

http://drawohara.tumblr.com/post/4791838
http://drawohara.tumblr.com/post/4944987
http://drawohara.tumblr.com/post/4968766

ONLINE DEMO OF AJAX METHOD

http://fortytwo.merseine.nu:3000/flatulent/ajax  -- try to break it!