Sha256: 77825618508fda90ceed45f4b0ee946a671461d6625590e5ba5ce7ca3ddb55a6

Contents?: true

Size: 902 Bytes

Versions: 2

Compression:

Stored size: 902 Bytes

Contents

require 'yandex_captcha/configuration'
require 'yandex_captcha/verify'
require 'yandex_captcha/helpers/base'

module YandexCaptcha
  module Helpers ; end
  class NoApiKeyException < Exception; end
  class BadResponseException < Exception; end
  class YandexCaptchaError < StandardError; end

  API_URL = 'http://cleanweb-api.yandex.ru/1.0'
  CAPTCHA_TYPE = 'std'
  HANDLE_TIMEOUTS_GRACEFULLY      = true
  SKIP_VERIFY_ENV = ['test', 'cucumber']

  # Allows easy setting of multiple configuration options. See Configuration
  # for all available options.
  def self.configure
    config = configuration
    yield(config)
  end

  # Gives access to the current Configuration.
  def self.configuration
    @configuration ||= Configuration.new
  end
end

if defined?(Rails)
  require 'yandex_captcha/rails'
end

if defined?(Sinatra) and Sinatra.respond_to? :register
  require 'yandex_captcha/sinatra'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yandex_captcha-0.4.3.4 lib/yandex_captcha.rb
yandex_captcha-0.4.3.3 lib/yandex_captcha.rb