Catptcha

A visual captcha for web sites. The user is shown a grid of 9 images and is asked to click the kittens. Distributed in the form of a Rails 2.3 plugin.

This is based on a concept from KittenAuth.

This is still experimental and incomplete, but it's ready for others to try out and offer help/feedback.

Installation

From within your Rails application:

Add the gem to your Gemfile and load the rake tasks.

echo "gem 'catptcha'" >> Gemfile
echo "load 'tasks/catptcha.rake'" >> Rakefile

Put your flickr keys in config/flickr.yml, see flickr.example.yml.

Generate and run the migration.

ruby script/generate catptcha_migration add_catptcha_tables
rake db:migrate

Seed the images.

rake catptcha:seed

Run the tests.

rake db:test:prepare
rake catptcha:test

Usage

Include the partial in your form contents.

render :inline => Catptcha.puzzle_tags

Check the result in your controller.

if Catptcha.check_guess(params[:catptcha_guess])`.
  # passed
else
  # failed
end

TODO and Known Bugs

  • lacks a review step for seeded photos
  • lacks the ability to store or upload photos to external storage
  • current implementation is closely tied to ActiveRecord and Flickr

Author

Copyright (c) 2012 ENTP, released under the MIT license