# File lib/librarian/puppet/source/local.rb, line 46 def fetch_dependencies(name, version, extra) dependencies = Set.new if modulefile? evaluate_modulefile(modulefile).dependencies.each do |dependency| dependency_name = dependency.instance_variable_get(:@full_module_name) version = dependency.instance_variable_get(:@version_requirement) gem_requirement = Requirement.new(version).gem_requirement dependencies << Dependency.new(dependency_name, gem_requirement, forge_source) end end if specfile? spec = environment.dsl(Pathname(specfile)) dependencies.merge spec.dependencies end dependencies end
# File lib/librarian/puppet/source/local.rb, line 40 def fetch_version(name, extra) cache! found_path = found_path(name) module_version end
# File lib/librarian/puppet/source/local.rb, line 66 def forge_source Forge.from_lock_options(environment, :remote=>"http://forge.puppetlabs.com") end
# File lib/librarian/puppet/source/local.rb, line 18 def install!(manifest) manifest.source == self or raise ArgumentError debug { "Installing #{manifest}" } name, version = manifest.name, manifest.version found_path = found_path(name) raise Error, "Path for #{name} doesn't contain a puppet module" if found_path.nil? unless name.include? '/' warn { "Invalid module name '#{name}', you should qualify it with 'ORGANIZATION/#{name}' for resolution to work correctly" } end install_path = environment.install_path.join(name.split('/').last) if install_path.exist? debug { "Deleting #{relative_path_to(install_path)}" } install_path.rmtree end install_perform_step_copy!(found_path, install_path) end
Generated with the Darkfish Rdoc Generator 2.