vendor/librarian/lib/librarian/chef/source/local.rb in librarian-puppet-0.9.1 vs vendor/librarian/lib/librarian/chef/source/local.rb in librarian-puppet-0.9.2.pre

- old
+ new

@@ -6,10 +6,12 @@ module Local def install!(manifest) manifest.source == self or raise ArgumentError + info { "Installing #{manifest.name} (#{manifest.version})" } + debug { "Installing #{manifest}" } name, version = manifest.name, manifest.version found_path = found_path(name) @@ -17,12 +19,11 @@ if install_path.exist? debug { "Deleting #{relative_path_to(install_path)}" } install_path.rmtree end - debug { "Copying #{relative_path_to(found_path)} to #{relative_path_to(install_path)}" } - FileUtils.cp_r(found_path, install_path) + install_perform_step_copy!(found_path, install_path) end def fetch_version(name, extra) manifest_data(name)["version"] end @@ -30,9 +31,14 @@ def fetch_dependencies(name, version, extra) manifest_data(name)["dependencies"] end private + + def install_perform_step_copy!(found_path, install_path) + debug { "Copying #{relative_path_to(found_path)} to #{relative_path_to(install_path)}" } + FileUtils.cp_r(found_path, install_path) + end def manifest_data(name) @manifest_data ||= { } @manifest_data[name] ||= fetch_manifest_data(name) end