require "platformx/version" require "platformx/configuration" require "platformx/auth" require "platformx/form" require "platformx/layout" require "platformx/date" require "platformx/notify" require "platformx/mail" require "platformx/stripe" require "platformx/google_map" require "platformx/instagram" require "platformx/faker" require "platformx/pdf" require "platformx/text" ########################### Require Gems ############################ require "sinatra/base" require "sinatra/contrib/all" require "sinatra/partial" require "sinatra/support" require "sinatra/flash" require "digest" require "base64" require "json" require "pony" require "json" require "encrypted_cookie" require "encryptor" require "active_support/all" require "stripe" require "better_errors" require "rack-protection" require "rack-ssl-enforcer" require "bugsnag" require "slugify" require "data_mapper" require "securerandom" require "geokit" require "faker" require "uuidtools" require "net/ssh" module Platformx class << self attr_accessor :configuration end def self.configuration @configuration ||= Configuration.new end def self.reset @configuration = Configuration.new end def self.configure yield(configuration) end module Sinatra 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::GooglemapHelpers app.helpers Platformx::InstagramHelpers app.helpers Platformx::FakerHelpers app.helpers Platformx::TextHelpers #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 #require_relative 'platformx/omniauth_routes.rb' end end # End Sinatra end #Register Helpers Sinatra.register Platformx::Sinatra Sinatra.register Sinatra::Numeric Sinatra.register Sinatra::HtmlHelpers