opscode/chef_objects — pull request #16 by christophermaier (2012-09-21 10:58:03+00:00)
Title: Normalize run list entries for nodes and roles

This PR allows the Erlang server to properly normalize run list entries upon the creation and update of nodes and roles.

That is, a run list entry of `"foo"`, `"foo::bar"` or `"foo::bar@1.0.0"` should be stored as `"recipe[foo]"`, `"recipe[foo::bar]"`, or `"recipe[foo::bar@1.0.0]"`, respectively. Entries that are already presented as either `"recipe[...]"` or `"role[...]"` are unaffected.

Complete unit tests are included, and Dialyzer passes. Pedant tests for this functionality are available in https://github.com/opscode/chef-pedant-core/pull/7 and https://github.com/opscode/chef-pedant-tests/pull/6. These tests were written first against the Ruby server to verify the correct behavior.