lib/command/apply_template.rb in cpl-1.1.2 vs lib/command/apply_template.rb in cpl-1.2.0
- old
+ new
@@ -5,10 +5,11 @@
NAME = "apply-template"
USAGE = "apply-template TEMPLATE [TEMPLATE] ... [TEMPLATE]"
REQUIRES_ARGS = true
OPTIONS = [
app_option(required: true),
+ location_option,
skip_confirm_option
].freeze
DESCRIPTION = "Applies application-specific configs from templates"
LONG_DESCRIPTION = <<~DESC
- Applies application-specific configs from templates (e.g., for every review-app)
@@ -124,10 +125,10 @@
end
def apply_template(filename)
data = File.read(filename)
.gsub("APP_GVC", config.app)
- .gsub("APP_LOCATION", config[:default_location])
+ .gsub("APP_LOCATION", config.location)
.gsub("APP_ORG", config.org)
.gsub("APP_IMAGE", latest_image)
# Don't read in YAML.safe_load as that doesn't handle multiple documents
cp.apply_template(data)