-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1aac988
commit 0cb05b1
Showing
21 changed files
with
207,313 additions
and
5 deletions.
There are no files selected for viewing
4,687 changes: 4,687 additions & 0 deletions
4,687
priv/ember_riak_explorer/dist/assets/ember-riak-explorer.css
Large diffs are not rendered by default.
Oops, something went wrong.
199 changes: 199 additions & 0 deletions
199
priv/ember_riak_explorer/dist/assets/ember-riak-explorer.css.map
Large diffs are not rendered by default.
Oops, something went wrong.
43,673 changes: 43,673 additions & 0 deletions
43,673
priv/ember_riak_explorer/dist/assets/ember-riak-explorer.js
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* globals requirejs, require */ | ||
(function() { | ||
define("ember-cli/test-loader", | ||
[], | ||
function() { | ||
"use strict"; | ||
|
||
var moduleIncludeMatchers = []; | ||
var moduleExcludeMatchers = []; | ||
|
||
function addModuleIncludeMatcher(fn) { | ||
moduleIncludeMatchers.push(fn); | ||
}; | ||
|
||
function addModuleExcludeMatcher(fn) { | ||
moduleExcludeMatchers.push(fn); | ||
}; | ||
|
||
function checkMatchers(matchers, moduleName) { | ||
var matcher; | ||
|
||
for (var i = 0, l = matchers.length; i < l; i++) { | ||
matcher = matchers[i]; | ||
|
||
if (matcher(moduleName)) { | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
|
||
function TestLoader() { | ||
this._didLogMissingUnsee = false; | ||
}; | ||
|
||
TestLoader.prototype = { | ||
shouldLoadModule: function(moduleName) { | ||
return (moduleName.match(/[-_]test$/)); | ||
}, | ||
|
||
listModules: function() { | ||
return Object.keys(requirejs.entries); | ||
}, | ||
|
||
loadModules: function() { | ||
var moduleName, index, length; | ||
var moduleNames = this.listModules(); | ||
|
||
for (index = 0, length = moduleNames.length; index < length; index++) { | ||
moduleName = moduleNames[index]; | ||
|
||
if (checkMatchers(moduleExcludeMatchers, moduleName)) { | ||
continue; | ||
} | ||
|
||
if (checkMatchers(moduleIncludeMatchers, moduleName) || this.shouldLoadModule(moduleName)) { | ||
this.require(moduleName); | ||
this.unsee(moduleName); | ||
} | ||
} | ||
} | ||
}; | ||
|
||
TestLoader.prototype.require = function(moduleName) { | ||
try { | ||
require(moduleName); | ||
} catch(e) { | ||
this.moduleLoadFailure(moduleName, e); | ||
} | ||
}; | ||
|
||
TestLoader.prototype.unsee = function(moduleName) { | ||
if (typeof require.unsee === 'function') { | ||
require.unsee(moduleName); | ||
} else if (!this._didLogMissingUnsee) { | ||
this._didLogMissingUnsee = true; | ||
if (typeof console !== 'undefined') { | ||
console.warn('unable to require.unsee, please upgrade loader.js to >= v3.3.0'); | ||
} | ||
} | ||
}; | ||
|
||
TestLoader.prototype.moduleLoadFailure = function(moduleName, error) { | ||
console.error('Error loading: ' + moduleName, error.stack); | ||
}; | ||
|
||
TestLoader.load = function() { | ||
new TestLoader().loadModules(); | ||
}; | ||
|
||
return { | ||
'default': TestLoader, | ||
addModuleIncludeMatcher: addModuleIncludeMatcher, | ||
addModuleExcludeMatcher: addModuleExcludeMatcher | ||
}; | ||
} | ||
); | ||
})(); |
Oops, something went wrong.