module Platformx::Sinatra

Platformx - Sinatra module

Public Class Methods

registered(app) click to toggle source
# File lib/platformx.rb, line 152
def self.registered(app)
  app.helpers Platformx::DateHelpers
  app.helpers Platformx::StripeHelpers
  app.helpers Platformx::AuthHelpers
  app.helpers Platformx::FormHelpers
  app.helpers Platformx::LayoutHelpers
  app.helpers Platformx::NotifyHelpers
  app.helpers Platformx::FakerHelpers  
  app.helpers Platformx::TextHelpers 
  app.helpers Platformx::PdfHelpers
  app.helpers Platformx::S3Helpers

  # #BugSnag
  # if Platformx.configuration.bugsnag_api_key != ""
  #   app.Bugsnag.configure do |config|
  #       config.api_key = Platformx.configuration.bugsnag_api_key
  #   end
  #   app.use Bugsnag::Rack
  #       app.enable :raise_errors
  # end

  # Configure Better Errors
  if app.development?
    app.use BetterErrors::Middleware
      BetterErrors.application_root = __dir__
  end

  # # Configure Rack Protection
  # if app.production?
  #   app.use Rack::Protection
  # end
end