Skip to content

Commit

Permalink
Merge branch 'iGenius-Srl-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rottmann committed Jan 13, 2017
2 parents 83fa0cb + ebe25bb commit 089abce
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ var app = {
apisuccessexample : './parsers/api_success_example.js',
apiuse : './parsers/api_use.js',
apiversion : './parsers/api_version.js',
apisamplerequest : './parsers/api_sample_request.js'
apisamplerequest : './parsers/api_sample_request.js',
apideprecated : './parsers/api_deprecated.js'
},
workers: {
apierrorstructure : './workers/api_error_structure.js',
Expand Down
34 changes: 34 additions & 0 deletions lib/parsers/api_deprecated.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
var trim = require('../utils/trim');

function parse(content) {
var deprecated = trim(content);

if (deprecated.length > 0) {
var group = deprecated.split(' ')[0];
group = group.charAt(0).toUpperCase() + group.slice(1);
var name = deprecated.substr(deprecated.indexOf(' ') + 1);
var url = name.replace(/(\s+)/g, '_').replace(/\'/g, '_');
return {
deprecated: {
group: group,
name: name,
url: url
}
};
}

return {
deprecated: {
url: null
}
};
}

/**
* Exports
*/
module.exports = {
parse : parse,
path : 'local',
method : 'insert'
};

0 comments on commit 089abce

Please sign in to comment.