[COOK-3453] Ensure that ruby block adding keys is idempotent

https://tickets.opscode.com/browse/COOK-3453