CocoaPods license can be a hashtable.

Containing the `type` field for license information.

Fixes #205.
This commit is contained in:
Thaddee Tyl 2014-07-02 10:15:05 +02:00
parent 03e7013bf5
commit 3c03978dbc

View File

@ -964,7 +964,10 @@ cache(function(data, match, sendBadge) {
try {
var data = JSON.parse(buffer);
var version = data.version;
var license = data.license;
var license;
if (typeof data.license === 'string') {
license = data.license;
} else { license = data.license.type; }
var platforms = Object.keys(data.platforms).join(' | ');
version = version.replace(/^v/, "");
if (type === 'v') {