lib/mixlib/install/generator/base.rb in mixlib-install-3.11.21 vs lib/mixlib/install/generator/base.rb in mixlib-install-3.11.24

- old
+ new

@@ -16,10 +16,11 @@ # require "erb" require "ostruct" require "mixlib/install/util" +require "mixlib/install/dist" module Mixlib class Install class Generator class Base @@ -45,10 +46,17 @@ # If there is an erb template we render it, otherwise we just read # and returnt the contents of the script if File.exist? "#{script_path}.erb" # Default values to use incase they are not set in the context - context[:base_url] ||= "https://omnitruck.chef.io" + context[:project_name] ||= Mixlib::Install::Dist::PROJECT_NAME.freeze + context[:base_url] ||= Mixlib::Install::Dist::OMNITRUCK_ENDPOINT.freeze + context[:default_product] ||= Mixlib::Install::Dist::DEFAULT_PRODUCT.freeze + context[:bug_url] ||= Mixlib::Install::Dist::BUG_URL.freeze + context[:support_url] ||= Mixlib::Install::Dist::SUPPORT_URL.freeze + context[:resources_url] ||= Mixlib::Install::Dist::RESOURCES_URL.freeze + context[:macos_dir] ||= Mixlib::Install::Dist::MACOS_VOLUME.freeze + context[:windows_dir] ||= Mixlib::Install::Dist::WINDOWS_INSTALL_DIR.freeze context[:user_agent_string] = Util.user_agent_string(context[:user_agent_headers]) context_object = OpenStruct.new(context).instance_eval { binding } ERB.new(File.read("#{script_path}.erb")).result(context_object) else