
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
This is a Captcha gem for ruby. It drawing captcha image with C code so it no dependencies.
If you want to use it in Rails, you can use rucaptcha gem.
If you only want to use in the API, then this gem is exactly what you need.
Add this line to your application's Gemfile:
gem 'racaptcha'
And then execute:
$ bundle
Or install it yourself as:
$ gem install racaptcha
Create config/initializers/racaptcha.rb
RaCaptcha.setup do |config|
# Store Captcha code where, this config more like Rails config.cache_store
# Default :file_store
config.cache_store = [:file_store, 'tmp/cache/racaptcha/session']
# racaptcha expire time, default 2 minutes
config.expires_in = 2.minutes
# Color style, default: :colorful, allows: [:colorful, :black_white]
config.style = :colorful
# Chars length: default 5, allows: [3..7]
config.length = 5
# enable/disable Strikethrough. default: true
config.strikethrough = true
# enable/disable Outline style, default: false
config.outline = false
end
# generate captcha without cache
code, raw_data = RaCaptcha.generate
# generate captcha with cache
token, code, raw_data = RaCaptcha.generate_captcha
# verify captcha when using cache
RaCaptcha.verify_racaptcha?(cache_key: token, captcha: code)
# not delete cache when verify captcha
RaCaptcha.verify_racaptcha?(cache_key: token, captcha: code, keep_cache: true)
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Racaptcha project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that racaptcha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.