merge in fixes from stable
This commit is contained in:
commit
fdabd87957
91 changed files with 2859 additions and 285 deletions
|
@ -1,8 +1,6 @@
|
|||
# Watcher Library
|
||||
require 'listen'
|
||||
require 'middleman-core/contracts'
|
||||
require 'middleman-core/contracts'
|
||||
require 'backports/2.0.0/enumerable/lazy'
|
||||
|
||||
# Monkey patch Listen silencer so `only` works on directories too
|
||||
module Listen
|
||||
|
@ -123,6 +121,8 @@ module Middleman
|
|||
# @return [Middleman::SourceFile, nil]
|
||||
Contract Or[String, Pathname], Maybe[Bool] => Maybe[IsA['Middleman::SourceFile']]
|
||||
def find(path, glob=false)
|
||||
path = path.to_s.encode!('UTF-8', 'UTF-8-MAC') if RUBY_PLATFORM =~ /darwin/
|
||||
|
||||
p = Pathname(path)
|
||||
|
||||
return nil if p.absolute? && !p.to_s.start_with?(@directory.to_s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue