basho/cuttlefish — pull request #103 by joedevivo (2014-01-09 15:07:47+00:00)
Title: Added some missing logic for some cuttelfish_datatype:to_string edge cases

Fixes

```
ERROR: generate failed while processing /home/buildbot/masters/riak/riak-build-centos-6-64/build/distdir/BUILD/riak-2.0.0pre9-6118bedf/rel: {'EXIT',
{badarg,
[{io_lib,format,
["Default: ~s",
[{error,"could not convert off of type flag to a string"}]],
[{file,"io_lib.erl"},{line,155}]},
{cuttlefish_conf,generate_comments,1,
[{file,"src/cuttlefish_conf.erl"},{line,125}]},
{cuttlefish_conf,generate_element,1,
[{file,"src/cuttlefish_conf.erl"},{line,108}]},
{cuttlefish_conf,'-generate/1-fun-0-',2,
[{file,"src/cuttlefish_conf.erl"},{line,71}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1248}]},
{cuttlefish_conf,generate_file,2,
[{file,"src/cuttlefish_conf.erl"},{line,76}]},
{cuttlefish_rebar_plugin,make_default_file,3,
[{file,"src/cuttlefish_rebar_plugin.erl"},{line,83}]},
{cuttlefish_rebar_plugin,generate,2,
[{file,"src/cuttlefish_rebar_plugin.erl"},{line,58}]}]}}
```

once that was fixed, this was exposed:

```
ERROR: generate failed while processing /Users/joe/dev/basho/riak_ee/rel: {'EXIT',
{badarg,
[{io_lib,format,
["Default: ~s",
[{error,
"Tried to convert 1, an invalid datatype {integer,1} to_string."}]],
[{file,"io_lib.erl"},{line,155}]},
{cuttlefish_conf,generate_comments,1,
[{file,"src/cuttlefish_conf.erl"},{line,126}]},
{cuttlefish_conf,generate_element,1,
[{file,"src/cuttlefish_conf.erl"},{line,108}]},
{cuttlefish_conf,'-generate/1-fun-0-',2,
[{file,"src/cuttlefish_conf.erl"},{line,71}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1248}]},
{cuttlefish_conf,generate_file,2,
[{file,"src/cuttlefish_conf.erl"},{line,76}]},
{cuttlefish_rebar_plugin,make_default_file,3,
[{file,"src/cuttlefish_rebar_plugin.erl"},{line,83}]},
{cuttlefish_rebar_plugin,generate,2,
[{file,"src/cuttlefish_rebar_plugin.erl"},{line,58}]}]}}
make: *** [generate] Error 1
```

Now both work.