lavinjj/angularjs-gravatardirective — pull request #16 by Hypercubed (2014-02-20 03:05:59+00:00)
Title: Made getImageSrc arguments optional

This is probably the simplest solution that doesn't break existing code. I didn't touch the tests ans I couldn't get them to work on my version of Karma.

I think perhaps in the long run it would be better to do something like this (not tested):

```js
function(value, options) {
var options = options || {};
angular.extend(options, defaults);

var hash = md5.createHash(value.toLowerCase());
var src = (options.secure ? 'https://secure' : 'http://www' ) + '.gravatar.com/avatar/' + hash;
if (options.size) src += '?s=' + options.size;
if (options.rating) src += '&r=' + options.rating;
if (options.default) src += '&d=' + options.default;
return src;
}
```

Where defaults could be set on config.