Sha256: 09b16ab491e8a3bcff96664d42ab7508462eefcdf2393927faf65fefd9d3f0fe

Contents?: true

Size: 684 Bytes

Versions: 6

Compression:

Stored size: 684 Bytes

Contents

recaptcha =
  if Rails.application.secrets.recaptcha.present?
    Rails.application.secrets.recaptcha.symbolize_keys
  elsif Rails.env.development? || Rails.env.test?
    # These are keys provided by google for the purpose of testing.
    # See https://developers.google.com/recaptcha/docs/faq
    {
      site_key: '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI',
      secret_key: '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe'
    }
  end

if recaptcha.present?
  Recaptcha.configure do |config|
    config.site_key = recaptcha[:site_key]
    config.secret_key = recaptcha[:secret_key]
    config.proxy = ENV.fetch('HTTP_PROXY', (recaptcha[:proxy] if recaptcha[:proxy].present?))
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
workarea-reviews-3.1.2 config/initializers/recaptcha.rb
workarea-reviews-3.1.1 config/initializers/recaptcha.rb
workarea-reviews-3.1.0 config/initializers/recaptcha.rb
workarea-reviews-3.0.10 config/initializers/recaptcha.rb
workarea-reviews-3.0.9 config/initializers/recaptcha.rb
workarea-reviews-3.0.8 config/initializers/recaptcha.rb