lib/librarian/puppet/source/forge.rb in librarian-puppet-0.9.1 vs lib/librarian/puppet/source/forge.rb in librarian-puppet-0.9.2.pre
- old
+ new
@@ -1,18 +1,15 @@
require 'uri'
require 'net/http'
require 'json'
-require 'librarian/helpers/debug'
module Librarian
module Puppet
module Source
class Forge
- include Helpers::Debug
class Repo
- include Helpers::Debug
attr_accessor :source, :name
private :source=, :name=
def initialize(source, name)
self.source = source
@@ -41,16 +38,14 @@
def install_version!(version, install_path)
cache_version_unpacked! version
if install_path.exist?
- debug { "Deleting #{relative_path_to(install_path)}" }
install_path.rmtree
end
unpacked_path = version_unpacked_cache_path(version).join(name.split('/').last)
- debug { "Copying #{relative_path_to(unpacked_path)} to #{relative_path_to(install_path)}" }
FileUtils.cp_r(unpacked_path, install_path)
end
def environment
source.environment
@@ -73,11 +68,10 @@
return if path.directory?
path.mkpath
output = `puppet module install -i #{path.to_s} --modulepath #{path.to_s} --ignore-dependencies #{name} 2>&1`
- debug { output }
end
private
def api_call(path)
@@ -154,11 +148,9 @@
name = manifest.name
version = manifest.version
install_path = install_path(name)
repo = repo(name)
-
- debug { "Installing #{manifest}" }
repo.install_version! version, install_path
end
def manifest(name, version, dependencies)