Comparing version 1.0.2 to 2.0.0
14
cot.js
@@ -6,6 +6,6 @@ // Generated by CoffeeScript 1.10.0 | ||
Cot = function(opts) { | ||
var auth, hostname, notStandardHttpPort, notStandardHttpsPort, pass, port, ref, ssl, user; | ||
var auth, hostname, notStandardHttpPort, notStandardHttpsPort, pass, port, protocol, ref, ssl, user; | ||
port = opts.port, hostname = opts.hostname, user = opts.user, pass = opts.pass, auth = opts.auth, ssl = opts.ssl, hostname = opts.hostname; | ||
this.port = port; | ||
this.hostname = hostname; | ||
protocol = ssl ? 'https' : 'http'; | ||
this.host = protocol + "://" + hostname + ":" + port; | ||
if (auth != null) { | ||
@@ -16,4 +16,3 @@ ref = auth.split(':'), user = ref[0], pass = ref[1]; | ||
this.pass = pass; | ||
this.ssl = ssl; | ||
this.hostHeader = this.hostname; | ||
this.hostHeader = hostname; | ||
notStandardHttpPort = !ssl && port !== 80; | ||
@@ -43,4 +42,3 @@ notStandardHttpsPort = ssl && port !== 443; | ||
jsonRequest: function(method, path, body) { | ||
var headers, params, protocol, verb; | ||
protocol = this.ssl ? 'https' : 'http'; | ||
var headers, params, verb; | ||
headers = { | ||
@@ -51,3 +49,3 @@ accept: 'application/json', | ||
params = { | ||
url: protocol + "://" + this.hostname + ":" + this.port + path, | ||
url: "" + this.host + path, | ||
headers: headers | ||
@@ -54,0 +52,0 @@ }; |
@@ -14,12 +14,11 @@ { | ||
"watch": "coffee -cw cot.coffee", | ||
"build-test": "coffee -c test/*.coffee", | ||
"watch-test": "coffee -cw test/*.coffee", | ||
"test": "npm run build-test && mocha", | ||
"test": "mocha --compilers coffee:coffee-script/register", | ||
"test-watch": "mocha --compilers coffee:coffee-script/register --watch", | ||
"benchmark": "coffee benchmark/benchmark.coffee", | ||
"prepublish": "npm build && npm test" | ||
}, | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"main": "cot", | ||
"dependencies": { | ||
"bluereq": "^0.3.0" | ||
"bluereq": "^2.1.0" | ||
}, | ||
@@ -39,2 +38,3 @@ "author": { | ||
"chai": "^1.9.2", | ||
"coffee-errors": "^0.8.6", | ||
"coffee-script": "^1.10.0", | ||
@@ -41,0 +41,0 @@ "cot": "0.0.6", |
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
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
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
142629
7
24
2569
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedbluebird@3.7.2(transitive)
+ Addedbluereq@2.1.12(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedlodash.pick@4.4.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.13.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
- Removedasn1@0.1.11(transitive)
- Removedassert-plus@0.1.5(transitive)
- Removedasync@0.9.2(transitive)
- Removedaws-sign2@0.5.0(transitive)
- Removedbluebird@2.11.0(transitive)
- Removedbluereq@0.3.0(transitive)
- Removedboom@0.4.2(transitive)
- Removedcombined-stream@0.0.7(transitive)
- Removedcryptiles@0.2.2(transitive)
- Removedctype@0.5.3(transitive)
- Removeddelayed-stream@0.0.5(transitive)
- Removedforever-agent@0.5.2(transitive)
- Removedform-data@0.1.4(transitive)
- Removedhawk@1.0.0(transitive)
- Removedhoek@0.9.1(transitive)
- Removedhttp-signature@0.10.1(transitive)
- Removedmime@1.2.11(transitive)
- Removednode-uuid@1.4.8(transitive)
- Removedoauth-sign@0.3.0(transitive)
- Removedqs@0.6.6(transitive)
- Removedrequest@2.34.0(transitive)
- Removedsntp@0.2.4(transitive)
- Removedtldts@6.1.64(transitive)
- Removedtldts-core@6.1.64(transitive)
- Removedtough-cookie@5.0.0(transitive)
- Removedtunnel-agent@0.3.0(transitive)
Updatedbluereq@^2.1.0