# \[ANN\] flatulent-0.0.2 - ajax gets stinky

**URL:** <https://www.ruby-forum.com/t/ann-flatulent-0-0-2-ajax-gets-stinky/108580>\
**Category:** Rails\
**Created:** [July 4, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/ann-flatulent-0-0-2-ajax-gets-stinky/108580 "2007-07-04T23:55:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ara.t.howard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Post date:** [July 4, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/ann-flatulent-0-0-2-ajax-gets-stinky/108580/1 "2007-07-04T23:55:08Z")

</div>

NAME

flatulent : CAPTCHA for FIGLET.

SYNOPSIS

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

URI

[http://codeforpeople.com/lib/ruby](http://codeforpeople.com/lib/ruby)  
[http://rubyforge.org/projects/codeforpeople](http://rubyforge.org/projects/codeforpeople)

HOW DO I GET FLATULENT?

gem install flatulent

HISTORY

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
     <html><body>
       #{ Flatulent.form }
     </body></html>
   html
 end

```

AJAX METHOD (MORE SECURE):

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

   render :inline => <<-html
     <html>
       <head> <%= javascript_include_tag 'prototype' %> </head>
       <body>
         <form action='./' method='post'>
           <%= Flatulent.ajax %>
           <input type='submit' name='submit' value='submit' />
         </form>
       </body>
     </html>
   html
 end

```

DOCS

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

ONLINE SAMPLES

[http://drawohara.tumblr.com/post/4944987](http://drawohara.tumblr.com/post/4944987)

ONLINE DEMO OF AJAX METHOD

[http://fortytwo.merseine.nu:3000/flatulent/ajax](http://fortytwo.merseine.nu:3000/flatulent/ajax) – try to break it!

enjoy.

## -a

we can deny everything, except that we have the possibility of being  
better. simply reflect on that.  
h.h. the 14th dalai lama
