yogthos/clj-rss — pull request #9 by holguinj (2014-05-07 23:31:30+00:00)
Title: Strip optional keys with nil vals from items

Currently, clj-rss will throw a NullPointerException if you attempt to add an item like this:

```
{:title "Some title"
:enclosure nil}
```

That's kind of reasonable, but since `:enclosure` is an optional key anyway, there's no harm in just dissocing it first. This PR does the following:

1. Adds a new function, `dissoc-nil`, which strips keys with nil vals from a map.
2. Adds a new test for `dissoc-nil`.
3. Makes sure that items pass through `dissoc-nil` so that nil vals won't prevent the feed from building.
4. Adds a test to demonstrate the new functionality.
5. Simplifies a test I wrote for an earlier contribution.