ab-translate
Advanced tools
Comparing version 1.1.12 to 1.1.13
@@ -66,4 +66,15 @@ 'use strict'; | ||
function getProjectPomFile(pomFileName) { | ||
try { | ||
return fs.readFileSync(pomFileName, 'utf-8'); | ||
} catch (e) { | ||
return null; | ||
} | ||
} | ||
function getProjectProps(options) { | ||
var pomFileContent = fs.readFileSync(options.pom || 'pom.xml', 'utf-8'); | ||
var pomFileContent = getProjectPomFile(options.pom || 'pom.xml'); | ||
if (!pomFileContent) { | ||
return {}; | ||
} | ||
var parser = new xml2js.Parser(); | ||
@@ -70,0 +81,0 @@ var res = void 0; |
@@ -57,2 +57,7 @@ 'use strict'; | ||
it('should return an empty object when there is no pom.xml file', function () { | ||
var result = (0, _abTranslate.getTranslationSpecs)(); | ||
expect(result).toEqual({}); | ||
}); | ||
it('should silently fail when failing to read a translation file', function () { | ||
@@ -59,0 +64,0 @@ driver.given.pomIsDefined().given.translationFiles({ |
{ | ||
"private": false, | ||
"name": "ab-translate", | ||
"version": "1.1.12", | ||
"version": "1.1.13", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Yair Haimovitch", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3011452
18627