Sinatra-OpenCaptcha

A Sinatra module to seamlessly integrate OpenCaptcha to Sinatra applications.

See http://www.opencaptcha.com for more information about OpenCaptcha

Installation

gem install sinatra-captcha

Use example

require 'sinatra/base'
require 'sinatra/opencaptcha'

get '/' do
  erb :index
end

post '/' do
  if open_captcha_valid?
    "Welcome, dear #{params[:name]}!"
  else
    "Go away, bloody spamming machine!"
  end
end

__END__