This change lets a source be defined with a destination directory. That way we can mount a source (say a gem’s ‘doc’ directory) in a namespace and worry less about name collisions with files in other sources.
If there is a file without a basename in root, e.g. `.htaccess`,
`#parent` of another file in root finds `.htaccess` instead of
`index.html`.
Adding the `.htaccess` to the traversal-app fixture exposes this error.
The fix is to no longer scan for possible files if we know the parent
must be root.
Sometimes Sprockets needs to access
`options[:custom][:sprockets_context]`. If this is set, it should not be
overridden. This happens when building a LivingStyleGuide file when the
Sass source uses `asset-path`, `image-url` or similar functions.
TODO: moving this two a class method on HashWithIndifferentAccess would really make the most sense, but there are two blockers:
- historically the method has operated out of Util. While totally ok, simply dedeferring to HashWithIndifferentAccess feels a bit awkward
- the contracts gem doesn’t support class method at this time. the assurance of frozen output is important considering the uses of the recursively_enhance method
a “cheap” way to support adding data to pages created through `proxy` or `page` by adding frontmatter at the expected destination url.
for example proxying a page to `/proxied.html`, by adding a sidecar frontmatter file at `source/proxied.html.frontmatter` (or source/proxied.frontmatter if directory indexes is activated) the frontmatter will be merged with the proxy source and available to `current_resource` at the destination.
freshly init'd middleman projects from a local template should not
include the git files from that template because that's confusing.
this is to help users who clone git repos into `~/.middleman/`.