node-github
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -35,3 +35,3 @@ /** | ||
["gists", "gitdata", "issues", "orgs", "pullrequests", "repos", "user", "events"].forEach(function(api) { | ||
["gists", "gitdata", "issues", "orgs", "pullRequests", "repos", "user", "events"].forEach(function(api) { | ||
Util.extend(proto, require("./" + api)); | ||
@@ -38,0 +38,0 @@ }); |
@@ -26,3 +26,3 @@ /** | ||
Util.log("Generating for versions", versions); | ||
versions.forEach(function(version) { | ||
@@ -39,3 +39,3 @@ var dir = __dirname + "/api/" + version; | ||
var testSections = {}; | ||
function createComment(paramsStruct, section, funcName, indent) { | ||
@@ -61,3 +61,3 @@ var params = Object.keys(paramsStruct); | ||
if (!defines.params[paramName]) { | ||
Util.log("Invalid variable parameter name substitution; param '" + | ||
Util.log("Invalid variable parameter name substitution; param '" + | ||
paramName + "' not found in defines block", "fatal"); | ||
@@ -81,6 +81,6 @@ process.exit(1); | ||
} | ||
return comment.join("\n") + "\n" + indent + " **/"; | ||
} | ||
function getParams(paramsStruct, indent) { | ||
@@ -97,3 +97,3 @@ var params = Object.keys(paramsStruct); | ||
if (!defines.params[paramName]) { | ||
Util.log("Invalid variable parameter name substitution; param '" + paramName | ||
Util.log("Invalid variable parameter name substitution; param '" + paramName | ||
+ "' not found in defines block", "fatal"); | ||
@@ -112,3 +112,3 @@ process.exit(1); | ||
} | ||
function prepareApi(struct, baseType) { | ||
@@ -135,3 +135,3 @@ if (!baseType) | ||
var comment = createComment(block.params, section, funcName, " "); | ||
// add the handler to the sections | ||
@@ -143,3 +143,3 @@ if (!sections[section]) | ||
if (headers && headers.length) { | ||
afterRequest = AfterRequestTpl.replace("<%headers%>", "\"" + | ||
afterRequest = AfterRequestTpl.replace("<%headers%>", "\"" + | ||
headers.join("\", \"") + "\""); | ||
@@ -152,3 +152,3 @@ } | ||
); | ||
// add test to the testSections | ||
@@ -169,13 +169,11 @@ if (!testSections[section]) | ||
} | ||
Util.log("Converting routes to functions"); | ||
prepareApi(routes); | ||
Util.log("Writing files to version dir"); | ||
var sectionNames = Object.keys(sections).map(function(name) { | ||
return Util.toCamelCase(name); | ||
}); | ||
var sectionNames = Object.keys(sections); | ||
Util.log("Writing index.js file for version " + version); | ||
Fs.writeFileSync(dir + "/index.js", | ||
Fs.writeFileSync(dir + "/index.js", | ||
IndexTpl | ||
@@ -186,3 +184,3 @@ .replace("<%name%>", defines.constants.name) | ||
"utf8"); | ||
Object.keys(sections).forEach(function(section) { | ||
@@ -196,3 +194,3 @@ var def = sections[section]; | ||
); | ||
Util.log("Writing test file for " + section + ", version " + version); | ||
@@ -237,4 +235,4 @@ def = testSections[section]; | ||
} | ||
main(versions); | ||
} |
{ | ||
"name" : "node-github", | ||
"version" : "0.0.2", | ||
"version" : "0.0.3", | ||
"description" : "Wrapper for the GitHub API", | ||
@@ -5,0 +5,0 @@ "author": "Mike de Boer <mike@c9.io>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
468233
12740
1