https://github.com/neirrek/sinatra-opencaptcha
A Sinatra extension for OpenCaptcha
https://github.com/neirrek/sinatra-opencaptcha
captcha ruby sinatra
Last synced: 8 months ago
JSON representation
A Sinatra extension for OpenCaptcha
- Host: GitHub
- URL: https://github.com/neirrek/sinatra-opencaptcha
- Owner: neirrek
- License: mit
- Created: 2012-04-11T21:15:33.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-05-15T12:48:39.000Z (about 14 years ago)
- Last Synced: 2025-02-09T21:06:40.420Z (over 1 year ago)
- Topics: captcha, ruby, sinatra
- Language: Ruby
- Homepage:
- Size: 105 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Sinatra-OpenCaptcha
===================
A **Sinatra** extension to seamlessly integrate **OpenCaptcha** to Sinatra applications.
See http://www.opencaptcha.com for more information about OpenCaptcha
Installation
------------
gem install sinatra-opencaptcha
Usage example
-------------
require 'sinatra'
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__
@@ index
Insert title here
My name:
<%= open_captcha :answer_input_label => 'What do you read?: ', :answer_input_class => 'text' %>