Comparing version 2.2.0 to 2.2.1
@@ -34,13 +34,18 @@ # Development Guidelines | ||
1. Ensure all the tests are passing (`grunt`) and that there is enough test coverage. | ||
1. Make sure you are on the `master` branch of the repository, with all changes merged/commited already. | ||
1. Update the version number in the source code and the README. See [Versioning](#versioning) for information | ||
about selecting an appropriate version number. Files to change: | ||
1. Make sure you are on the `master` branch of the repository, with all changes merged/commited | ||
already. | ||
1. Update the version number anywhere it appears in the source code and documentation. See | ||
[Versioning](#versioning) for information about selecting an appropriate version number. Files to | ||
check: | ||
- package.json | ||
- README.md | ||
1. Commit the version number change with the message "Update to version x.x.x", substituting the new version number. | ||
1. Create a git tag: `git tag -a vx.x.x -m "Release vx.x.x"` | ||
1. Ensure that you have permission to update the [opentok npm module](https://www.npmjs.org/package/opentok) | ||
1. Commit the version number change with the message "Update to version x.y.z", substituting the new | ||
version number. | ||
1. Create a git tag: `git tag -a vx.y.z -m "Release vx.y.z"` | ||
1. Ensure that you have permission to update the | ||
[opentok npm module](https://www.npmjs.org/package/opentok) | ||
1. Run `npm publish` to release to npm. | ||
1. Change the version number for future development by adding "-alpha.1" in each file, then make another commit with the | ||
message "Begin development on next version". | ||
1. Change the version number for future development by incrementing the patch number (z) adding | ||
"-alpha.1" in the source code (not the documentation). For possible files, see above. Then make | ||
another commit with the message "Begin development on next version". | ||
1. Push the changes to the source repository: `git push origin master` | ||
@@ -47,0 +52,0 @@ |
@@ -36,5 +36,10 @@ var util = require('util'), | ||
// handle client errors | ||
if (resp.statusCode === 403) { | ||
return cb(new Error('An authentcation error occurred: (' + resp.statusCode + ') ' + body)); | ||
} | ||
// handle server errors | ||
if (resp.statusCode === 500) { | ||
return cb(new Error('A server error occurred: ('+resp.statusCode+') '+body)); | ||
return cb(new Error('A server error occurred: (' + resp.statusCode + ') ' + body)); | ||
} | ||
@@ -41,0 +46,0 @@ |
{ | ||
"name": "opentok", | ||
"description": "OpenTok server-side SDK", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"homepage": "http://opentok.github.io/opentok-node", | ||
@@ -46,3 +46,3 @@ "repository": { | ||
"grunt-mocha-test": "^0.10.0", | ||
"nock": "^0.27.2" | ||
"nock": "^0.32.3" | ||
}, | ||
@@ -49,0 +49,0 @@ "dependencies": { |
@@ -16,3 +16,5 @@ var expect = require('chai').expect, | ||
// This is specifically concocted for these tests (uses fake apiKey/apiSecret above) | ||
sessionId = '1_MX4xMjM0NTZ-flNhdCBNYXIgMTUgMTQ6NDI6MjMgUERUIDIwMTR-MC40OTAxMzAyNX4'; | ||
sessionId = '1_MX4xMjM0NTZ-flNhdCBNYXIgMTUgMTQ6NDI6MjMgUERUIDIwMTR-MC40OTAxMzAyNX4' | ||
badApiKey = 'badkey', | ||
badApiSecret = 'badsecret'; | ||
nock.disableNetConnect(); | ||
@@ -81,2 +83,24 @@ | ||
describe('when initialized with bad credentials', function() { | ||
beforeEach(function() { | ||
this.opentok = new OpenTok(badApiKey, badApiSecret); | ||
}); | ||
describe('#createSession', function() { | ||
it('throws a client error', function(done) { | ||
var scope = nock('https://api.opentok.com:443') | ||
.post('/hl/session/create', "p2p.preference=disabled") | ||
.reply(403, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><errorPayload><code>-1</code><message>Invalid partner credentials</message></errorPayload>", { server: 'nginx', | ||
date: 'Fri, 30 May 2014 19:37:12 GMT', | ||
'content-type': 'application/xml', | ||
connection: 'keep-alive', | ||
'content-length': '145' }); | ||
this.opentok.createSession(function(err, session) { | ||
expect(err).to.be.an.instanceof(Error); | ||
scope.done(); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
describe('#createSession', function() { | ||
@@ -83,0 +107,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
297039
2396
1