Module: Upfluence

Defined in:
lib/upfluence/peer.rb,
lib/upfluence/pool.rb,
lib/upfluence/logger.rb,
lib/upfluence/amqp/server.rb,
lib/upfluence/environment.rb,
lib/upfluence/http/server.rb,
lib/upfluence/error_logger.rb,
lib/upfluence/http/builder.rb,
lib/upfluence/utils/version.rb,
lib/upfluence/utils/semaphore.rb,
lib/upfluence/mixin/pagination.rb,
lib/upfluence/error_logger/null.rb,
lib/upfluence/error_logger/sentry.rb,
lib/upfluence/resources/countries.rb,
lib/upfluence/http/middleware/cors.rb,
lib/upfluence/mixin/html_scrubbing.rb,
lib/upfluence/endpoint/api_endpoint.rb,
lib/upfluence/http/endpoint/profiler.rb,
lib/upfluence/http/middleware/logger.rb,
lib/upfluence/mixin/strong_parameters.rb,
lib/upfluence/utils/interval_executor.rb,
lib/upfluence/utils/thrift/middleware.rb,
lib/upfluence/http/endpoint/healthcheck.rb,
lib/upfluence/http/endpoint/api_endpoint.rb,
lib/upfluence/http/middleware/prometheus.rb,
lib/upfluence/utils/http/middleware/null.rb,
lib/upfluence/http/endpoint/validation_error.rb,
lib/upfluence/http/middleware/request_stapler.rb,
lib/upfluence/utils/thrift/middleware/timeout.rb,
lib/upfluence/http/middleware/handle_exception.rb,
lib/upfluence/http/middleware/application_headers.rb,
lib/upfluence/utils/thrift/middleware/active_record.rb,
lib/upfluence/utils/thrift/middleware/error_catcher.rb,
lib/upfluence/utils/thrift/middleware/request_logger.rb,
lib/upfluence/utils/thrift/middleware/connection_pooler.rb

Defined Under Namespace

Modules: AMQP, Endpoint, ErrorLogger, HTTP, Mixin, Resources, Utils Classes: Logger, Peer, Pool

Class Method Summary collapse

Class Method Details

.envObject



5
6
7
8
9
# File 'lib/upfluence/environment.rb', line 5

def env
  @env ||= ActiveSupport::StringInquirer.new(
    ENV['ENV'] || ENV['RACK_ENV'] || 'development'
  )
end

.error_loggerObject



6
7
8
9
10
11
12
# File 'lib/upfluence/error_logger.rb', line 6

def error_logger
  @error_logger ||= if ENV['SENTRY_DSN']
                      ErrorLogger::Sentry.new
                    else
                      ErrorLogger::Null.new
                    end
end

.loggerObject



55
56
57
# File 'lib/upfluence/logger.rb', line 55

def logger
  @logger ||= Logger.new
end