middleman/middleman — pull request #878 by willkoehler (2013-05-01 17:41:11+00:00)
Title: Add try() to DataStore.

As discussed in #872, this simplifies the code needed to check for the existence of data before trying to access it. Adding `try()` allows for code like this:

```ruby
s3_sync.aws_access_key_id = data.try(:secrets).try(:aws_access_key_id)
s3_sync.aws_secret_access_key = data.try(:secrets).try(:aws_secret_access_key)
```

We can probably DRY up the code in method_missing() and try() with something like

```ruby
def method_missing(path)
try(path) || super
end
```

But I was afraid to attempt that change without specs. Are there specs for DataStore somewhere (sorry if I'm missing something obvious)?