lib/librarian/puppet/source/forge.rb in librarian-puppet-1.0.4 vs lib/librarian/puppet/source/forge.rb in librarian-puppet-1.0.5
- old
+ new
@@ -119,11 +119,11 @@
environment.cache_path.join("source/puppet/forge/#{dir}")
end
end
def install_path(name)
- environment.install_path.join(name.split('/').last)
+ environment.install_path.join(name.split('-').last)
end
def fetch_version(name, version_uri)
versions = repo(name).versions
if versions.include? version_uri
@@ -146,12 +146,13 @@
private
def repo(name)
@repo ||= {}
+
unless @repo[name]
# if we are using the official Forge then use API v3, otherwise stick to v1 for now
- # if uri.hostname =~ /\.puppetlabs\.com$/
+ # if uri.hostname =~ /\.puppetlabs\.com$/ || !environment.use_v1_api
# @repo[name] = RepoV3.new(self, name)
# else
@repo[name] = RepoV1.new(self, name)
# end
end