0.0
The project is in a healthy, maintained state
A Ruby library for integrating Private Captcha verification into your applications
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 2.0
 Project Readme

private-captcha-ruby

Gem Version CI

Ruby client for server-side verification of Private Captcha solutions.

Please check the official documentation for the in-depth and up-to-date information.

Quick Start

  • Install gem private_captcha
    gem install private_captcha
  • Instantiate the client and call verify() method to check the captcha solution
    require 'private_captcha'
    
    # Initialize the client with your API key
    client = PrivateCaptcha::Client.new do |config|
      config.api_key = 'your-api-key-here'
    end
    
    # Verify a captcha solution
    begin
      result = client.verify('user-solution-from-frontend')
      if result.ok?
        puts 'Captcha verified successfully!'
      else
        puts "Verification failed: #{result.error_message}"
      end
    rescue PrivateCaptcha::Error => e
      puts "Error: #{e.message}"
    end
  • Integrate using Rack middleware or use with Sinatra or Rails with client.verify_request() helper

Requirements

  • Ruby 3.0+
  • No external dependencies (uses only standard library)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues with this Ruby client, please open an issue on GitHub. For Private Captcha service questions, visit privatecaptcha.com.