Permalink
Browse files

[dist] Update package.json, and .gitignore. Update require statements…

… to be more future proof. Fixes #8
  • Loading branch information...
1 parent fd5a4ff commit 2e92b4986d584948aae4a797274e828bdbf2ac3b @indexzero indexzero committed May 14, 2011
View
@@ -1,2 +1,4 @@
test/data
-test/data/*
+test/data/*
+node_modules
+npm-debug.log
View
@@ -6,19 +6,17 @@
*
*/
-require.paths.unshift(__dirname);
-
var loggly = exports;
//
// Export node-loggly core client APIs
//
-loggly.createClient = require('loggly/core').createClient;
-loggly.Loggly = require('loggly/core').Loggly;
-loggly.Config = require('loggly/config').Config;
+loggly.createClient = require('./loggly/core').createClient;
+loggly.Loggly = require('./loggly/core').Loggly;
+loggly.Config = require('./loggly/config').Config;
//
// Export Resources for node-loggly
//
-loggly.Input = require('loggly/input').Input;
-loggly.Device = require('loggly/device').Device;
+loggly.Input = require('./loggly/input').Input;
+loggly.Device = require('./loggly/device').Device;
View
@@ -1,4 +1,3 @@
-
/*
* core.js: Core functions for accessing Loggly
*
@@ -7,15 +6,13 @@
*
*/
-require.paths.join(require('path').join(__dirname, '..'));
-
var events = require('events'),
qs = require('querystring'),
config = require('./config'),
interns = require('./interns'),
Search = require('./search').Search,
Facet = require('./facet').Facet,
- loggly = require('loggly');
+ loggly = require('../loggly');
//
// function createClient (options)
View
@@ -6,9 +6,7 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..'));
-
-var loggly = require('loggly'),
+var loggly = require('../loggly'),
interns = require('./interns');
var Device = function (client, details) {
View
@@ -5,10 +5,8 @@
* MIT LICENSE
*
*/
-
-require.paths.unshift(require('path').join(__dirname, '..'));
-var loggly = require('loggly'),
+var loggly = require('../loggly'),
interns = require('./interns');
var Input = function (client, details) {
View
@@ -6,10 +6,8 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..'));
-
var request = require('request'),
- loggly = require('loggly');
+ loggly = require('../loggly');
var interns = exports;
View
@@ -9,14 +9,17 @@
{ "name": "Kord Campbell", "email": "kordless@loggly.com" }
],
"repository": {
- "type": "git",
- "url": "http://github.com/nodejitsu/node-loggly.git"
+ "type": "git",
+ "url": "http://github.com/nodejitsu/node-loggly.git"
},
"keywords": ["cloud computing", "api", "logging", "loggly"],
"dependencies": {
- "request": ">= 1.9.0"
+ "request": "1.9.x"
+ },
+ "devDependencies": {
+ "vows": "0.5.x"
},
"main": "./lib/loggly",
"scripts": { "test": "vows test/*-test.js --spec" },
- "engines": { "node": ">= 0.4.0" }
+ "engines": { "node": "0.4.x" }
}
View
@@ -5,8 +5,6 @@
* MIT LICENSE
*
*/
-
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
var path = require('path'),
vows = require('vows'),
@@ -15,7 +13,7 @@ var path = require('path'),
var options = {},
config = helpers.loadConfig(),
- loggly = require('loggly').createClient(config);
+ loggly = require('../lib/loggly').createClient(config);
vows.describe('node-loggly/devices').addBatch({
"When using the node-loggly client": {
View
@@ -5,15 +5,13 @@
* MIT LICENSE
*
*/
-
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
var fs = require('fs'),
util = require('util'),
path = require('path'),
vows = require('vows'),
assert = require('assert'),
- loggly = require('loggly');
+ loggly = require('../lib/loggly');
var helpers = exports;
View
@@ -6,8 +6,6 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
@@ -16,7 +14,7 @@ var path = require('path'),
var options = {},
testContext = {},
config = helpers.loadConfig(),
- loggly = require('loggly').createClient(config);
+ loggly = require('../lib/loggly').createClient(config);
vows.describe('node-loggly/inputs').addBatch({
"When using the node-loggly client": {
View
@@ -8,11 +8,8 @@
var path = require('path'),
vows = require('vows'),
- assert = require('assert');
-
-require.paths.unshift(path.join(__dirname, '..', 'lib'));
-
-var interns = require('loggly/interns');
+ assert = require('assert'),
+ interns = require('../lib/loggly/interns');
vows.describe('node-loggly/interns').addBatch({
"When using the interns module": {
View
@@ -6,15 +6,13 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
helpers = require('./helpers');
var config = helpers.loadConfig(),
- loggly = require('loggly').createClient({ subdomain: config.subdomain });
+ loggly = require('../lib/loggly').createClient({ subdomain: config.subdomain });
vows.describe('node-loggly/inputs').addBatch({
"When using the node-loggly client": {
View
@@ -6,8 +6,6 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
@@ -16,7 +14,7 @@ var path = require('path'),
var options = {},
testContext = {},
config = helpers.loadConfig(),
- loggly = require('loggly').createClient(config);
+ loggly = require('../lib/loggly').createClient(config);
vows.describe('node-loggly/search').addBatch({
"When using the node-loggly client": {

0 comments on commit 2e92b49

Please sign in to comment.