Skip to content

Commit

Permalink
built with new version of simq
Browse files Browse the repository at this point in the history
  • Loading branch information
sakren committed Dec 12, 2013
1 parent 862091c commit a7e6cb9
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"test": "npm run test-node && npm run test-browser",
"test-build": "cd ./test/browser; simq build;",
"test-node": "mocha ./test/node/index.js --reporter spec",
"test-browser": "mocha-phantomjs ./test/browser/index.html"
"test-browser": "npm run test-build; mocha-phantomjs ./test/browser/index.html"
}
}
69 changes: 52 additions & 17 deletions test/browser/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

// Generated by CoffeeScript 1.6.3
(function() {
var SUPPORTED, cache, modules, require, resolve, stats;
var SUPPORTED, arrayIndexOf, cache, creating, modules, require, resolve, stats;

if (!this.require) {
SUPPORTED = ['js', 'json', 'ts', 'coffee', 'eco'];
modules = {};
stats = {};
cache = {};
creating = [];
require = function(name, parent) {
var fullName, m;
if (parent == null) {
Expand All @@ -28,9 +29,15 @@
parent: null,
children: null
};
modules[fullName].apply(window, [m.exports, m]);
if (arrayIndexOf(creating, fullName) === -1) {
creating.push(fullName);
modules[fullName].apply(window, [m.exports, m]);
creating.splice(arrayIndexOf(creating, fullName));
cache[fullName] = m;
}
m.loaded = true;
cache[fullName] = m;
} else {
m = cache[fullName];
}
if (typeof stats[fullName] === 'undefined') {
stats[fullName] = {
Expand All @@ -40,7 +47,7 @@
};
}
stats[fullName].atime = new Date;
return cache[fullName].exports;
return m.exports;
};
resolve = function(name, parent) {
var ext, num, part, parts, prev, result, _i, _j, _k, _len, _len1, _len2;
Expand Down Expand Up @@ -89,6 +96,22 @@
}
return null;
};
arrayIndexOf = function(array, search) {
var element, i, _i, _len;
if (typeof Array.prototype.indexOf !== 'undefined') {
return array.indexOf(search);
}
if (array.length === 0) {
return -1;
}
for (i = _i = 0, _len = array.length; _i < _len; i = ++_i) {
element = array[i];
if (element === search) {
return i;
}
}
return -1;
};
this.require = function(name, parent) {
if (parent == null) {
parent = null;
Expand All @@ -103,14 +126,21 @@
}
return resolve(name, parent);
};
this.require.define = function(bundle) {
this.require.define = function(bundleOrName, obj) {
var m, name, _results;
_results = [];
for (name in bundle) {
m = bundle[name];
_results.push(modules[name] = m);
if (obj == null) {
obj = null;
}
if (typeof bundleOrName === 'string') {
return modules[bundleOrName] = obj;
} else {
_results = [];
for (name in bundleOrName) {
m = bundleOrName[name];
_results.push(modules[name] = m);
}
return _results;
}
return _results;
};
this.require.release = function() {
var name, _results;
Expand Down Expand Up @@ -1578,7 +1608,7 @@
return {
"name": "dependency-injection",
"description": "Dependency injection with configuration and autowire for node js and browser",
"version": "1.7.2",
"version": "1.7.3",
"author": {
"name": "David Kudera",
"email": "sakren@gmail.com"
Expand All @@ -1599,14 +1629,19 @@
},
"main": "./lib/DI",
"dependencies": {
"easy-configuration": "~1.6.6"
"easy-configuration": "1.6.6"
},
"devDependencies": {
"chai": "~1.8.1",
"mocha": "~1.14.0"
"chai": "1.8.1",
"mocha": "1.15.1",
"mocha-phantomjs": "3.2.0",
"phantomjs": "1.9.2-5"
},
"scripts": {
"test": "cd ./test; echo \"Testing in node:\"; mocha ./node/index.js --reporter spec; cd browser; echo \"Testing in browser:\"; simq build; mocha-phantomjs ./index.html"
"test": "npm run test-node && npm run test-browser",
"test-build": "cd ./test/browser; simq build;",
"test-node": "mocha ./test/node/index.js --reporter spec",
"test-browser": "npm run test-build; mocha-phantomjs ./test/browser/index.html"
}
}
}).call(this);
Expand Down Expand Up @@ -1681,8 +1716,8 @@
, 'recursive-merge': function(exports, module) { module.exports = window.require('recursive-merge/lib/Merge.js'); }

});
require.__setStats({"/lib/Service.js":{"atime":1385453313000,"mtime":1385453296000,"ctime":1385453296000},"/lib/Helpers.js":{"atime":1385453411000,"mtime":1385453408000,"ctime":1385453408000},"/lib/DI.js":{"atime":1385453313000,"mtime":1385453296000,"ctime":1385453296000},"easy-configuration/lib/EasyConfiguration.js":{"atime":1385451228000,"mtime":1385411214000,"ctime":1385450928000},"recursive-merge/lib/Merge.js":{"atime":1385451229000,"mtime":1385409966000,"ctime":1385450932000},"easy-configuration/lib/Extension.js":{"atime":1385451229000,"mtime":1385411214000,"ctime":1385450928000},"easy-configuration/lib/Helpers.js":{"atime":1385451229000,"mtime":1385411214000,"ctime":1385450928000},"/test/browser/tests/DI.coffee":{"atime":1385452986000,"mtime":1385452984000,"ctime":1385452984000},"/test/browser/tests/Helpers.coffee":{"atime":1385450794000,"mtime":1385450793000,"ctime":1385450793000},"/lib/DIConfigurator.js":{"atime":1385453316000,"mtime":1385453296000,"ctime":1385453296000},"/test/data/Application.coffee":{"atime":1385450794000,"mtime":1385450793000,"ctime":1385450793000},"/test/data/Http.coffee":{"atime":1385450855000,"mtime":1384940373000,"ctime":1384940373000},"/package.json":{"atime":1385453423000,"mtime":1385453421000,"ctime":1385453421000},"easy-configuration/package.json":{"atime":1385450943000,"mtime":1385450929000,"ctime":1385450929000}});
require.version = '5.1.3';
require.__setStats({"/lib/Service.js":{"atime":1386834783000,"mtime":1386834781000,"ctime":1386834781000},"/lib/Helpers.js":{"atime":1386834783000,"mtime":1386834781000,"ctime":1386834781000},"/lib/DI.js":{"atime":1386834783000,"mtime":1386834781000,"ctime":1386834781000},"easy-configuration/lib/EasyConfiguration.js":{"atime":1386835303000,"mtime":1385411214000,"ctime":1385450928000},"recursive-merge/lib/Merge.js":{"atime":1386835303000,"mtime":1385409966000,"ctime":1385450932000},"easy-configuration/lib/Extension.js":{"atime":1386835304000,"mtime":1385411214000,"ctime":1385450928000},"easy-configuration/lib/Helpers.js":{"atime":1386835304000,"mtime":1385411214000,"ctime":1385450928000},"/test/browser/tests/DI.coffee":{"atime":1386835304000,"mtime":1385452984000,"ctime":1385452984000},"/test/browser/tests/Helpers.coffee":{"atime":1386835304000,"mtime":1385450793000,"ctime":1385450793000},"/lib/DIConfigurator.js":{"atime":1386834783000,"mtime":1386834781000,"ctime":1386834781000},"/test/data/Application.coffee":{"atime":1386835304000,"mtime":1385450793000,"ctime":1385450793000},"/test/data/Http.coffee":{"atime":1386835304000,"mtime":1384940373000,"ctime":1384940373000},"/package.json":{"atime":1386835281000,"mtime":1386835278000,"ctime":1386835278000},"easy-configuration/package.json":{"atime":1386835040000,"mtime":1385450929000,"ctime":1385450929000}});
require.version = '5.5.1';

/** run section **/

Expand Down
2 changes: 1 addition & 1 deletion test/browser/config/setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": {
"application": {
"base": "../../",
"application": "./test/browser/application.js",
"target": "./test/browser/application.js",
"modules": [
"./test/browser/tests/*.coffee",
"./lib/*.js",
Expand Down

0 comments on commit a7e6cb9

Please sign in to comment.