Module: YandexCaptcha

Defined in:
lib/yandex_captcha.rb,
lib/yandex_captcha/engine.rb,
lib/yandex_captcha/verify.rb,
lib/yandex_captcha/sinatra.rb,
lib/yandex_captcha/version.rb,
lib/yandex_captcha/helpers/base.rb,
lib/yandex_captcha/configuration.rb,
lib/yandex_captcha/helpers/rails.rb,
lib/yandex_captcha/helpers/sinatra.rb,
app/controllers/yandex_captcha/captcha_controller.rb,
app/controllers/yandex_captcha/application_controller.rb

Defined Under Namespace

Modules: Helpers, Sinatra, Verify Classes: ApplicationController, BadResponseException, CaptchaController, Configuration, Engine, NoApiKeyException, YandexCaptchaError

Constant Summary collapse

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

Class Method Summary collapse

Class Method Details

.configurationObject

Gives access to the current Configuration.



23
24
25
# File 'lib/yandex_captcha.rb', line 23

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Allows easy setting of multiple configuration options. See Configuration for all available options.

Yields:

  • (config)


17
18
19
20
# File 'lib/yandex_captcha.rb', line 17

def self.configure
  config = configuration
  yield(config)
end

.skip_envObject



27
28
29
# File 'lib/yandex_captcha.rb', line 27

def self.skip_env
  configuration.skip_verify_env.include? configuration.current_env
end