phlipper/chef-postgresql — pull request #93 by RichardWigley (2014-05-04 18:20:17+00:00)
Title: Setting empty password causes exception...

#### Setting an empty password for a pg_user causes an exception.

##### Bug

For pg_user.rb, the role_sql variable in Line 17 gets << a nil when there is no password and it throws an exception as it cannot implicitly convert nil into a string. My fix is to else an empty string.

##### Usage case

My usage case for no password. I configure a development systems and I want to create pg_user with the same name as a login. This gives my login user pg permissions, mainly CREATEDB, which is very useful to a rails developer.

##### Reproducing Error
Reproduce this in test-kitchen by converging with the following yml added.

````
attributes:
postgresql:
users:
- username: richard
superuser: false
createdb: true
login: true
````