Sha256: 866fb37d04c0b5eebb5909db2c1d987aa610cf211a96f5c333e6095e4581b785

Contents?: true

Size: 386 Bytes

Versions: 157

Compression:

Stored size: 386 Bytes

Contents

class ApplicationController < ActionController::Base
  include ExceptionHandler

  before_action :check_env_variables

  private

  def check_env_variables
    missing_vars = %w[HUBSPOT_CLIENT_ID HUBSPOT_CLIENT_SECRET].select { |var| ENV[var].blank? }
    raise(ExceptionHandler::HubspotError.new, "Please specify #{missing_vars.join(', ')} in .env") if missing_vars.present?
  end
end

Version data entries

157 entries across 22 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/oauth-app/app/controllers/application_controller.rb
hubspot-api-client-9.0.0 sample-apps/search-result-paging-app/app/controllers/application_controller.rb
hubspot-api-client-9.0.0 sample-apps/rate-limits-redis-sample-app/app/controllers/application_controller.rb
hubspot-api-client-9.0.0 sample-apps/retry-middleware-sample-app/app/controllers/application_controller.rb
hubspot-api-client-9.0.0 sample-apps/companies-app/app/controllers/application_controller.rb
hubspot-api-client-9.0.0 sample-apps/timeline-events-app/app/controllers/application_controller.rb
hubspot-api-client-9.0.0 sample-apps/contacts-app/app/controllers/application_controller.rb
hubspot-api-client-9.0.0 sample-apps/imports-contacts-app/app/controllers/application_controller.rb
hubspot-api-client-9.0.0 sample-apps/leaky-bucket-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/companies-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/timeline-events-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/rate-limits-redis-sample-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/oauth-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/retry-middleware-sample-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/imports-contacts-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/leaky-bucket-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/contacts-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.1 sample-apps/search-result-paging-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.0 sample-apps/search-result-paging-app/app/controllers/application_controller.rb
hubspot-api-client-8.0.0 sample-apps/companies-app/app/controllers/application_controller.rb