Merge pull request #3 from alphagov/parse-predicate

Parsing basic predicates
Merge pull request #5 from alphagov/integrate-rules-parsing

Integrate rules parsing
Merge pull request #6 from alphagov/markdown-models

Markdown models
Package as gem
Merge pull request #8 from alphagov/package-as-gem

Package as gem
Add a model builder dsl

mainly to help building models in tests
Move state to Engine module
Define state equality
Refactor builder to allow building elements alone
update rspec

fixes 'can't add a new key into hash during iteration' error[1]

[1] https://github.com/rspec/rspec-mocks/blob/master/Changelog.md#302--2014-06-19
Add Engine::Transition

Transition implements a single transition step during smart answer
calculation.
Predicate evaluator for Equality and SetInclusion
Named predicate evaluation
Handle nested rule evaluation
Remove bogus include
Remove hash util module

only used in one place so doesn't make sense to have in module
Add support for evaluating lambdas in state

A lambda in state could be a predicate or a function injected by a
plugin. They will be lazily evaluated and memoised, which we can safely
do because the state is immutable.
Refactor flow to store coversheet as a node

Treat coversheet as a regular node and store the flow name which can be
used to lookup the coversheet from the node list.
Engine implementation using Engine::Transition
Move IndeterminateNextNode error into Engine module

it's an engine concern