Class: RazorRisk::Cassini::Applications::Microservices::RESTful::Snapshots::SnapshotsApp

Inherits:
SecuredMicroservice
  • Object
show all
Includes:
Cassini::Applications::RESTFramework::RouteVerbDispatch, Cassini::Mixin::RazorResponseValidator, Pantheios, RouteVerbAdaptors::Snapshots
Defined in:
lib/razor_risk/cassini/applications/microservices/restful/snapshots/app.rb

Overview

Sinatra Application for the Snapshot Microservice.

Constant Summary collapse

FULL_DESIGNATION =

########################################################## Constants

'Snapshots'
SHORT_DESIGNATION =
'snapshots'
SERVICE_TYPE =
:microservice
PROGRAM_FEATURES =
{
    has_web_server:         true,
    has_host_and_port:      true,
    has_razor_connectivity: true,
    authentication:         true,
    copyright_year:         2020,
}
SUPPORTED_ROUTES =
[
    [ '/progress', :get, 'Get the details of all in progress snapshots' ],
    [ '/progress/:id', :get, 'Get the details of a specific snapshot if it is in progress' ],
]
HTTP_ACCEPTS =
%w{
    text/html
    application/json
    application/xml
    text/xml
    text/csv
    text/plain
    text/tab-separated-values
    text/tsv
}

Class Method Summary collapse

Class Method Details

.on_init_service(options) ⇒ Object

########################################################## methods

Raises:

  • (ArgumentError)


82
83
84
85
86
87
88
89
90
91
92
# File 'lib/razor_risk/cassini/applications/microservices/restful/snapshots/app.rb', line 82

def self.on_init_service options

    trace ParamNames[ :options ], options

    raise ArgumentError.new('missing keyword: razor_requester') unless options.has_key? :razor_requester

    request_options = options[:request_options]

    set :razor_requester, options[:razor_requester]
    set :request_options, request_options
end