Module: EndPointBlank

Defined in:
lib/end_point_blank.rb,
lib/end_point_blank/masking.rb,
lib/end_point_blank/version.rb,
lib/end_point_blank/base_url.rb,
lib/end_point_blank/log_entry.rb,
lib/end_point_blank/rack/headers.rb,
lib/end_point_blank/access_tokens.rb,
lib/end_point_blank/authorization.rb,
lib/end_point_blank/commands/http.rb,
lib/end_point_blank/configuration.rb,
lib/end_point_blank/rails/railtie.rb,
lib/end_point_blank/loggers/logger.rb,
lib/end_point_blank/rack/env_store.rb,
lib/end_point_blank/writers/shared.rb,
lib/end_point_blank/rails/versioned.rb,
lib/end_point_blank/rails/authorized.rb,
lib/end_point_blank/unauthorized_error.rb,
lib/end_point_blank/writers/log_writer.rb,
lib/end_point_blank/deprecation_headers.rb,
lib/end_point_blank/rails/authenticated.rb,
lib/end_point_blank/session_configuration.rb,
lib/end_point_blank/writers/direct_writer.rb,
lib/end_point_blank/writers/delayed_writer.rb,
lib/end_point_blank/writers/request_writer.rb,
lib/end_point_blank/commands/version_finder.rb,
lib/end_point_blank/writers/response_writer.rb,
lib/end_point_blank/commands/bearer_generate.rb,
lib/end_point_blank/commands/endpoint_update.rb,
lib/end_point_blank/writers/exception_writer.rb,
lib/end_point_blank/commands/basic_authenticate.rb,
lib/end_point_blank/commands/endpoint_authorize.rb,
lib/end_point_blank/commands/authentication_cache.rb,
lib/end_point_blank/commands/route_pattern_finder.rb,
lib/end_point_blank/commands/generate_access_token.rb,
lib/end_point_blank/middleware/rack/report_interaction.rb

Defined Under Namespace

Modules: AuthorizationMethods, BaseUrl, Commands, DeprecationHeaders, Loggers, Masking, Middleware, Rack, Rails, Writers Classes: AccessTokens, Authorization, Configuration, Error, LogEntry, SessionConfiguration, UnauthorizedError

Constant Summary collapse

VERSION =
"0.6.1"

Class Method Summary collapse

Class Method Details

.configure {|Configuration.instance| ... } ⇒ Object

Your code goes here...

Yields:



48
49
50
# File 'lib/end_point_blank.rb', line 48

def self.configure(&block)
  yield Configuration.instance
end

.loggerObject

Defaults to stderr, not stdout. This logger belongs to a library running inside someone else's process: anything it writes to stdout lands in the host application's own output. That corrupts any program whose stdout carries structured data -- a CLI emitting JSON, a worker writing a protocol stream -- and the host has no way to tell the two apart.

Diagnostics belong on stderr for exactly this reason. Set EndPointBlank.logger= to override.



60
61
62
# File 'lib/end_point_blank.rb', line 60

def self.logger
  Configuration.instance.logger || (@default_logger ||= ::Logger.new($stderr, level: ::Logger::INFO))
end

.logger=(logger) ⇒ Object



64
65
66
# File 'lib/end_point_blank.rb', line 64

def self.logger=(logger)
  Configuration.instance.logger = logger
end