langalex/couch_potato — pull request #99 by andymorris (2014-05-21 17:06:37+00:00)
Title: Revert moving lib out of views in ViewQuery, fix example in README

CommonJS modules can be under the root `lib` for some uses, but `map` functions in views are only allowed to `require` from `views/lib` (see http://couchdb-13.readthedocs.org/en/latest/1.1/commonjs/ ). The couch_potato RSpec matcher specs still passed because `MapToMatcher` and `MapReduceToMatcher` define their own javascript `require` function (and the specs still referenced `views/lib/...`), but moving `views/lib` to `lib` in the design docs causes the view to fail in couchdb and not emit any results.

The CommonJS `require` example in README also had a typo which probably caused confusion.

Does having `lib` under `views` cause a different problem?