lib/gumdrop/support/stitch.rb in gumdrop-1.1.1 vs lib/gumdrop/support/stitch.rb in gumdrop-1.1.2

- old
+ new

@@ -20,10 +20,12 @@ content= site.resolve source_file path = content.nil? ? source_file : content.source_path stitch_opts= {} #{ root: content.source_path } stitch_opts.merge! opts stitch_opts[:paths] ||= [] - stitch_opts[:paths] << File.dirname(path) + if stitch_opts.fetch(:autorootpath, true) + stitch_opts[:paths] << File.dirname(path) + end ::Stitch::Package.new(stitch_opts).compile rescue LoadError raise StandardError, "Stitch can't be loaded. Please add it to your Gemfile." end \ No newline at end of file