Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Run jsbeautifier, change indentation to 2 spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar committed Jan 19, 2016
1 parent e2ffd1c commit 9b6034d
Show file tree
Hide file tree
Showing 9 changed files with 1,141 additions and 1,071 deletions.
58 changes: 29 additions & 29 deletions bin/raven
Expand Up @@ -4,22 +4,22 @@ var os = require('os');
var raven = require('../');

function usage() {
var path = require('path');
console.log('usage:', path.basename(process.argv[1]), 'test [SENTRY_DSN]');
var path = require('path');
console.log('usage:', path.basename(process.argv[1]), 'test [SENTRY_DSN]');
}

if (process.argv[2] !== 'test') {
usage();
process.exit(1);
usage();
process.exit(1);
}

var dsn = process.argv.slice(3).join(' ') || process.env.SENTRY_DSN;
if (!dsn) {
usage();
console.log();
console.log('Error: No configuration detected!');
console.log('You must either pass a DSN to the command or set the SENTRY_DSN environment variable.');
process.exit(1);
usage();
console.log();
console.log('Error: No configuration detected!');
console.log('You must either pass a DSN to the command or set the SENTRY_DSN environment variable.');
process.exit(1);
}

console.log('Using DSN configuration:');
Expand All @@ -31,29 +31,29 @@ var client = new raven.Client(dsn);
console.log('Sending a test message...');

client.on('logged', function(result) {
console.log('success!');
console.log('Event ID was', client.getIdent(result));
console.log('success!');
console.log('Event ID was', client.getIdent(result));
});
client.on('error', function(err) {
console.log('error!');
throw err;
console.log('error!');
throw err;
});

try {
test
test
} catch (ex) {
client.captureException(ex, {
message: 'This is a test message generated using ``raven test``',
level: 'info',
logger: 'sentry.test',
culprit: 'bin:raven at main',
request: {
method: 'GET',
url: 'http://example.com'
},
extra: {
user: process.getuid && process.getuid(),
loadavg: os.loadavg()
}
});
}
client.captureException(ex, {
message: 'This is a test message generated using ``raven test``',
level: 'info',
logger: 'sentry.test',
culprit: 'bin:raven at main',
request: {
method: 'GET',
url: 'http://example.com'
},
extra: {
user: process.getuid && process.getuid(),
loadavg: os.loadavg()
}
});
}

0 comments on commit 9b6034d

Please sign in to comment.