Update pebblebed
Upgrade to ActiveRecord 4.0 and sinatra-activerecord 1.4, which can replace the database tasks in bengler_test_helper. This also means using schema.rb instead of development_structure.sql.
Fix Post#visible_to? and Post#with_restrictions to check that identity is god in the correct realm.
Upgrade to ActiveRecord 4.1.4. Fixes deprecations and scoping problems.
Fix lack of 'distinct' causing /posts/:uid to return duplicate results.
Fix Rakefile with respect to sinatra-activerecord: remove some old tasks, register Sinatra::ActiveRecordExtension, don't automatically require sinatra-contrib.
Set description for db:test:prepare so CI server will find it.
Add support for GET /posts/:uid/tags.
Gemfile: Upgrade to petroglyph 0.0.7, which fixes scope's #respond_to?.
Add support passing ?raw=true to 'GET /posts/:uid', to retrieve the raw, unmerged post.
Clean up tests for external documents.
Always ensure document timestamps are set.
Sanitize and normalize documents when assigning, and don't update timestamp when nothing is being changed.
When assigning the document, ignore any key/value pairs that exist at the top level of the external document; ie. "unmerging" the document when assigning it, the reverse of Post#merged_document.
Fix Post#normalize_document on Ruby 2.1 due to weird Array#to_h behaviour.
Document normalization: Convert class methods to instance methods.
Optimize path queries by use subquery on locations_posts instead of expensive join.
Add ActiveRecord eager loading to 'GET /posts/:uid' common case.
Upgrade to ActiveRecord 4.1.4. Fixes deprecations and scoping problems.
Add optimistic locking via a numeric version field.

If a client fetches a document with version 1, and then tries to post the same document (with the version 1 as part of the POST data), and another client has modified the document in the meantime, the request will fail.