lib/mixlib/install/generator/base.rb in mixlib-install-2.1.5 vs lib/mixlib/install/generator/base.rb in mixlib-install-2.1.6

- old
+ new

@@ -15,10 +15,11 @@ # limitations under the License. # require "erb" require "ostruct" +require "mixlib/install/util" module Mixlib class Install class Generator class Base @@ -45,9 +46,10 @@ # 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[: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 File.read(script_path)