Class: Katalyst::GoogleApis::Config
- Inherits:
-
Object
- Object
- Katalyst::GoogleApis::Config
- Defined in:
- lib/katalyst/google_apis/config.rb
Instance Attribute Summary collapse
-
#identity_pool ⇒ Object
Returns the value of attribute identity_pool.
-
#identity_provider ⇒ Object
Returns the value of attribute identity_provider.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#project_number ⇒ Object
Returns the value of attribute project_number.
-
#recaptcha ⇒ Object
Returns the value of attribute recaptcha.
-
#service_account_email ⇒ Object
Returns the value of attribute service_account_email.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/katalyst/google_apis/config.rb', line 8 def initialize @project_id = ENV.fetch("GOOGLE_PROJECT_ID", nil) @project_number = ENV.fetch("GOOGLE_PROJECT_NUMBER", nil) @service_account_email = ENV.fetch("GOOGLE_SERVICE_ACCOUNT_EMAIL", nil) @identity_pool = ENV.fetch("GOOGLE_OIDC_IDENTITY_POOL", nil) @identity_provider = ENV.fetch("GOOGLE_OIDC_IDENTITY_PROVIDER", nil) @recaptcha = ActiveSupport::OrderedOptions.new.tap do |defaults| defaults.site_key = ENV.fetch("GOOGLE_RECAPTCHA_SITE_KEY", nil) defaults.score = ENV.fetch("GOOGLE_RECAPTCHA_SCORE", 0.5).to_f defaults.test_mode = !ENV.fetch("VERIFY_RECAPTCHA", !Rails.env.local?) end end |
Instance Attribute Details
#identity_pool ⇒ Object
Returns the value of attribute identity_pool.
6 7 8 |
# File 'lib/katalyst/google_apis/config.rb', line 6 def identity_pool @identity_pool end |
#identity_provider ⇒ Object
Returns the value of attribute identity_provider.
6 7 8 |
# File 'lib/katalyst/google_apis/config.rb', line 6 def identity_provider @identity_provider end |
#project_id ⇒ Object
Returns the value of attribute project_id.
6 7 8 |
# File 'lib/katalyst/google_apis/config.rb', line 6 def project_id @project_id end |
#project_number ⇒ Object
Returns the value of attribute project_number.
6 7 8 |
# File 'lib/katalyst/google_apis/config.rb', line 6 def project_number @project_number end |
#recaptcha ⇒ Object
Returns the value of attribute recaptcha.
6 7 8 |
# File 'lib/katalyst/google_apis/config.rb', line 6 def recaptcha @recaptcha end |
#service_account_email ⇒ Object
Returns the value of attribute service_account_email.
6 7 8 |
# File 'lib/katalyst/google_apis/config.rb', line 6 def service_account_email @service_account_email end |