lib/nanoc/extra/auto_compiler.rb in nanoc-3.6.7 vs lib/nanoc/extra/auto_compiler.rb in nanoc-3.6.8

- old
+ new

@@ -23,11 +23,11 @@ require 'thread' @mutex = Mutex.new end # Calls the autocompiler. The behaviour of this method is defined by the - # [Rack specification](http://rack.rubyforge.org/doc/files/SPEC.html). + # [Rack specification](http://rack.rubyforge.org/doc/SPEC.html). # # @param [Hash] env The environment, as defined by the Rack specification # # @return [Array] An array containing the status, the headers, and the # body, as defined by the Rack specification @@ -35,11 +35,11 @@ @mutex.synchronize do # Start with a new site build_site # Find rep - path = Rack::Utils::unescape(env['PATH_INFO']) + path = Rack::Utils.unescape(env['PATH_INFO']) reps = site.items.map { |i| i.reps }.flatten rep = reps.find do |r| r.path == path || r.raw_path == site.config[:output_dir] + path end @@ -85,10 +85,10 @@ @site = Nanoc::Site.new(@site_path) end def mime_type_of(path, fallback) mime_type = MIME::Types.of(path).first - mime_type = mime_type.nil? ? fallback : mime_type.simplified + mime_type.nil? ? fallback : mime_type.simplified end def file_server @file_server ||= ::Rack::File.new(site.config[:output_dir]) end