Skip to content

Commit

Permalink
Change require statements to use q instead of Q.
Browse files Browse the repository at this point in the history
Fixes #3.
  • Loading branch information
charlescbeebe authored and jamestalmage committed Mar 19, 2015
1 parent 0fce203 commit d40dc52
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/GlobRunner.js
@@ -1,6 +1,6 @@
function TestHook(Glob,Q){
Glob = Glob || require('glob').Glob;
Q = Q || require('Q');
Q = Q || require('q');

return function GlobRunner(/*SyncedFileCollection*/ collection){
var patterns = [];
Expand Down Expand Up @@ -62,4 +62,4 @@ return function GlobRunner(/*SyncedFileCollection*/ collection){
var GlobRunner = TestHook();
GlobRunner.TestHook = TestHook;

module.exports = GlobRunner;
module.exports = GlobRunner;
4 changes: 2 additions & 2 deletions src/S3PromiseWrapper.js
@@ -1,5 +1,5 @@
function TestHook(Q, paramBuilder){
Q = Q || require('Q');
Q = Q || require('q');

paramBuilder = paramBuilder || require('./S3ParameterBuilder.js')

Expand Down Expand Up @@ -67,4 +67,4 @@ return S3PromiseWrapper;
var S3PromiseWrapper = TestHook();
S3PromiseWrapper.TestHook = TestHook;

module.exports = S3PromiseWrapper;
module.exports = S3PromiseWrapper;
4 changes: 2 additions & 2 deletions src/SyncedFile.js
@@ -1,6 +1,6 @@
function TestHook(fileUtils,Q){
fileUtils = fileUtils || require( './file-utils.js');
Q = Q || require('Q');
Q = Q || require('q');

return function SyncedFile (path){

Expand Down Expand Up @@ -86,4 +86,4 @@ return function SyncedFile (path){
var SyncedFile = TestHook();
SyncedFile.TestHook = TestHook;

module.exports = SyncedFile;
module.exports = SyncedFile;
4 changes: 2 additions & 2 deletions src/SyncedFileCollection.js
@@ -1,6 +1,6 @@
function TestHook(SyncedFile,Q) {
SyncedFile = SyncedFile || require('./SyncedFile.js');
Q = Q || require('Q');
Q = Q || require('q');

return function SyncedFileCollection(){

Expand Down Expand Up @@ -74,4 +74,4 @@ return function SyncedFileCollection(){
var SyncedFileCollection = TestHook();
SyncedFileCollection.TestHook = TestHook;

module.exports = SyncedFileCollection;
module.exports = SyncedFileCollection;
4 changes: 2 additions & 2 deletions src/file-utils.js
@@ -1,4 +1,4 @@
var Q = require('Q');
var Q = require('q');

var fs = require('fs');
var crypto = require('crypto');
Expand Down Expand Up @@ -94,4 +94,4 @@ module.exports = {
exists:exists,
get MAX_OPEN(){return MAX_OPEN;},
set MAX_OPEN(mo){MAX_OPEN = mo; _readNextFile();}
};
};
4 changes: 2 additions & 2 deletions test-lib/S3PromiseWrapperStub.js
Expand Up @@ -12,7 +12,7 @@ function S3PromiseWrapperStub(){
'deleteObjects'
].forEach(function(fn){
thisStub[fn] = sinon.spy(function (){
var defer = require('Q').defer();
var defer = require('q').defer();
defer.promise._defer = defer;
return defer.promise;
});
Expand All @@ -26,4 +26,4 @@ s3Spy.instance = function(index){
return s3Spy.thisValues[index];
};

module.exports = s3Spy;
module.exports = s3Spy;
4 changes: 2 additions & 2 deletions test-lib/SyncedFileCollectionStub.js
@@ -1,4 +1,4 @@
var Q = require('Q');
var Q = require('q');

function SyncedFileCollectionStub(){
this.foundFile = sinon.spy();
Expand All @@ -15,4 +15,4 @@ syncedFileSpy.instance = function(index){
return syncedFileSpy.thisValues[index];
} ;

module.exports = syncedFileSpy;
module.exports = syncedFileSpy;
4 changes: 2 additions & 2 deletions test-lib/SyncedFileStub.js
@@ -1,4 +1,4 @@
var Q = require('Q');
var Q = require('q');

function SyncedFileStub(){
this.foundFile = sinon.spy();
Expand All @@ -10,4 +10,4 @@ function SyncedFileStub(){
}


module.exports = SyncedFileStub;
module.exports = SyncedFileStub;
2 changes: 1 addition & 1 deletion test-lib/file-utils-stub.js
@@ -1,5 +1,5 @@

var Q = require('Q');
var Q = require('q');

var sandbox = sinon.sandbox.create();
function promiseStub(){
Expand Down
4 changes: 2 additions & 2 deletions test/S3PromiseWrapperTest.js
@@ -1,6 +1,6 @@
var S3Stub = require('./../test-lib/S3Stub.js');
var S3PromiseWrapper = requireCov('../src/S3PromiseWrapper.js');
var Q = require('Q');
var Q = require('q');

engine.use(function(props,handlers){
props.addProperty('firstCall',handlers.echoHandler);
Expand Down Expand Up @@ -55,4 +55,4 @@ describe('S3PromiseWrapper', function () {
).then.notify(done);
});
});
});
});
4 changes: 2 additions & 2 deletions test/SyncedFileTest.js
@@ -1,4 +1,4 @@
var Q = require('Q');
var Q = require('q');
var fileUtils = requireCov('../src/file-utils.js');
var SyncedFile = requireCov('../src/SyncedFile.js').TestHook(fileUtils,Q);

Expand Down Expand Up @@ -180,4 +180,4 @@ describe('SyncedFile', function () {

});

});
});
2 changes: 1 addition & 1 deletion test/bootstrap/index.js
Expand Up @@ -7,7 +7,7 @@ chai.use(require('../../test-lib/BufferHelper.js'));
chai.use(require('sinon-chai'));
chai.use(require('chai-things'));

var Q = require('Q');
var Q = require('q');
Q.longStackSupport = true;
var PromiseEngine = require('promise-testing/index.js');
var engine = new PromiseEngine();
Expand Down

0 comments on commit d40dc52

Please sign in to comment.