in lib/Podfile.js [125:160]
Podfile.prototype.__parseForPods = function (text) {
// split by \n
const arr = text.split('\n');
// aim is to match (space insignificant around the comma, comma optional):
// pod 'Foobar', '1.2'
// pod 'Foobar', 'abc 123 1.2'
// pod 'PonyDebugger', :configurations => ['Debug', 'Beta']
// var podRE = new RegExp('pod \'([^\']*)\'\\s*,?\\s*(.*)');
const podRE = /pod '([^']*)'\s*(?:,\s*'([^']*)'\s*)?,?\s*(.*)/;
// only grab lines that don't have the pod spec'
return arr.filter(line => {
const m = podRE.exec(line);
return (m !== null);
})
.reduce((obj, line) => {
const m = podRE.exec(line);
if (m !== null) {
const podspec = {
name: m[1]
};
if (m[2]) {
podspec.spec = m[2];
}
if (m[3]) {
podspec.options = m[3];
}
obj[m[1]] = podspec; // i.e pod 'Foo', '1.2' ==> { 'Foo' : '1.2'}
}
return obj;
}, {});
};