Module: Platformx::Sinatra

Defined in:
lib/platformx.rb

Overview

Platformx - Sinatra module

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# 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