lib/nanoc/helpers/breadcrumbs.rb in nanoc-4.11.0 vs lib/nanoc/helpers/breadcrumbs.rb in nanoc-4.11.1
- old
+ new
@@ -47,11 +47,11 @@
# e.g. patterns_for_prefix('/foo/1.0')
# => ['/foo/1.0.*', '/foo/1.*']
def self.patterns_for_prefix(prefix)
prefixes =
unfold(prefix) do |old_prefix|
- new_prefix = Nanoc::Identifier.new(old_prefix).without_ext
+ new_prefix = Nanoc::Core::Identifier.new(old_prefix).without_ext
new_prefix == old_prefix ? nil : new_prefix
end
prefixes.map { |pr| pr + '.*' }
end
@@ -108,10 +108,10 @@
prefixes = components.inject(['']) { |acc, elem| acc + [acc.last + '/' + elem] }
tiebreaker = Int::ERROR_TIEBREAKER if tiebreaker == :error
if @item.identifier.legacy?
- prefixes.map { |pr| @items[Nanoc::Identifier.new('/' + pr, type: :legacy)] }
+ prefixes.map { |pr| @items[Nanoc::Core::Identifier.new('/' + pr, type: :legacy)] }
else
ancestral_prefixes = prefixes.reject { |pr| pr =~ /^\/index\./ }[0..-2]
ancestral_items =
ancestral_prefixes.map do |pr|
if pr == ''