Permalink
Browse files

Updated for exoskeleton

  • Loading branch information...
1 parent 995b720 commit ab1fd54c5ab0547a87bc0931a851ac37d09eb823 @balupton balupton committed Oct 31, 2013
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -6,7 +6,7 @@
assert = (typeof require === "function" ? require('assert') : void 0) || this.assert;
- Backbone = (typeof require === "function" ? require('backbone') : void 0) || this.Backbone;
+ Backbone = (typeof require === "function" ? require('exoskeleton') : void 0) || this.Backbone;
joe = (typeof require === "function" ? require('joe') : void 0) || this.joe;
View
@@ -49,7 +49,9 @@
"type": "git",
"url": "http://github.com/bevry/query-engine.git"
},
- "dependencies": {},
+ "dependencies": {
+ "docpad": "~6.54.2"
+ },
"peerDependencies": {
"backbone": "*"
},
@@ -58,7 +60,7 @@
"underscore": "~1.5.2",
"coffee-script": "~1.6.2",
"docpad": ">=6.21.5 <7",
- "docpad-plugin-coffeescript": "2",
+ "docpad-plugin-coffeescript": "~2.2.2",
"joe": "~1.3.0",
"joe-reporter-console": "~1.2.1",
"benchmark": "~1.0.0",
@@ -71,4 +73,4 @@
"test": "node ./out/test/everything-test.js"
},
"main": "./out/lib/query-engine.js"
-}
+}
@@ -1,6 +1,6 @@
# Requires
try
- Backbone = (if module? then require('backbone') else @Backbone) ? null
+ Backbone = require?('exoskeleton') or @Backbone
catch err
Backbone = null
@@ -1,7 +1,7 @@
# Requires
queryEngine = require?(__dirname+'/../lib/query-engine') or @queryEngine
assert = require?('assert') or @assert
-Backbone = require?('backbone') or @Backbone
+Backbone = require?('exoskeleton') or @Backbone
joe = require?('joe') or @joe
{describe} = joe
@@ -1,7 +1,7 @@
# Requires
queryEngine = require?(__dirname+'/../lib/query-engine') or @queryEngine
assert = require?('assert') or @assert
-Backbone = require?('backbone') or @Backbone
+Backbone = require?('exoskeleton') or @Backbone
joe = require?('joe') or @joe
{describe} = joe
@@ -1,8 +1,7 @@
# Requires
queryEngine = require?(__dirname+'/../lib/query-engine') or @queryEngine
assert = require?('assert') or @assert
-Backbone = require?('backbone') or @Backbone
-_ = require?('underscore') or @_
+Backbone = require?('exoskeleton') or @Backbone
joe = require?('joe') or @joe
{describe} = joe
@@ -61,7 +60,7 @@ modelsObject =
stores =
modelsAsObject: modelsObject
- modelsAsArray: _.values(modelsObject)
+ modelsAsArray: (value for own key,value of modelsObject)
modelsAsParsedObject: queryEngine.createCollection(modelsObject)
modelsAsCollection: queryEngine.createCollection(
'index': new Backbone.Model(modelsObject.index)
@@ -260,7 +259,7 @@ generateTestSuite = (describe, it, storeName, store) ->
# Vanilla
unless store instanceof queryEngine.QueryCollection
describe 'queries', (describe,it) ->
- _.each queryTests, (queryTest,queryTestName) ->
+ for own queryTestName, queryTest of queryTests # tests are serial, so this is okay
it queryTestName, ->
debugger if queryTest.debug
criteriaOptions = {queries:find:queryTest.query}
@@ -274,7 +273,7 @@ generateTestSuite = (describe, it, storeName, store) ->
# Backbone
else
describe 'queries', (describe,it) ->
- _.each queryTests, (queryTest,queryTestName) ->
+ for own queryTestName, queryTest of queryTests # tests are serial, so this is okay
it queryTestName, ->
debugger if queryTest.debug
actual = store.findAll(queryTest.query)
@@ -1,7 +1,7 @@
# Requires
queryEngine = require?(__dirname+'/../lib/query-engine') or @queryEngine
assert = require?('assert') or @assert
-Backbone = require?('backbone') or @Backbone
+Backbone = require?('exoskeleton') or @Backbone
joe = require?('joe') or @joe
{describe} = joe

0 comments on commit ab1fd54

Please sign in to comment.