Ravn::Tactical::

ServiceInfra module

Base endpoint for the Infrastructure API

Constants

AUTH_REALM

The realm to use for authentication headers

VERSION

The service version number

Public Class Methods

included( app )

Inclusion callback – include the routes in this module in app.

   # File lib/ravn/tactical/service_infra.rb
31 def self::included( app )
32     super
33 
34     self.mount( app )
35 
36     app.include( Ravn::Tactical::ServiceInfra::Kit )
37     app.include( Ravn::Tactical::ServiceInfra::Operations )
38 end
mount( app )

Declare endpoints relative to the given route.

   # File lib/ravn/tactical/service_infra.rb
42 def self::mount( app )
43     app.hash_branch( :api, 'infra' ) do |r|
44 
45         # GET /api/infra
46         r.get( true ) do |variable|
47             return { version: VERSION }
48         end
49 
50         r.hash_branches( :infra )
51     end
52 end