Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding raven.version

  • Loading branch information...
commit defc3a04ccebc48b3cc3c57cb00f55c7f350f82d 1 parent cf6906c
@mattrobenolt mattrobenolt authored
Showing with 8 additions and 1 deletion.
  1. +2 −0  lib/client.js
  2. +1 −1  lib/utils.js
  3. +5 −0 test/raven.client.js
View
2  lib/client.js
@@ -4,6 +4,8 @@ var zlib = require('zlib'),
uuid = require('node-uuid'),
http = {http: require('http'), https: require('https')};
+module.exports.version = '0.2.0-dev';
+
var Client = function Client(dsn, options) {
options = options || {};
this.dsn = utils.parseDSN(dsn);
View
2  lib/utils.js
@@ -19,9 +19,9 @@ module.exports.get_auth_header = function get_auth_header(signature, timestamp,
var header = ['Sentry sentry_version=2.0'];
header.push('sentry_signature='+signature);
header.push('sentry_timestamp='+timestamp);
- header.push('sentry_client=raven-node/0.1');
if(api_key) header.push('sentry_key='+api_key);
if(project_id) header.push('project_id='+project_id);
+ header.push('sentry_client=raven-node/'+raven.version);
return header.join(', ');
};
View
5 test/raven.client.js
@@ -4,6 +4,11 @@ var raven = require('../')
var dsn = 'https://public:private@app.getsentry.com/269';
+describe('raven.version', function(){
+ it('should be valid', function(){
+ raven.version.should.match(/^\d+\.\d+\.\d+(-\w+)?$/);
+ });
+});
describe('raven.Client', function(){
var client;
Please sign in to comment.
Something went wrong with that request. Please try again.