Sha256: 55b3f39d93b8cc71eda285429d48da9eb2059532aeb4318b1bc860ffd1058ed3
Contents?: true
Size: 778 Bytes
Versions: 4
Compression:
Stored size: 778 Bytes
Contents
require 'pact_broker/logging' require 'pact_broker/repositories' require 'sequel' require 'sinatra' require 'sinatra/json' require 'sinatra/namespace' require 'sinatra/param' require 'pact_broker/models' require 'pact_broker/services' module PactBroker module Api class BaseApi < Sinatra::Base helpers do include PactBroker::Logging include PactBroker::Services end set :raise_errors, false set :show_exceptions, false error do e = env['sinatra.error'] logger.error e content_type :json status 500 {:message => e.message, :backtrace => e.backtrace }.to_json end helpers Sinatra::JSON helpers Sinatra::Param register Sinatra::Namespace end end end
Version data entries
4 entries across 4 versions & 1 rubygems