Class: Jets::Naming
- Inherits:
-
Object
- Object
- Jets::Naming
- Defined in:
- lib/jets/naming.rb
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.
- .code_s3_key ⇒ Object
- .gateway_api_name ⇒ Object
-
.md5_code_zipfile ⇒ Object
build was already ran and that a file that contains the md5 path exists at Jets.build_root/code/current-md5-filename.txt.
- .parent_stack_name ⇒ Object
-
.parent_template_path ⇒ Object
consider moving these methods into cfn/builder/helpers.rb or that area.
- .template_path(app_class) ⇒ Object
- .template_path_prefix ⇒ Object
Class Method Details
.api_deployment_template_path ⇒ Object
26 27 28 |
# File 'lib/jets/naming.rb', line 26 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.
22 23 24 |
# File 'lib/jets/naming.rb', line 22 def api_gateway_template_path "#{template_path_prefix}-api-gateway.yml" end |
.code_s3_key ⇒ Object
38 39 40 41 |
# File 'lib/jets/naming.rb', line 38 def code_s3_key md5_zipfile = File.basename(md5_code_zipfile) "jets/code/#{md5_zipfile}" end |
.gateway_api_name ⇒ Object
34 35 36 |
# File 'lib/jets/naming.rb', line 34 def gateway_api_name "#{Jets.config.project_namespace}" end |
.md5_code_zipfile ⇒ Object
build was already ran and that a file that contains the md5 path exists at Jets.build_root/code/current-md5-filename.txt
md5_code_zipfile: /tmp/jets/demo/code/code-2e0e18f6.zip
47 48 49 50 |
# File 'lib/jets/naming.rb', line 47 def md5_code_zipfile path = "#{Jets.build_root}/code/current-md5-filename.txt" File.exist?(path) ? IO.read(path) : "current-md5-filename-doesnt-exist" end |
.parent_stack_name ⇒ Object
30 31 32 |
# File 'lib/jets/naming.rb', line 30 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.
17 18 19 |
# File 'lib/jets/naming.rb', line 17 def parent_template_path "#{template_path_prefix}.yml" end |
.template_path(app_class) ⇒ Object
7 8 9 10 |
# File 'lib/jets/naming.rb', line 7 def template_path(app_class) underscored = app_class.to_s.underscore.gsub('/','-') "#{template_path_prefix}-#{underscored}.yml" end |
.template_path_prefix ⇒ Object
12 13 14 |
# File 'lib/jets/naming.rb', line 12 def template_path_prefix "#{Jets.build_root}/templates/#{Jets.config.project_namespace}" end |