Class: Mxrb::Compiler::DeploymentMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/mxrb/compiler/deployment_metadata.rb

Overview

Derives initial Runtime metadata from an application MPR.

Instance Method Summary collapse

Constructor Details

#initialize(mpr_path, source) ⇒ DeploymentMetadata

Returns a new instance of DeploymentMetadata.



7
8
9
10
# File 'lib/mxrb/compiler/deployment_metadata.rb', line 7

def initialize(mpr_path, source)
  @mpr_path = mpr_path
  @source = source
end

Instance Method Details

#dependenciesObject



23
24
25
# File 'lib/mxrb/compiler/deployment_metadata.rb', line 23

def dependencies
  { 'schemaVersion' => '2.3', 'appName' => project_name, 'published' => [], 'consumed' => [] }
end

#documentObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/mxrb/compiler/deployment_metadata.rb', line 12

def document
  {
    'RuntimeVersion' => @source.version, 'ProjectID' => project_id,
    'ProjectName' => project_name, 'ModelVersion' => 'unversioned', 'Description' => '',
    'AdminUser' => 'MxAdmin', 'AdminRole' => '', 'JavaVersion' => java_version,
    'Roles' => {}, 'Constants' => [], 'ScheduledEvents' => [], 'Languages' => languages,
    'Configuration' => configuration, 'RequestHandlers' => request_handlers,
    'ModelRuntimeCompatibilityHash' => ''
  }
end