lib/kameleon/recipe.rb in kameleon-builder-2.10.9 vs lib/kameleon/recipe.rb in kameleon-builder-2.10.10
- old
+ new
@@ -44,10 +44,12 @@
"in_context" => {"cmd" => "/bin/bash", "proxy_cache" => "127.0.0.1"},
"out_context" => {"cmd" => "/bin/bash", "proxy_cache" => "127.0.0.1"},
"proxy_local" => "",
"proxy_out" => "",
"proxy_in" => "",
+ "checkpointing_enabled" => "false",
+ "persistent_cache" => "false",
}
@aliases = {}
@checkpoint = nil
@step_files = []
Kameleon.ui.verbose("Initialize new recipe (#{path})")
@@ -87,11 +89,11 @@
end
def load!(kwargs = {})
# Find recipe path
Kameleon.ui.verbose("Loading #{@path}")
- fail RecipeError, "Could not find this following recipe : #{@path}" \
+ fail RecipeError, "Could not find this following recipe: #{@path}" \
unless File.file? @path
yaml_recipe = YAML.load_file @path
unless yaml_recipe.kind_of? Hash
fail RecipeError, "Invalid yaml: #{@path}"
end
@@ -236,11 +238,11 @@
@base_recipes_files.push(Pathname.new(File.expand_path(base_recipe_path)))
update_steps_dirs()
base_recipe_path << ".yaml" unless base_recipe_path.end_with? ".yaml"
- fail RecipeError, "Could not find this following recipe : #{@recipe_path}" \
+ fail RecipeError, "Could not find this following recipe: #{@recipe_path}" \
unless File.file? path
base_yaml_recipe = YAML.load_file base_recipe_path
unless yaml_recipe.kind_of? Hash
fail RecipeError, "Invalid yaml: #{base_yaml_recipe}"
end
@@ -554,11 +556,11 @@
resolve_checkpoint unless @checkpoint.nil?
Kameleon.ui.verbose("Resolving aliases")
@sections.values.each do |section|
section.macrosteps.each do |macrostep|
- # First pass : resolve aliases
+ # First pass: resolve aliases
Kameleon.ui.debug("Resolving aliases for macrostep '#{macrostep.name}'")
macrostep.microsteps.each do |microstep|
microstep.commands.map! do |cmd|
resolve_alias(cmd)
end
@@ -575,11 +577,11 @@
end
end
@sections.values.each do |section|
section.macrosteps.each do |macrostep|
- # Second pass : resolve variables + clean/init hooks
+ # Second pass: resolve variables + clean/init hooks
macrostep.microsteps.each do |microstep|
microstep.commands.map! do |cmd|
resolve_hooks(cmd, macrostep, microstep)
end
end
@@ -728,10 +730,10 @@
section.init_macrostep.microsteps.push new_init_microstep
return
end
end
end
- fail RecipeError, "Invalid command : '#{cmd.key}'"
+ fail RecipeError, "Invalid command: '#{cmd.key}'"
else
return cmd
end
end