module Hoodoo
Module used as a namespace for all of Hoodoo’s facilities.
- File
-
uuid_validator.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
UUID
validator for models.
26-Nov-2014 (RJS): Created.
- File
-
base.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Include all mixins.
25-Nov-2014 (ADH): Created.
- File
-
creator.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Support mixin for models subclassed from
ActiveRecord::Base
providing context-aware model instance creation, allowing service authors to auto-inherit related features fromHoodoo
without changing their code.
07-Dec-2015 (ADH): Created as a proper place for "new_in", which had historically and confusingly resided inside the Finder mixin.
- File
-
dated.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Support mixin for models subclassed from
ActiveRecord::Base
providing as-per-API-standard dating support.
14-Jul-2015 (ADH): Created. 21-Jul-2015 (RJS): Functionality implemented.
- File
-
manually_dated.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Support mixin for models subclassed from
ActiveRecord::Base
providing as-per-API-standard dating support.
14-Jul-2015 (ADH): Created. 21-Jul-2015 (RJS): Functionality implemented.
- File
-
search_helper.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Supplementary helper class included by “finder.rb”. See
Hoodoo::ActiveRecord::Finder
, especiallyHoodoo::ActiveRecord::Finder::ClassMethods#search_with
, for details.
09-Jul-2015 (ADH): Created.
- File
-
security_helper.rb
- ©
-
Loyalty New Zealand 2018
- Purpose
-
Supplementary helper class included by “finder.rb”. See
Hoodoo::ActiveRecord::Secure
, especiallyHoodoo::ActiveRecord::Secure::ClassMethods#secure_with
and its options Hash, for details.
05-Apr-2018 (ADH): Created.
- File
-
support.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
This file includes a support class that is basically a public, independent expression of a series of specialised methods that would otherwise have been private, were it not for them being called by mixin code. See
Hoodoo::ActiveRecord::Support
documentation for details.
14-Jul-2015 (ADH): Created.
- File
-
translated.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Support mixin for models subclassed from
ActiveRecord::Base
providing as-per-API-standard internationalisation support.
14-Jul-2015 (ADH): Created.
- File
-
uuid.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Support mixin for models subclassed from
ActiveRecord::Base
providingUUID
management.
17-Nov-2014 (ADH): Created.
- File
-
writer.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Support mixin for models subclassed from
ActiveRecord::Base
providing context-aware data writing, allowing service authors to auto-inherit persistence-related features fromHoodoo
without changing their code.
31-Aug-2015 (ADH): Created.
- File
-
augmented_array.rb.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
A subclass of Ruby standard library Array used by the
Hoodoo::Client::Endpoint
family.
11-Dec-2014 (ADH): Created. 05-Mar-2015 (ADH): Moved to Hoodoo::Client.
- File
-
augmented_array.rb.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
A subclass of Ruby standard library Array used by the
Hoodoo::Client::Endpoint
family.
11-Dec-2014 (ADH): Created. 05-Mar-2015 (ADH): Moved to Hoodoo::Client.
- File
-
augmented_array.rb.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
A subclass of Ruby standard library Array used by the
Hoodoo::Client::Endpoint
family.
11-Dec-2014 (ADH): Created. 05-Mar-2015 (ADH): Moved to Hoodoo::Client.
- File
-
endpoint.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Resource endpoint definition.
05-Mar-2015 (ADH): Created.
- File
-
amqp.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Resource endpoint definition.
05-Mar-2015 (ADH): Created.
- File
-
auto_session.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Resource endpoint definition.
12-Mar-2015 (ADH): Created.
- File
-
headers.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
If you can’t think of where some code should live, use a Class or Module as a namespace for what amounts to library routines. The class defined here has support data and code for
Hoodoo::Client
,Hoodoo::Services::Middleware
and others.
22-Sep-2015 (ADH): Created.
- File
-
paginated_enumeration.rb
- ©
-
Loyalty New Zealand 2016
- Purpose
-
A module that adds support for enumeration over paginated resources.
29-Sep-2016 (DJO): Created.
- File
-
communicators.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Include the code providing a pool of fast or slow workers that communicate with the outside world.
26-Jan-2015 (ADH): Split from top-level inclusion file.
- File
-
fast.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
A fast communication-orientated object intended to be called synchronously via
Hoodoo::Communicators::Pool
.
15-Dec-2014 (ADH): Created.
- File
-
s;pw.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
A slow communication-orientated object intended to be called asynchronously via
Hoodoo::Communicators::Pool
.
15-Dec-2014 (ADH): Created.
- File
-
data.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Include common Type and Resource definitions.
26-Jan-2015 (ADH): Split from top-level inclusion file.
- File
-
caller.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Define documented Platform API Resource ‘Caller’.
30-Jan-2015 (RJS): Created.
- File
-
errors.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Define documented Platform API Resource ‘Errors’.
23-Sep-2014 (ADH): Created.
- File
-
log.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Define documented Platform API Resource ‘Log’.
25-Nov-2014 (ADH): Created. 01-Dec-2014 (ADH): Renamed resource from LogEntry to Log.
- File
-
session.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Define documented Platform API Resource ‘Session’.
30-Jan-2015 (RJS): Created.
- File
-
error_primitive.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Define documented Platform API Type ‘ErrorPrimitive’.
22-Sep-2014 (ADH): Created.
- File
-
permissions_full.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Define utility Type ‘PermissionsFull’.
02-Feb-2015 (RJS): Created.
- File
-
permissions_resources.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Define documented Platform API Type ‘PermissionsResources’.
30-Jan-2015 (RJS): Created.
- File
-
error_descriptions.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Error descriptions - provide a DSL and a container for a list of known error codes and associated data. Defines a platform API’s
platform
andgeneric
domain codes by default.Services
can declare additional errors.
22-Sep-2014 (ADH): Created. 09-Oct-2014 (ADH): Updated for Preview Release 8. 16-Oct-2014 (TC): Added session error
- File
-
errors.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
A collection of error messages, starting empty, with one or more messages added to it as errors are encountered by some processing task.
Errors
are added according to codes described byHoodoo::ErrorDescriptions
instances.
22-Sep-2014 (ADH): Created.
- File
-
fast_writer.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Base class for fast log writers.
16-Dec-2014 (ADH): Created.
- File
-
logger.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Multiple output logging via local code or external services.
16-Dec-2014 (ADH): Created.
- File
-
slow_writer.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Base class for slow log writers.
16-Dec-2014 (ADH): Created.
- File
-
writer_mixin.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Common code for fast and slow log writer base classes.
16-Dec-2014 (ADH): Created.
- File
-
file_writer.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Write flat log messages to a file.
16-Dec-2014 (ADH): Created.
- File
-
file_writer.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Write flat log messages to an I/O stream - STDOUT by default.
16-Dec-2014 (ADH): Created.
- File
-
monkey.rb
- ©
-
Loyalty New Zealand 2016
- Purpose
-
Official, reversible monkey patching.
11-Apr-2016 (ADH): Created.
- File
-
active_record_dated_finder_additions.rb
- ©
-
Loyalty New Zealand 2017
- Purpose
-
Extend
Hoodoo::ActiveRecord::Finder::ClassMethods#acquire_in!
so that it adds errorgeneric.contemporary_exists
to the providedcontext
if a dated instance is absent.
01-Nov-2017 (ADH): Created.
- File
-
active_record_manually_dated_finder_additions.rb
- ©
-
Loyalty New Zealand 2017
- Purpose
-
Extend
Hoodoo::ActiveRecord::Finder::ClassMethods#acquire_in!
so that it adds errorgeneric.contemporary_exists
to the providedcontext
if a dated instance is absent.
01-Nov-2017 (ADH): Created.
- File
-
datadog_traced_amqp.rb
- ©
-
Loyalty New Zealand 2017
- Purpose
-
Extend the AMQP endpoint to support Datadog cross-app transaction tracing. Only defined and registered if the Datadog gem is available and Hoodooo
Client
is in scope.See
Hoodoo::Monkey::Patch::DatadogTracedAMQP
for more.
22-Jun-2017 (JRW): Created.
Add a method tracer on the dispatch method so that the time spent executing middleware can be distinguished from the time spent executing the service implementation.
- File
-
newrelic_traced_amqp.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Extend the AMQP endpoint to support NewRelic cross-app transaction tracing. Only defined and registered if the NewRelic gem is available and Hoodooo
Client
is in scope.See
Hoodoo::Monkey::Patch::NewRelicTracedAMQP
for more.
08-Apr-2016 (RJS): Created.
- File
-
presenters.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Include the schema based data validation and rendering code.
26-Jan-2015 (ADH): Split from top-level inclusion file.
- File
-
base_presenter.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Schema-based data rendering and validation.
02-Dec-2014 (ADH): Merge of DocumentedPresenter code into Base.
- File
-
base_dsl.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Implement a DSL used to define a schema for data rendering and validation.
02-Dec-2014 (ADH): Merge of DocumentedDSL code into BaseDSL.
- File
-
common_resource_fields.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Define a schema describing fields common to any schema that describes an API Resource.
02-Dec-2014 (ADH): Split from DocumentedPresenter.
- File
-
embedding.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Light weight, simple support for basic embed and reference operations that help reduce service reliance on “knowing” exactly how to structure such data / avoid inconsistency.
29-Apr-2015 (ADH): Created.
- File
-
tags.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Hoodoo::Presenters::BaseDSL
field implementation which supports a field defined to contain a string of comma separated tags.
30-Sep-2014 (ADH): Created. 31-Oct-2014 (ADH): Moved to generic presenter layer from documented data layer.
- File
-
documented_uuid.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Hoodoo::Presenters::BaseDSL
field implementation which supports a field defined to contain aUUID
that (optionally) can be verified as referring to a specific other Resource.
22-Sep-2014 (ADH): Created. 31-Oct-2014 (ADH): Moved to generic presenter layer from documented data layer.
- File
-
services.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Include code useful to client service applications.
26-Jan-2015 (ADH): Split from top-level inclusion file.
- File
-
by_convention.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Discover - after a fashion - resource endpoint locations by convention, based on Rails-like pluralisation rules. For HTTP-based endpoints. Requires ActiveSupport.
03-Mar-2015 (ADH): Created.
- File
-
by_flux.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Discover resource endpoint locations via Alchemy Flux.
03-Mar-2015 (ADH): Created. 21-Jan-2016 (ADH): Reimplemented for Alchemy Flux.
- File
-
discovery.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Support resource endpoint discovery.
03-Mar-2015 (ADH): Created.
- File
-
for_amqp.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Describe a resource endpoint location in a way that allows it to be contacted over AMQP (e.g. via Alchemy).
03-Mar-2015 (ADH): Created.
- File
-
for_http.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Describe a resource endpoint location in a way that allows it to be contacted over HTTP.
03-Mar-2015 (ADH): Created.
- File
-
for_local.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Describe a resource endpoint location in a way that allows it to be method-called from the service middleware directly.
10-Mar-2015 (ADH): Created.
- File
-
for_remote.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Describe a “pseudo” resource endpoint location in terms of an interation context and wrapped “real” endpoint instance.
10-Mar-2015 (ADH): Created.
- File
-
amqp_log_writer.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Structured logging support for the middleware.
20-Nov-2014 (ADH): Created. 16-Dec-2014 (ADH): Changed into a new Hoodoo::Logger style instantiable log writer.
- File
-
inter_resource_local.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
An endpoint that calls back into a known middleware instance to communicate with a resource that is available in the local service application.
11-Nov-2014 (ADH): Split out from service_middleware.rb 09-Mar-2015 (ADH): Adapted from old endpoint.rb code.
- File
-
inter_resource_remote.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Resource endpoint definition.
05-Mar-2015 (ADH): Created.
- File
-
exception_reporting.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Reporting exceptions to third party error management services.
08-Dec-2014 (ADH): Created.
- File
-
airbrake_reporter.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Send exception details to Airbrake.
08-Dec-2014 (ADH): Created.
- File
-
interaction.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Encapsulate all data related to an interaction (API call) inside an object.
13-Feb-2015 (ADH): Created.
- File
-
context.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Container for information about the context of a call to a service, including session, request and response.
03-Oct-2014 (ADH): Created.
- File
-
implementation.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Service authors create subclasses of
Hoodoo::Services::Service
, which lists the one or more subclasses ofHoodoo::Services::Interface
the service author writes; each of those declares an interface which refers, for each interface endpoint, to a subclass of the class described here. Service authors create the body of their service implementation within the subclass.This file, then, does very little beyond describing the method framework that service authors use.
24-Sep-2014 (ADH): Created.
- File
-
permissions.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Allow/ask/deny support for resources and actions.
26-Jan-2015 (ADH): Created.
- File
-
request.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
A high level description of a client’s request, with all of the “raw”
Rack
request data parsed, verified as far as possible and generally cleaned up. Instances of this class are given toHoodoo::Services::Implementation
methods for each new request.
24-Sep-2014 (ADH): Created.
- File
-
service.rb
- ©
-
Loyalty New Zealand 2014
- Purpose
-
Define a class that service authors subclass and use to declare the component interfaces within the service via a very small DSL.
This class is passed to
Rack
and treated like an endpointRack
application, though the service middleware in practice does not pass on calls using theRack
interface; it uses the custom calls exposed byHoodoo::Services::Implementation
. Rack’s involvement between the two is really limited to just passing an instance of the service application subclass to the middleware so it knows who to “talk to”.
23-Sep-2014 (ADH): Created.
- File
-
dalli_client.rb
- ©
-
Loyalty New Zealand 2017
- Purpose
-
A mock/fake Dalli::Client minimal implementation as an alternative test back-end for Memcached-independent tests.
02-Feb-2017 (ADH): Created.
- File
-
redis.rb
- ©
-
Loyalty New Zealand 2017
- Purpose
-
A mock/fake Redis client minimal implementation as an alternative test back-end for Redis-independent tests.
02-Feb-2017 (ADH): Created.
- File
-
transient_store.rb
- ©
-
Loyalty New Zealand 2017
- Purpose
-
Provide a simple abstraction over transient storage engines such as Memcached or Redis, making it easier for client code to switch engines with very few changes.
01-Feb-2017 (ADH): Created.
- File
-
base.rb
- ©
-
Loyalty New Zealand 2017
- Purpose
-
Base class for Base class for
Hoodoo::TransientStore
plugins.
01-Feb-2017 (ADH): Created.
- File
-
memcached_redis_mirror.rb
- ©
-
Loyalty New Zealand 2017
- Purpose
-
Hoodoo::TransientStore
plugin supporting storage into both Memcached and Redis simultaneously.
01-Feb-2017 (ADH): Created.
- File
-
string_inquirer.rb
- Purpose
-
StringInquirer
class copied from ActiveSupport 4.1.6, to avoid dragging in that huge dependency for this one thing.
02-Oct-2014 (ADH): Copied from ActiveSupport 4.1.6.
- File
-
version.rb
- ©
-
Loyalty New Zealand 2015
- Purpose
-
Declare this gem’s version number.
27-Jan-2015 (ADH): Created (for gem under name Hoodoo).