Permalink
Browse files

Cleanup - reorganize Resources files

  • Loading branch information...
1 parent 94b256f commit ab7524e13a2573c1fe4e3de1d4e6ce845048c86e jden committed Nov 21, 2015
View
@@ -6,5 +6,6 @@
"beforeEach" : false,
"after" : false,
"afterEach" : false
- }
+ },
+ "node": true
}
View
@@ -1,8 +1,8 @@
-var Resource = require('./lib/resource.js'),
- MessageList = require('./lib/resources/message_list.js'),
+var Resource = require('./lib/resources/resource'),
+ MessageList = require('./lib/resources/message_list'),
Presence = require('./lib/resources/presence'),
- Status = require('./lib/resources/status.js'),
- Stream = require('./lib/resources/stream/index.js');
+ Status = require('./lib/resources/status'),
+ Stream = require('./lib/resources/stream');
module.exports = {
Persistence: require('persistence'),
@@ -1,4 +1,4 @@
-var Resource = require('../../resource.js'),
+var Resource = require('../resource.js'),
PresenceManager = require('./presence_manager.js'),
Sentry = require('./sentry.js'),
EventEmitter = require('events').EventEmitter,
@@ -1,7 +1,7 @@
var Persistence = require('persistence'),
MiniEventEmitter = require('miniee'),
logging = require('minilog')('radar:resource'),
- Stamper = require('../stamper.js');
+ Stamper = require('../../stamper.js');
/*
@@ -19,8 +19,10 @@ Resources
*/
-function recursiveMerge(target) {
- Array.prototype.slice.call(arguments, 1).forEach(function(source) {
+function recursiveMerge(target /*, ..sources */) {
+ var sources = Array.prototype.slice.call(arguments, 1)
+
+ sources.forEach(function(source) {
if (source) {
Object.keys(source).forEach(function(name) {
// Catch 0s and false too
@@ -1,4 +1,4 @@
-var Resource = require('../../resource.js'),
+var Resource = require('../resource.js'),
Persistence = require('persistence'),
logging = require('minilog')('radar:stream'),
SubscriberState = require('./subscriber_state.js');
@@ -1,6 +1,6 @@
var assert = require('assert'),
- Common = require('./common.js'),
- MessageList = require('../core/lib/resources/message_list.js'),
+ Common = require('./common'),
+ MessageList = require('../core/lib/resources/message_list'),
Persistence = require('persistence');
describe('For a message list', function() {
@@ -1,5 +1,5 @@
var assert = require('assert'),
- Status = require('../core/lib/resources/status.js'),
+ Status = require('../core/lib/resources/status'),
Persistence = require('persistence'),
Common = require('./common.js');

0 comments on commit ab7524e

Please sign in to comment.