class Librarian::Puppet::Lockfile::Parser
Extend the parser to normalize module names in old .lock files, converting / to -
Public Instance Methods
extract_and_parse_dependencies(lines, manifests_index)
click to toggle source
Calls superclass method
# File lib/librarian/puppet/lockfile.rb, line 21 def extract_and_parse_dependencies(lines, manifests_index) # when looking up in manifests_index normalize the name beforehand class << manifests_index include Librarian::Puppet::Util alias_method :old_lookup, :[] define_method(:[]) { |k| self.old_lookup(normalize_name(k)) } end super(lines, manifests_index) end
extract_and_parse_sources(lines)
click to toggle source
Calls superclass method
# File lib/librarian/puppet/lockfile.rb, line 11 def extract_and_parse_sources(lines) sources = super sources.each do |source| source[:manifests] = Hash[source[:manifests].map do |name,manifest| [normalize_name(name), manifest] end] end sources end