lib/nanoc/base/compilation/compiler.rb in nanoc-3.6.7 vs lib/nanoc/base/compilation/compiler.rb in nanoc-3.6.8

- old
+ new

@@ -167,11 +167,11 @@ (reps + layouts).each do |obj| rule_memory_store[obj] = rule_memory_calculator[obj] end # Calculate checksums - self.objects.each do |obj| + objects.each do |obj| checksum_store[obj] = obj.checksum end # Store stores.each { |s| s.store } @@ -237,21 +237,21 @@ rules.each_pair do |snapshot, rule| # Get basic path by applying matching rule basic_path = rule.apply_to(rep, :compiler => self) next if basic_path.nil? if basic_path !~ %r{^/} - raise RuntimeError, "The path returned for the #{rep.inspect} item representation, “#{basic_path}”, does not start with a slash. Please ensure that all routing rules return a path that starts with a slash." + raise "The path returned for the #{rep.inspect} item representation, “#{basic_path}”, does not start with a slash. Please ensure that all routing rules return a path that starts with a slash." end # Get raw path by prepending output directory rep.raw_paths[snapshot] = @site.config[:output_dir] + basic_path # Get normal path by stripping index filename rep.paths[snapshot] = basic_path @site.config[:index_filenames].each do |index_filename| if rep.paths[snapshot][-index_filename.length..-1] == index_filename # Strip and stop - rep.paths[snapshot] = rep.paths[snapshot][0..-index_filename.length-1] + rep.paths[snapshot] = rep.paths[snapshot][0..-index_filename.length - 1] break end end end end