Class: Jets::Naming
Overview
This class groups the naming in one place. Some naming is for CloudFormation Some are for the Build process
Class Method Summary collapse
- .api_deployment_template_path ⇒ Object
-
.api_gateway_template_path ⇒ Object
consider moving these methods into cfn/builder/helpers.rb or that area.
- .app_template_path(app_class) ⇒ Object
- .gateway_api_name ⇒ Object
- .parent_stack_name ⇒ Object
-
.parent_template_path ⇒ Object
consider moving these methods into cfn/builder/helpers.rb or that area.
- .shared_resources_template_path ⇒ Object
- .shared_template_path(shared_class) ⇒ Object
- .template_path_prefix ⇒ Object
Class Method Details
.api_deployment_template_path ⇒ Object
33 34 35 |
# File 'lib/jets/naming.rb', line 33 def api_deployment_template_path "#{template_path_prefix}-api-deployment.yml" end |
.api_gateway_template_path ⇒ Object
consider moving these methods into cfn/builder/helpers.rb or that area.
29 30 31 |
# File 'lib/jets/naming.rb', line 29 def api_gateway_template_path "#{template_path_prefix}-api-gateway.yml" end |
.app_template_path(app_class) ⇒ Object
9 10 11 12 |
# File 'lib/jets/naming.rb', line 9 def app_template_path(app_class) underscored = app_class.to_s.underscore.gsub('/','-') "#{template_path_prefix}-app-#{underscored}.yml" end |
.gateway_api_name ⇒ Object
45 46 47 |
# File 'lib/jets/naming.rb', line 45 def gateway_api_name "#{Jets.config.project_namespace}" end |
.parent_stack_name ⇒ Object
41 42 43 |
# File 'lib/jets/naming.rb', line 41 def parent_stack_name File.basename(parent_template_path, ".yml") end |
.parent_template_path ⇒ Object
consider moving these methods into cfn/builder/helpers.rb or that area.
24 25 26 |
# File 'lib/jets/naming.rb', line 24 def parent_template_path "#{template_path_prefix}.yml" end |
.shared_resources_template_path ⇒ Object
37 38 39 |
# File 'lib/jets/naming.rb', line 37 def shared_resources_template_path "#{template_path_prefix}-shared-resources.yml" end |
.shared_template_path(shared_class) ⇒ Object
14 15 16 17 |
# File 'lib/jets/naming.rb', line 14 def shared_template_path(shared_class) underscored = shared_class.to_s.underscore.gsub('/','-') "#{template_path_prefix}-shared-#{underscored}.yml" end |
.template_path_prefix ⇒ Object
19 20 21 |
# File 'lib/jets/naming.rb', line 19 def template_path_prefix "#{Jets.build_root}/templates/#{Jets.config.project_namespace}" end |