diff --git a/VERSION b/VERSION index 04c5555c..baa98378 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.17 +0.1.20 diff --git a/bower.json b/bower.json index 33d07119..5a5e9557 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ember-resolver", - "version": "0.1.19", + "version": "0.1.20", "license": "MIT", "main": ["dist/ember-resolver.js", "dist/ember-resolver.prod.js", "dist/ember-resolver.min.js"], "ignore": [ diff --git a/dist/ember-resolver-spade.js b/dist/ember-resolver-spade.js index 11033b17..3cbb5c25 100644 --- a/dist/ember-resolver-spade.js +++ b/dist/ember-resolver-spade.js @@ -6,4 +6,4 @@ // ========================================================================== -minispade.register('ember-resolver/container-debug-adapter', "(function() {/*globals define registry requirejs */\n\ndefine(\"ember/container-debug-adapter\",\n [],\n function() {\n \"use strict\";\n\n // Support Ember < 1.5-beta.4\n // TODO: Remove this after 1.5.0 is released\n if (typeof Ember.ContainerDebugAdapter === 'undefined') {\n return null;\n }\n /*\n * This module defines a subclass of Ember.ContainerDebugAdapter that adds two\n * important features:\n *\n * 1) is able provide injections to classes that implement `extend`\n * (as is typical with Ember).\n */\n\n var ContainerDebugAdapter = Ember.ContainerDebugAdapter.extend({\n /**\n The container of the application being debugged.\n This property will be injected\n on creation.\n\n @property container\n @default null\n */\n // container: null, LIVES IN PARENT\n\n /**\n The resolver instance of the application\n being debugged. This property will be injected\n on creation.\n\n @property resolver\n @default null\n */\n // resolver: null, LIVES IN PARENT\n /**\n Returns true if it is possible to catalog a list of available\n classes in the resolver for a given type.\n\n @method canCatalogEntriesByType\n @param {string} type The type. e.g. \"model\", \"controller\", \"route\"\n @return {boolean} whether a list is available for this type.\n */\n canCatalogEntriesByType: function(type) {\n return true;\n },\n\n /**\n * Get all defined modules.\n *\n * @method _getEntries\n * @return {Array} the list of registered modules.\n * @private\n */\n _getEntries: function() {\n return requirejs.entries;\n },\n\n /**\n Returns the available classes a given type.\n\n @method catalogEntriesByType\n @param {string} type The type. e.g. \"model\", \"controller\", \"route\"\n @return {Array} An array of classes.\n */\n catalogEntriesByType: function(type) {\n var entries = this._getEntries(),\n module,\n types = Ember.A();\n\n var makeToString = function(){\n return this.shortname;\n };\n\n var prefix = this.namespace.modulePrefix;\n\n for(var key in entries) {\n if(entries.hasOwnProperty(key) && key.indexOf(type) !== -1) {\n // Check if it's a pod module\n var name = getPod(type, key, this.namespace.podModulePrefix || prefix);\n if (!name) {\n // Not pod\n name = key.split(type + 's/').pop();\n\n // Support for different prefix (such as ember-cli addons).\n // Uncomment the code below when\n // https://github.com/ember-cli/ember-resolver/pull/80 is merged.\n\n //var match = key.match('^/?(.+)/' + type);\n //if (match && match[1] !== prefix) {\n // Different prefix such as an addon\n //name = match[1] + '@' + name;\n //}\n }\n types.addObject(name);\n }\n }\n return types;\n }\n });\n\n function getPod(type, key, prefix) {\n var match = key.match(new RegExp('^/?' + prefix + '/(.+)/' + type + '$'));\n if (match) {\n return match[1];\n }\n }\n\n ContainerDebugAdapter['default'] = ContainerDebugAdapter;\n return ContainerDebugAdapter;\n});\n\n})();\n//@ sourceURL=ember-resolver/container-debug-adapter");minispade.register('ember-resolver/core', "(function() {/*globals define registry requirejs */\n\ndefine(\"ember/resolver\",\n [],\n function() {\n \"use strict\";\n\n if (typeof requirejs.entries === 'undefined') {\n requirejs.entries = requirejs._eak_seen;\n }\n\n /*\n * This module defines a subclass of Ember.DefaultResolver that adds two\n * important features:\n *\n * 1) The resolver makes the container aware of es6 modules via the AMD\n * output. The loader's _moduleEntries is consulted so that classes can be\n * resolved directly via the module loader, without needing a manual\n * `import`.\n * 2) is able to provide injections to classes that implement `extend`\n * (as is typical with Ember).\n */\n\n function classFactory(klass) {\n return {\n create: function (injections) {\n if (typeof klass.extend === 'function') {\n return klass.extend(injections);\n } else {\n return klass;\n }\n }\n };\n }\n\n var create = (Object.create || Ember.create);\n if (!(create && !create(null).hasOwnProperty)) {\n throw new Error(\"This browser does not support Object.create(null), please polyfil with es5-sham: http://git.io/yBU2rg\");\n }\n\n function makeDictionary() {\n var cache = create(null);\n cache['_dict'] = null;\n delete cache['_dict'];\n return cache;\n }\n\n var underscore = Ember.String.underscore;\n var classify = Ember.String.classify;\n var get = Ember.get;\n\n function parseName(fullName) {\n /*jshint validthis:true */\n\n if (fullName.parsedName === true) { return fullName; }\n\n var prefix, type, name;\n var fullNameParts = fullName.split('@');\n\n // Htmlbars uses helper:@content-helper which collides\n // with ember-cli namespace detection.\n // This will be removed in a future release of Htmlbars.\n if (fullName !== 'helper:@content-helper' &&\n fullNameParts.length === 2) {\n var prefixParts = fullNameParts[0].split(':');\n\n if (prefixParts.length === 2) {\n prefix = prefixParts[1];\n type = prefixParts[0];\n name = fullNameParts[1];\n } else {\n var nameParts = fullNameParts[1].split(':');\n\n prefix = fullNameParts[0];\n type = nameParts[0];\n name = nameParts[1];\n }\n } else {\n fullNameParts = fullName.split(':');\n type = fullNameParts[0];\n name = fullNameParts[1];\n }\n\n var fullNameWithoutType = name;\n var namespace = get(this, 'namespace');\n var root = namespace;\n\n return {\n parsedName: true,\n fullName: fullName,\n prefix: prefix || this.prefix({type: type}),\n type: type,\n fullNameWithoutType: fullNameWithoutType,\n name: name,\n root: root,\n resolveMethodName: \"resolve\" + classify(type)\n };\n }\n\n function resolveOther(parsedName) {\n /*jshint validthis:true */\n\n // Temporarily disabling podModulePrefix deprecation\n /*\n if (!this._deprecatedPodModulePrefix) {\n var podModulePrefix = this.namespace.podModulePrefix || '';\n var podPath = podModulePrefix.substr(podModulePrefix.lastIndexOf('/') + 1);\n\n Ember.deprecate('`podModulePrefix` is deprecated and will be removed '+\n 'from future versions of ember-cli. Please move existing pods from '+\n '\\'app/' + podPath + '/\\' to \\'app/\\'.', !this.namespace.podModulePrefix);\n\n this._deprecatedPodModulePrefix = true;\n }\n */\n Ember.assert('`modulePrefix` must be defined', this.namespace.modulePrefix);\n\n var normalizedModuleName = this.findModuleName(parsedName);\n\n if (normalizedModuleName) {\n var defaultExport = this._extractDefaultExport(normalizedModuleName, parsedName);\n\n if (defaultExport === undefined) {\n throw new Error(\" Expected to find: '\" + parsedName.fullName + \"' within '\" + normalizedModuleName + \"' but got 'undefined'. Did you forget to `export default` within '\" + normalizedModuleName + \"'?\");\n }\n\n if (this.shouldWrapInClassFactory(defaultExport, parsedName)) {\n defaultExport = classFactory(defaultExport);\n }\n\n return defaultExport;\n } else {\n return this._super(parsedName);\n }\n }\n\n // Ember.DefaultResolver docs:\n // https://github.com/emberjs/ember.js/blob/master/packages/ember-application/lib/system/resolver.js\n var Resolver = Ember.DefaultResolver.extend({\n resolveOther: resolveOther,\n resolveTemplate: resolveOther,\n pluralizedTypes: null,\n\n makeToString: function(factory, fullName) {\n return '' + this.namespace.modulePrefix + '@' + fullName + ':';\n },\n parseName: parseName,\n shouldWrapInClassFactory: function(module, parsedName){\n return false;\n },\n init: function() {\n this._super();\n this.moduleBasedResolver = true;\n this._normalizeCache = makeDictionary();\n\n this.pluralizedTypes = this.pluralizedTypes || makeDictionary();\n\n if (!this.pluralizedTypes.config) {\n this.pluralizedTypes.config = 'config';\n }\n\n this._deprecatedPodModulePrefix = false;\n },\n normalize: function(fullName) {\n return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this._normalize(fullName));\n },\n _normalize: function(fullName) {\n // replace `.` with `/` in order to make nested controllers work in the following cases\n // 1. `needs: ['posts/post']`\n // 2. `{{render \"posts/post\"}}`\n // 3. `this.render('posts/post')` from Route\n var split = fullName.split(':');\n if (split.length > 1) {\n return split[0] + ':' + Ember.String.dasherize(split[1].replace(/\\./g, '/'));\n } else {\n return fullName;\n }\n },\n\n pluralize: function(type) {\n return this.pluralizedTypes[type] || (this.pluralizedTypes[type] = type + 's');\n },\n\n podBasedLookupWithPrefix: function(podPrefix, parsedName) {\n var fullNameWithoutType = parsedName.fullNameWithoutType;\n\n if (parsedName.type === 'template') {\n fullNameWithoutType = fullNameWithoutType.replace(/^components\\//, '');\n }\n\n return podPrefix + '/' + fullNameWithoutType + '/' + parsedName.type;\n },\n\n podBasedModuleName: function(parsedName) {\n var podPrefix = this.namespace.podModulePrefix || this.namespace.modulePrefix;\n\n return this.podBasedLookupWithPrefix(podPrefix, parsedName);\n },\n\n podBasedComponentsInSubdir: function(parsedName) {\n var podPrefix = this.namespace.podModulePrefix || this.namespace.modulePrefix;\n podPrefix = podPrefix + '/components';\n\n if (parsedName.type === 'component' || parsedName.fullNameWithoutType.match(/^components/)) {\n return this.podBasedLookupWithPrefix(podPrefix, parsedName);\n }\n },\n\n mainModuleName: function(parsedName) {\n // if router:main or adapter:main look for a module with just the type first\n var tmpModuleName = parsedName.prefix + '/' + parsedName.type;\n\n if (parsedName.fullNameWithoutType === 'main') {\n return tmpModuleName;\n }\n },\n\n defaultModuleName: function(parsedName) {\n return parsedName.prefix + '/' + this.pluralize(parsedName.type) + '/' + parsedName.fullNameWithoutType;\n },\n\n prefix: function(parsedName) {\n var tmpPrefix = this.namespace.modulePrefix;\n\n if (this.namespace[parsedName.type + 'Prefix']) {\n tmpPrefix = this.namespace[parsedName.type + 'Prefix'];\n }\n\n return tmpPrefix;\n },\n\n /**\n\n A listing of functions to test for moduleName's based on the provided\n `parsedName`. This allows easy customization of additional module based\n lookup patterns.\n\n @property moduleNameLookupPatterns\n @returns {Ember.Array}\n */\n moduleNameLookupPatterns: Ember.computed(function(){\n return Ember.A([\n this.podBasedModuleName,\n this.podBasedComponentsInSubdir,\n this.mainModuleName,\n this.defaultModuleName\n ]);\n }),\n\n findModuleName: function(parsedName, loggingDisabled){\n var self = this;\n var moduleName;\n\n this.get('moduleNameLookupPatterns').find(function(item) {\n var moduleEntries = requirejs.entries;\n var tmpModuleName = item.call(self, parsedName);\n\n // allow treat all dashed and all underscored as the same thing\n // supports components with dashes and other stuff with underscores.\n if (tmpModuleName) {\n tmpModuleName = self.chooseModuleName(moduleEntries, tmpModuleName);\n }\n\n if (tmpModuleName && moduleEntries[tmpModuleName]) {\n if (!loggingDisabled) {\n self._logLookup(true, parsedName, tmpModuleName);\n }\n\n moduleName = tmpModuleName;\n }\n\n if (!loggingDisabled) {\n self._logLookup(moduleName, parsedName, tmpModuleName);\n }\n\n return moduleName;\n });\n\n return moduleName;\n },\n\n chooseModuleName: function(moduleEntries, moduleName) {\n var underscoredModuleName = Ember.String.underscore(moduleName);\n\n if (moduleName !== underscoredModuleName && moduleEntries[moduleName] && moduleEntries[underscoredModuleName]) {\n throw new TypeError(\"Ambiguous module names: `\" + moduleName + \"` and `\" + underscoredModuleName + \"`\");\n }\n\n if (moduleEntries[moduleName]) {\n return moduleName;\n } else if (moduleEntries[underscoredModuleName]) {\n return underscoredModuleName;\n } else {\n // workaround for dasherized partials:\n // something/something/-something => something/something/_something\n var partializedModuleName = moduleName.replace(/\\/-([^\\/]*)$/, '/_$1');\n\n if (moduleEntries[partializedModuleName]) {\n Ember.deprecate('Modules should not contain underscores. ' +\n 'Attempted to lookup \"'+moduleName+'\" which ' +\n 'was not found. Please rename \"'+partializedModuleName+'\" '+\n 'to \"'+moduleName+'\" instead.', false);\n\n return partializedModuleName;\n } else {\n return moduleName;\n }\n }\n },\n\n // used by Ember.DefaultResolver.prototype._logLookup\n lookupDescription: function(fullName) {\n var parsedName = this.parseName(fullName);\n\n var moduleName = this.findModuleName(parsedName, true);\n\n return moduleName;\n },\n\n // only needed until 1.6.0-beta.2 can be required\n _logLookup: function(found, parsedName, description) {\n if (!Ember.ENV.LOG_MODULE_RESOLVER && !parsedName.root.LOG_RESOLVER) {\n return;\n }\n\n var symbol, padding;\n\n if (found) { symbol = '[✓]'; }\n else { symbol = '[ ]'; }\n\n if (parsedName.fullName.length > 60) {\n padding = '.';\n } else {\n padding = new Array(60 - parsedName.fullName.length).join('.');\n }\n\n if (!description) {\n description = this.lookupDescription(parsedName);\n }\n\n Ember.Logger.info(symbol, parsedName.fullName, padding, description);\n },\n\n knownForType: function(type) {\n var moduleEntries = requirejs.entries;\n var moduleKeys = (Object.keys || Ember.keys)(moduleEntries);\n\n var items = makeDictionary();\n for (var index = 0, length = moduleKeys.length; index < length; index++) {\n var moduleName = moduleKeys[index];\n var fullname = this.translateToContainerFullname(type, moduleName);\n\n if (fullname) {\n items[fullname] = true;\n }\n }\n\n return items;\n },\n\n translateToContainerFullname: function(type, moduleName) {\n var prefix = this.prefix({ type: type });\n var pluralizedType = this.pluralize(type);\n var nonPodRegExp = new RegExp('^' + prefix + '/' + pluralizedType + '/(.+)$');\n var podRegExp = new RegExp('^' + prefix + '/(.+)/' + type + '$');\n var matches;\n\n\n if ((matches = moduleName.match(podRegExp))) {\n return type + ':' + matches[1];\n }\n\n if ((matches = moduleName.match(nonPodRegExp))) {\n return type + ':' + matches[1];\n }\n },\n\n _extractDefaultExport: function(normalizedModuleName) {\n var module = require(normalizedModuleName, null, null, true /* force sync */);\n\n if (module && module['default']) {\n module = module['default'];\n }\n\n return module;\n }\n });\n\n Resolver.moduleBasedResolver = true;\n Resolver['default'] = Resolver;\n return Resolver;\n});\n\ndefine(\"resolver\",\n [\"ember/resolver\"],\n function (Resolver) {\n Ember.deprecate('Importing/requiring Ember Resolver as \"resolver\" is deprecated, please use \"ember/resolver\" instead');\n return Resolver;\n });\n\n})();\n//@ sourceURL=ember-resolver/core");minispade.register('ember-resolver/initializers', "(function() {(function() {\n \"use strict\";\n\n Ember.Application.initializer({\n name: 'container-debug-adapter',\n\n initialize: function(container, app) {\n var ContainerDebugAdapter = require('ember/container-debug-adapter');\n var Resolver = require('ember/resolver');\n\n container.register('container-debug-adapter:main', ContainerDebugAdapter);\n app.inject('container-debug-adapter:main', 'namespace', 'application:main');\n }\n });\n}());\n\n})();\n//@ sourceURL=ember-resolver/initializers");minispade.register('ember-resolver', "(function() {minispade.require('ember-resolver/core');\nminispade.require('ember-resolver/container-debug-adapter');\nminispade.require('ember-resolver/initializers');\n\n})();\n//@ sourceURL=ember-resolver"); \ No newline at end of file +minispade.register('ember-resolver/container-debug-adapter', "(function() {/*globals define registry requirejs */\n\ndefine(\"ember/container-debug-adapter\",\n [],\n function() {\n \"use strict\";\n\n // Support Ember < 1.5-beta.4\n // TODO: Remove this after 1.5.0 is released\n if (typeof Ember.ContainerDebugAdapter === 'undefined') {\n return null;\n }\n /*\n * This module defines a subclass of Ember.ContainerDebugAdapter that adds two\n * important features:\n *\n * 1) is able provide injections to classes that implement `extend`\n * (as is typical with Ember).\n */\n\n var ContainerDebugAdapter = Ember.ContainerDebugAdapter.extend({\n /**\n The container of the application being debugged.\n This property will be injected\n on creation.\n\n @property container\n @default null\n */\n // container: null, LIVES IN PARENT\n\n /**\n The resolver instance of the application\n being debugged. This property will be injected\n on creation.\n\n @property resolver\n @default null\n */\n // resolver: null, LIVES IN PARENT\n /**\n Returns true if it is possible to catalog a list of available\n classes in the resolver for a given type.\n\n @method canCatalogEntriesByType\n @param {string} type The type. e.g. \"model\", \"controller\", \"route\"\n @return {boolean} whether a list is available for this type.\n */\n canCatalogEntriesByType: function(type) {\n return true;\n },\n\n /**\n * Get all defined modules.\n *\n * @method _getEntries\n * @return {Array} the list of registered modules.\n * @private\n */\n _getEntries: function() {\n return requirejs.entries;\n },\n\n /**\n Returns the available classes a given type.\n\n @method catalogEntriesByType\n @param {string} type The type. e.g. \"model\", \"controller\", \"route\"\n @return {Array} An array of classes.\n */\n catalogEntriesByType: function(type) {\n var entries = this._getEntries(),\n module,\n types = Ember.A();\n\n var makeToString = function(){\n return this.shortname;\n };\n\n var prefix = this.namespace.modulePrefix;\n\n for(var key in entries) {\n if(entries.hasOwnProperty(key) && key.indexOf(type) !== -1) {\n // Check if it's a pod module\n var name = getPod(type, key, this.namespace.podModulePrefix || prefix);\n if (!name) {\n // Not pod\n name = key.split(type + 's/').pop();\n\n // Support for different prefix (such as ember-cli addons).\n // Uncomment the code below when\n // https://github.com/ember-cli/ember-resolver/pull/80 is merged.\n\n //var match = key.match('^/?(.+)/' + type);\n //if (match && match[1] !== prefix) {\n // Different prefix such as an addon\n //name = match[1] + '@' + name;\n //}\n }\n types.addObject(name);\n }\n }\n return types;\n }\n });\n\n function getPod(type, key, prefix) {\n var match = key.match(new RegExp('^/?' + prefix + '/(.+)/' + type + '$'));\n if (match) {\n return match[1];\n }\n }\n\n ContainerDebugAdapter['default'] = ContainerDebugAdapter;\n return ContainerDebugAdapter;\n});\n\n})();\n//@ sourceURL=ember-resolver/container-debug-adapter");minispade.register('ember-resolver/core', "(function() {/*globals define registry requirejs */\n\ndefine(\"ember/resolver\",\n [],\n function() {\n \"use strict\";\n\n if (typeof requirejs.entries === 'undefined') {\n requirejs.entries = requirejs._eak_seen;\n }\n\n /*\n * This module defines a subclass of Ember.DefaultResolver that adds two\n * important features:\n *\n * 1) The resolver makes the container aware of es6 modules via the AMD\n * output. The loader's _moduleEntries is consulted so that classes can be\n * resolved directly via the module loader, without needing a manual\n * `import`.\n * 2) is able to provide injections to classes that implement `extend`\n * (as is typical with Ember).\n */\n\n function classFactory(klass) {\n return {\n create: function (injections) {\n if (typeof klass.extend === 'function') {\n return klass.extend(injections);\n } else {\n return klass;\n }\n }\n };\n }\n\n var create = (Object.create || Ember.create);\n if (!(create && !create(null).hasOwnProperty)) {\n throw new Error(\"This browser does not support Object.create(null), please polyfil with es5-sham: http://git.io/yBU2rg\");\n }\n\n function makeDictionary() {\n var cache = create(null);\n cache['_dict'] = null;\n delete cache['_dict'];\n return cache;\n }\n\n var underscore = Ember.String.underscore;\n var classify = Ember.String.classify;\n var get = Ember.get;\n\n function parseName(fullName) {\n /*jshint validthis:true */\n\n if (fullName.parsedName === true) { return fullName; }\n\n var prefix, type, name;\n var fullNameParts = fullName.split('@');\n\n // Htmlbars uses helper:@content-helper which collides\n // with ember-cli namespace detection.\n // This will be removed in a future release of Htmlbars.\n if (fullName !== 'helper:@content-helper' &&\n fullNameParts.length === 2) {\n var prefixParts = fullNameParts[0].split(':');\n\n if (prefixParts.length === 2) {\n prefix = prefixParts[1];\n type = prefixParts[0];\n name = fullNameParts[1];\n } else {\n var nameParts = fullNameParts[1].split(':');\n\n prefix = fullNameParts[0];\n type = nameParts[0];\n name = nameParts[1];\n }\n } else {\n fullNameParts = fullName.split(':');\n type = fullNameParts[0];\n name = fullNameParts[1];\n }\n\n var fullNameWithoutType = name;\n var namespace = get(this, 'namespace');\n var root = namespace;\n\n return {\n parsedName: true,\n fullName: fullName,\n prefix: prefix || this.prefix({type: type}),\n type: type,\n fullNameWithoutType: fullNameWithoutType,\n name: name,\n root: root,\n resolveMethodName: \"resolve\" + classify(type)\n };\n }\n\n function resolveOther(parsedName) {\n /*jshint validthis:true */\n\n // Temporarily disabling podModulePrefix deprecation\n /*\n if (!this._deprecatedPodModulePrefix) {\n var podModulePrefix = this.namespace.podModulePrefix || '';\n var podPath = podModulePrefix.substr(podModulePrefix.lastIndexOf('/') + 1);\n\n Ember.deprecate('`podModulePrefix` is deprecated and will be removed '+\n 'from future versions of ember-cli. Please move existing pods from '+\n '\\'app/' + podPath + '/\\' to \\'app/\\'.', !this.namespace.podModulePrefix);\n\n this._deprecatedPodModulePrefix = true;\n }\n */\n Ember.assert('`modulePrefix` must be defined', this.namespace.modulePrefix);\n\n var normalizedModuleName = this.findModuleName(parsedName);\n\n if (normalizedModuleName) {\n var defaultExport = this._extractDefaultExport(normalizedModuleName, parsedName);\n\n if (defaultExport === undefined) {\n throw new Error(\" Expected to find: '\" + parsedName.fullName + \"' within '\" + normalizedModuleName + \"' but got 'undefined'. Did you forget to `export default` within '\" + normalizedModuleName + \"'?\");\n }\n\n if (this.shouldWrapInClassFactory(defaultExport, parsedName)) {\n defaultExport = classFactory(defaultExport);\n }\n\n return defaultExport;\n } else {\n return this._super(parsedName);\n }\n }\n\n // Ember.DefaultResolver docs:\n // https://github.com/emberjs/ember.js/blob/master/packages/ember-application/lib/system/resolver.js\n var Resolver = Ember.DefaultResolver.extend({\n resolveOther: resolveOther,\n resolveTemplate: resolveOther,\n pluralizedTypes: null,\n\n makeToString: function(factory, fullName) {\n return '' + this.namespace.modulePrefix + '@' + fullName + ':';\n },\n parseName: parseName,\n shouldWrapInClassFactory: function(module, parsedName){\n return false;\n },\n init: function() {\n this._super();\n this.moduleBasedResolver = true;\n this._normalizeCache = makeDictionary();\n\n this.pluralizedTypes = this.pluralizedTypes || makeDictionary();\n\n if (!this.pluralizedTypes.config) {\n this.pluralizedTypes.config = 'config';\n }\n\n this._deprecatedPodModulePrefix = false;\n },\n normalize: function(fullName) {\n return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this._normalize(fullName));\n },\n _normalize: function(fullName) {\n // replace `.` with `/` in order to make nested controllers work in the following cases\n // 1. `needs: ['posts/post']`\n // 2. `{{render \"posts/post\"}}`\n // 3. `this.render('posts/post')` from Route\n var split = fullName.split(':');\n if (split.length > 1) {\n return split[0] + ':' + Ember.String.dasherize(split[1].replace(/\\./g, '/'));\n } else {\n return fullName;\n }\n },\n\n pluralize: function(type) {\n return this.pluralizedTypes[type] || (this.pluralizedTypes[type] = type + 's');\n },\n\n podBasedLookupWithPrefix: function(podPrefix, parsedName) {\n var fullNameWithoutType = parsedName.fullNameWithoutType;\n\n if (parsedName.type === 'template') {\n fullNameWithoutType = fullNameWithoutType.replace(/^components\\//, '');\n }\n\n return podPrefix + '/' + fullNameWithoutType + '/' + parsedName.type;\n },\n\n podBasedModuleName: function(parsedName) {\n var podPrefix = this.namespace.podModulePrefix || this.namespace.modulePrefix;\n\n return this.podBasedLookupWithPrefix(podPrefix, parsedName);\n },\n\n podBasedComponentsInSubdir: function(parsedName) {\n var podPrefix = this.namespace.podModulePrefix || this.namespace.modulePrefix;\n podPrefix = podPrefix + '/components';\n\n if (parsedName.type === 'component' || parsedName.fullNameWithoutType.match(/^components/)) {\n return this.podBasedLookupWithPrefix(podPrefix, parsedName);\n }\n },\n\n mainModuleName: function(parsedName) {\n // if router:main or adapter:main look for a module with just the type first\n var tmpModuleName = parsedName.prefix + '/' + parsedName.type;\n\n if (parsedName.fullNameWithoutType === 'main') {\n return tmpModuleName;\n }\n },\n\n defaultModuleName: function(parsedName) {\n return parsedName.prefix + '/' + this.pluralize(parsedName.type) + '/' + parsedName.fullNameWithoutType;\n },\n\n prefix: function(parsedName) {\n var tmpPrefix = this.namespace.modulePrefix;\n\n if (this.namespace[parsedName.type + 'Prefix']) {\n tmpPrefix = this.namespace[parsedName.type + 'Prefix'];\n }\n\n return tmpPrefix;\n },\n\n /**\n\n A listing of functions to test for moduleName's based on the provided\n `parsedName`. This allows easy customization of additional module based\n lookup patterns.\n\n @property moduleNameLookupPatterns\n @returns {Ember.Array}\n */\n moduleNameLookupPatterns: Ember.computed(function(){\n return Ember.A([\n this.podBasedModuleName,\n this.podBasedComponentsInSubdir,\n this.mainModuleName,\n this.defaultModuleName\n ]);\n }),\n\n findModuleName: function(parsedName, loggingDisabled){\n var self = this;\n var moduleName;\n\n this.get('moduleNameLookupPatterns').find(function(item) {\n var moduleEntries = requirejs.entries;\n var tmpModuleName = item.call(self, parsedName);\n\n // allow treat all dashed and all underscored as the same thing\n // supports components with dashes and other stuff with underscores.\n if (tmpModuleName) {\n tmpModuleName = self.chooseModuleName(moduleEntries, tmpModuleName);\n }\n\n if (tmpModuleName && moduleEntries[tmpModuleName]) {\n if (!loggingDisabled) {\n self._logLookup(true, parsedName, tmpModuleName);\n }\n\n moduleName = tmpModuleName;\n }\n\n if (!loggingDisabled) {\n self._logLookup(moduleName, parsedName, tmpModuleName);\n }\n\n return moduleName;\n });\n\n return moduleName;\n },\n\n chooseModuleName: function(moduleEntries, moduleName) {\n var underscoredModuleName = Ember.String.underscore(moduleName);\n\n if (moduleName !== underscoredModuleName && moduleEntries[moduleName] && moduleEntries[underscoredModuleName]) {\n throw new TypeError(\"Ambiguous module names: `\" + moduleName + \"` and `\" + underscoredModuleName + \"`\");\n }\n\n if (moduleEntries[moduleName]) {\n return moduleName;\n } else if (moduleEntries[underscoredModuleName]) {\n return underscoredModuleName;\n } else {\n // workaround for dasherized partials:\n // something/something/-something => something/something/_something\n var partializedModuleName = moduleName.replace(/\\/-([^\\/]*)$/, '/_$1');\n\n if (moduleEntries[partializedModuleName]) {\n Ember.deprecate('Modules should not contain underscores. ' +\n 'Attempted to lookup \"'+moduleName+'\" which ' +\n 'was not found. Please rename \"'+partializedModuleName+'\" '+\n 'to \"'+moduleName+'\" instead.', false);\n\n return partializedModuleName;\n } else {\n return moduleName;\n }\n }\n },\n\n // used by Ember.DefaultResolver.prototype._logLookup\n lookupDescription: function(fullName) {\n var parsedName = this.parseName(fullName);\n\n var moduleName = this.findModuleName(parsedName, true);\n\n return moduleName;\n },\n\n // only needed until 1.6.0-beta.2 can be required\n _logLookup: function(found, parsedName, description) {\n if (!Ember.ENV.LOG_MODULE_RESOLVER && !parsedName.root.LOG_RESOLVER) {\n return;\n }\n\n var symbol, padding;\n\n if (found) { symbol = '[✓]'; }\n else { symbol = '[ ]'; }\n\n if (parsedName.fullName.length > 60) {\n padding = '.';\n } else {\n padding = new Array(60 - parsedName.fullName.length).join('.');\n }\n\n if (!description) {\n description = this.lookupDescription(parsedName);\n }\n\n Ember.Logger.info(symbol, parsedName.fullName, padding, description);\n },\n\n knownForType: function(type) {\n var moduleEntries = requirejs.entries;\n var moduleKeys = (Object.keys || Ember.keys)(moduleEntries);\n\n var items = makeDictionary();\n for (var index = 0, length = moduleKeys.length; index < length; index++) {\n var moduleName = moduleKeys[index];\n var fullname = this.translateToContainerFullname(type, moduleName);\n\n if (fullname) {\n items[fullname] = true;\n }\n }\n\n return items;\n },\n\n translateToContainerFullname: function(type, moduleName) {\n var prefix = this.prefix({ type: type });\n var pluralizedType = this.pluralize(type);\n var nonPodRegExp = new RegExp('^' + prefix + '/' + pluralizedType + '/(.+)$');\n var podRegExp = new RegExp('^' + prefix + '/(.+)/' + type + '$');\n var matches;\n\n\n if ((matches = moduleName.match(podRegExp))) {\n return type + ':' + matches[1];\n }\n\n if ((matches = moduleName.match(nonPodRegExp))) {\n return type + ':' + matches[1];\n }\n },\n\n _extractDefaultExport: function(normalizedModuleName) {\n var module = require(normalizedModuleName, null, null, true /* force sync */);\n\n if (module && module['default']) {\n module = module['default'];\n }\n\n return module;\n }\n });\n\n Resolver.moduleBasedResolver = true;\n Resolver['default'] = Resolver;\n return Resolver;\n});\n\ndefine(\"resolver\",\n [\"ember/resolver\"],\n function (Resolver) {\n Ember.deprecate('Importing/requiring Ember Resolver as \"resolver\" is deprecated, please use \"ember/resolver\" instead');\n return Resolver;\n });\n\n})();\n//@ sourceURL=ember-resolver/core");minispade.register('ember-resolver/initializers', "(function() {(function() {\n \"use strict\";\n\n Ember.Application.initializer({\n name: 'container-debug-adapter',\n\n initialize: function() {\n var app = arguments[1] || arguments[0];\n var container = arguments[1] ? arguments[0] : app;\n var ContainerDebugAdapter = require('ember/container-debug-adapter');\n var Resolver = require('ember/resolver');\n\n container.register('container-debug-adapter:main', ContainerDebugAdapter);\n app.inject('container-debug-adapter:main', 'namespace', 'application:main');\n }\n });\n}());\n\n})();\n//@ sourceURL=ember-resolver/initializers");minispade.register('ember-resolver', "(function() {minispade.require('ember-resolver/core');\nminispade.require('ember-resolver/container-debug-adapter');\nminispade.require('ember-resolver/initializers');\n\n})();\n//@ sourceURL=ember-resolver"); \ No newline at end of file diff --git a/dist/ember-resolver.js b/dist/ember-resolver.js index d4ecd2fe..e41d32f3 100644 --- a/dist/ember-resolver.js +++ b/dist/ember-resolver.js @@ -6,7 +6,7 @@ // ========================================================================== - // Version: 0.1.17 + // Version: 0.1.20 (function() { /*globals define registry requirejs */ @@ -542,7 +542,9 @@ define("ember/container-debug-adapter", Ember.Application.initializer({ name: 'container-debug-adapter', - initialize: function(container, app) { + initialize: function() { + var app = arguments[1] || arguments[0]; + var container = arguments[1] ? arguments[0] : app; var ContainerDebugAdapter = require('ember/container-debug-adapter'); var Resolver = require('ember/resolver'); diff --git a/dist/ember-resolver.min.js b/dist/ember-resolver.min.js index 3d66634e..ae868457 100644 --- a/dist/ember-resolver.min.js +++ b/dist/ember-resolver.min.js @@ -6,7 +6,7 @@ // ========================================================================== - // Version: 0.1.17 + // Version: 0.1.20 // Copyright: Copyright 2013 Stefan Penner and Ember App Kit Contributors -!function(){define("ember/resolver",[],function(){"use strict";function e(e){return{create:function(r){return"function"==typeof e.extend?e.extend(r):e}}}function r(){var e=i(null);return e._dict=null,delete e._dict,e}function t(e){if(e.parsedName===!0)return e;var r,t,n,i=e.split("@");if("helper:@content-helper"!==e&&2===i.length){var u=i[0].split(":");if(2===u.length)r=u[1],t=u[0],n=i[1];else{var s=i[1].split(":");r=i[0],t=s[0],n=s[1]}}else i=e.split(":"),t=i[0],n=i[1];var l=n,p=a(this,"namespace"),d=p;return{parsedName:!0,fullName:e,prefix:r||this.prefix({type:t}),type:t,fullNameWithoutType:l,name:n,root:d,resolveMethodName:"resolve"+o(t)}}function n(r){Ember.assert("`modulePrefix` must be defined",this.namespace.modulePrefix);var t=this.findModuleName(r);if(t){var n=this._extractDefaultExport(t,r);if(void 0===n)throw new Error(" Expected to find: '"+r.fullName+"' within '"+t+"' but got 'undefined'. Did you forget to `export default` within '"+t+"'?");return this.shouldWrapInClassFactory(n,r)&&(n=e(n)),n}return this._super(r)}"undefined"==typeof requirejs.entries&&(requirejs.entries=requirejs._eak_seen);var i=Object.create||Ember.create;if(!i||i(null).hasOwnProperty)throw new Error("This browser does not support Object.create(null), please polyfil with es5-sham: http://git.io/yBU2rg");var o=(Ember.String.underscore,Ember.String.classify),a=Ember.get,u=Ember.DefaultResolver.extend({resolveOther:n,resolveTemplate:n,pluralizedTypes:null,makeToString:function(e,r){return""+this.namespace.modulePrefix+"@"+r+":"},parseName:t,shouldWrapInClassFactory:function(){return!1},init:function(){this._super(),this.moduleBasedResolver=!0,this._normalizeCache=r(),this.pluralizedTypes=this.pluralizedTypes||r(),this.pluralizedTypes.config||(this.pluralizedTypes.config="config"),this._deprecatedPodModulePrefix=!1},normalize:function(e){return this._normalizeCache[e]||(this._normalizeCache[e]=this._normalize(e))},_normalize:function(e){var r=e.split(":");return r.length>1?r[0]+":"+Ember.String.dasherize(r[1].replace(/\./g,"/")):e},pluralize:function(e){return this.pluralizedTypes[e]||(this.pluralizedTypes[e]=e+"s")},podBasedLookupWithPrefix:function(e,r){var t=r.fullNameWithoutType;return"template"===r.type&&(t=t.replace(/^components\//,"")),e+"/"+t+"/"+r.type},podBasedModuleName:function(e){var r=this.namespace.podModulePrefix||this.namespace.modulePrefix;return this.podBasedLookupWithPrefix(r,e)},podBasedComponentsInSubdir:function(e){var r=this.namespace.podModulePrefix||this.namespace.modulePrefix;return r+="/components","component"===e.type||e.fullNameWithoutType.match(/^components/)?this.podBasedLookupWithPrefix(r,e):void 0},mainModuleName:function(e){var r=e.prefix+"/"+e.type;return"main"===e.fullNameWithoutType?r:void 0},defaultModuleName:function(e){return e.prefix+"/"+this.pluralize(e.type)+"/"+e.fullNameWithoutType},prefix:function(e){var r=this.namespace.modulePrefix;return this.namespace[e.type+"Prefix"]&&(r=this.namespace[e.type+"Prefix"]),r},moduleNameLookupPatterns:Ember.computed(function(){return Ember.A([this.podBasedModuleName,this.podBasedComponentsInSubdir,this.mainModuleName,this.defaultModuleName])}),findModuleName:function(e,r){var t,n=this;return this.get("moduleNameLookupPatterns").find(function(i){var o=requirejs.entries,a=i.call(n,e);return a&&(a=n.chooseModuleName(o,a)),a&&o[a]&&(r||n._logLookup(!0,e,a),t=a),r||n._logLookup(t,e,a),t}),t},chooseModuleName:function(e,r){var t=Ember.String.underscore(r);if(r!==t&&e[r]&&e[t])throw new TypeError("Ambiguous module names: `"+r+"` and `"+t+"`");if(e[r])return r;if(e[t])return t;var n=r.replace(/\/-([^\/]*)$/,"/_$1");return e[n]?(Ember.deprecate('Modules should not contain underscores. Attempted to lookup "'+r+'" which was not found. Please rename "'+n+'" to "'+r+'" instead.',!1),n):r},lookupDescription:function(e){var r=this.parseName(e),t=this.findModuleName(r,!0);return t},_logLookup:function(e,r,t){if(Ember.ENV.LOG_MODULE_RESOLVER||r.root.LOG_RESOLVER){var n,i;n=e?"[\u2713]":"[ ]",i=r.fullName.length>60?".":new Array(60-r.fullName.length).join("."),t||(t=this.lookupDescription(r)),Ember.Logger.info(n,r.fullName,i,t)}},knownForType:function(e){for(var t=requirejs.entries,n=(Object.keys||Ember.keys)(t),i=r(),o=0,a=n.length;a>o;o++){var u=n[o],s=this.translateToContainerFullname(e,u);s&&(i[s]=!0)}return i},translateToContainerFullname:function(e,r){var t,n=this.prefix({type:e}),i=this.pluralize(e),o=new RegExp("^"+n+"/"+i+"/(.+)$"),a=new RegExp("^"+n+"/(.+)/"+e+"$");return(t=r.match(a))?e+":"+t[1]:(t=r.match(o))?e+":"+t[1]:void 0},_extractDefaultExport:function(e){var r=require(e,null,null,!0);return r&&r["default"]&&(r=r["default"]),r}});return u.moduleBasedResolver=!0,u["default"]=u,u}),define("resolver",["ember/resolver"],function(e){return Ember.deprecate('Importing/requiring Ember Resolver as "resolver" is deprecated, please use "ember/resolver" instead'),e})}(),function(){define("ember/container-debug-adapter",[],function(){"use strict";function e(e,r,t){var n=r.match(new RegExp("^/?"+t+"/(.+)/"+e+"$"));return n?n[1]:void 0}if("undefined"==typeof Ember.ContainerDebugAdapter)return null;var r=Ember.ContainerDebugAdapter.extend({canCatalogEntriesByType:function(){return!0},_getEntries:function(){return requirejs.entries},catalogEntriesByType:function(r){var t=this._getEntries(),n=Ember.A(),i=this.namespace.modulePrefix;for(var o in t)if(t.hasOwnProperty(o)&&-1!==o.indexOf(r)){var a=e(r,o,this.namespace.podModulePrefix||i);a||(a=o.split(r+"s/").pop()),n.addObject(a)}return n}});return r["default"]=r,r})}(),function(){!function(){"use strict";Ember.Application.initializer({name:"container-debug-adapter",initialize:function(e,r){{var t=require("ember/container-debug-adapter");require("ember/resolver")}e.register("container-debug-adapter:main",t),r.inject("container-debug-adapter:main","namespace","application:main")}})}()}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||Ember.Logger.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website."); \ No newline at end of file +!function(){define("ember/resolver",[],function(){"use strict";function e(e){return{create:function(r){return"function"==typeof e.extend?e.extend(r):e}}}function r(){var e=i(null);return e._dict=null,delete e._dict,e}function t(e){if(e.parsedName===!0)return e;var r,t,n,i=e.split("@");if("helper:@content-helper"!==e&&2===i.length){var u=i[0].split(":");if(2===u.length)r=u[1],t=u[0],n=i[1];else{var s=i[1].split(":");r=i[0],t=s[0],n=s[1]}}else i=e.split(":"),t=i[0],n=i[1];var l=n,p=a(this,"namespace"),d=p;return{parsedName:!0,fullName:e,prefix:r||this.prefix({type:t}),type:t,fullNameWithoutType:l,name:n,root:d,resolveMethodName:"resolve"+o(t)}}function n(r){Ember.assert("`modulePrefix` must be defined",this.namespace.modulePrefix);var t=this.findModuleName(r);if(t){var n=this._extractDefaultExport(t,r);if(void 0===n)throw new Error(" Expected to find: '"+r.fullName+"' within '"+t+"' but got 'undefined'. Did you forget to `export default` within '"+t+"'?");return this.shouldWrapInClassFactory(n,r)&&(n=e(n)),n}return this._super(r)}"undefined"==typeof requirejs.entries&&(requirejs.entries=requirejs._eak_seen);var i=Object.create||Ember.create;if(!i||i(null).hasOwnProperty)throw new Error("This browser does not support Object.create(null), please polyfil with es5-sham: http://git.io/yBU2rg");var o=(Ember.String.underscore,Ember.String.classify),a=Ember.get,u=Ember.DefaultResolver.extend({resolveOther:n,resolveTemplate:n,pluralizedTypes:null,makeToString:function(e,r){return""+this.namespace.modulePrefix+"@"+r+":"},parseName:t,shouldWrapInClassFactory:function(){return!1},init:function(){this._super(),this.moduleBasedResolver=!0,this._normalizeCache=r(),this.pluralizedTypes=this.pluralizedTypes||r(),this.pluralizedTypes.config||(this.pluralizedTypes.config="config"),this._deprecatedPodModulePrefix=!1},normalize:function(e){return this._normalizeCache[e]||(this._normalizeCache[e]=this._normalize(e))},_normalize:function(e){var r=e.split(":");return r.length>1?r[0]+":"+Ember.String.dasherize(r[1].replace(/\./g,"/")):e},pluralize:function(e){return this.pluralizedTypes[e]||(this.pluralizedTypes[e]=e+"s")},podBasedLookupWithPrefix:function(e,r){var t=r.fullNameWithoutType;return"template"===r.type&&(t=t.replace(/^components\//,"")),e+"/"+t+"/"+r.type},podBasedModuleName:function(e){var r=this.namespace.podModulePrefix||this.namespace.modulePrefix;return this.podBasedLookupWithPrefix(r,e)},podBasedComponentsInSubdir:function(e){var r=this.namespace.podModulePrefix||this.namespace.modulePrefix;return r+="/components","component"===e.type||e.fullNameWithoutType.match(/^components/)?this.podBasedLookupWithPrefix(r,e):void 0},mainModuleName:function(e){var r=e.prefix+"/"+e.type;return"main"===e.fullNameWithoutType?r:void 0},defaultModuleName:function(e){return e.prefix+"/"+this.pluralize(e.type)+"/"+e.fullNameWithoutType},prefix:function(e){var r=this.namespace.modulePrefix;return this.namespace[e.type+"Prefix"]&&(r=this.namespace[e.type+"Prefix"]),r},moduleNameLookupPatterns:Ember.computed(function(){return Ember.A([this.podBasedModuleName,this.podBasedComponentsInSubdir,this.mainModuleName,this.defaultModuleName])}),findModuleName:function(e,r){var t,n=this;return this.get("moduleNameLookupPatterns").find(function(i){var o=requirejs.entries,a=i.call(n,e);return a&&(a=n.chooseModuleName(o,a)),a&&o[a]&&(r||n._logLookup(!0,e,a),t=a),r||n._logLookup(t,e,a),t}),t},chooseModuleName:function(e,r){var t=Ember.String.underscore(r);if(r!==t&&e[r]&&e[t])throw new TypeError("Ambiguous module names: `"+r+"` and `"+t+"`");if(e[r])return r;if(e[t])return t;var n=r.replace(/\/-([^\/]*)$/,"/_$1");return e[n]?(Ember.deprecate('Modules should not contain underscores. Attempted to lookup "'+r+'" which was not found. Please rename "'+n+'" to "'+r+'" instead.',!1),n):r},lookupDescription:function(e){var r=this.parseName(e),t=this.findModuleName(r,!0);return t},_logLookup:function(e,r,t){if(Ember.ENV.LOG_MODULE_RESOLVER||r.root.LOG_RESOLVER){var n,i;n=e?"[\u2713]":"[ ]",i=r.fullName.length>60?".":new Array(60-r.fullName.length).join("."),t||(t=this.lookupDescription(r)),Ember.Logger.info(n,r.fullName,i,t)}},knownForType:function(e){for(var t=requirejs.entries,n=(Object.keys||Ember.keys)(t),i=r(),o=0,a=n.length;a>o;o++){var u=n[o],s=this.translateToContainerFullname(e,u);s&&(i[s]=!0)}return i},translateToContainerFullname:function(e,r){var t,n=this.prefix({type:e}),i=this.pluralize(e),o=new RegExp("^"+n+"/"+i+"/(.+)$"),a=new RegExp("^"+n+"/(.+)/"+e+"$");return(t=r.match(a))?e+":"+t[1]:(t=r.match(o))?e+":"+t[1]:void 0},_extractDefaultExport:function(e){var r=require(e,null,null,!0);return r&&r["default"]&&(r=r["default"]),r}});return u.moduleBasedResolver=!0,u["default"]=u,u}),define("resolver",["ember/resolver"],function(e){return Ember.deprecate('Importing/requiring Ember Resolver as "resolver" is deprecated, please use "ember/resolver" instead'),e})}(),function(){define("ember/container-debug-adapter",[],function(){"use strict";function e(e,r,t){var n=r.match(new RegExp("^/?"+t+"/(.+)/"+e+"$"));return n?n[1]:void 0}if("undefined"==typeof Ember.ContainerDebugAdapter)return null;var r=Ember.ContainerDebugAdapter.extend({canCatalogEntriesByType:function(){return!0},_getEntries:function(){return requirejs.entries},catalogEntriesByType:function(r){var t=this._getEntries(),n=Ember.A(),i=this.namespace.modulePrefix;for(var o in t)if(t.hasOwnProperty(o)&&-1!==o.indexOf(r)){var a=e(r,o,this.namespace.podModulePrefix||i);a||(a=o.split(r+"s/").pop()),n.addObject(a)}return n}});return r["default"]=r,r})}(),function(){!function(){"use strict";Ember.Application.initializer({name:"container-debug-adapter",initialize:function(){{var e=arguments[1]||arguments[0],r=arguments[1]?arguments[0]:e,t=require("ember/container-debug-adapter");require("ember/resolver")}r.register("container-debug-adapter:main",t),e.inject("container-debug-adapter:main","namespace","application:main")}})}()}(),"undefined"==typeof location||"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname||Ember.Logger.warn("You are running a production build of Ember on localhost and won't receive detailed error messages. If you want full error messages please use the non-minified build provided on the Ember website."); \ No newline at end of file diff --git a/dist/ember-resolver.prod.js b/dist/ember-resolver.prod.js index d9a891d2..5d2acbf5 100644 --- a/dist/ember-resolver.prod.js +++ b/dist/ember-resolver.prod.js @@ -6,7 +6,7 @@ // ========================================================================== - // Version: 0.1.17 + // Version: 0.1.20 (function() { /*globals define registry requirejs */ @@ -542,7 +542,9 @@ define("ember/container-debug-adapter", Ember.Application.initializer({ name: 'container-debug-adapter', - initialize: function(container, app) { + initialize: function() { + var app = arguments[1] || arguments[0]; + var container = arguments[1] ? arguments[0] : app; var ContainerDebugAdapter = require('ember/container-debug-adapter'); var Resolver = require('ember/resolver'); diff --git a/dist/modules/ember-resolver.js b/dist/modules/ember-resolver.js index 29747cf2..7f8f04a7 100644 --- a/dist/modules/ember-resolver.js +++ b/dist/modules/ember-resolver.js @@ -532,7 +532,9 @@ define("ember/container-debug-adapter", Ember.Application.initializer({ name: 'container-debug-adapter', - initialize: function(container, app) { + initialize: function() { + var app = arguments[1] || arguments[0]; + var container = arguments[1] ? arguments[0] : app; var ContainerDebugAdapter = require('ember/container-debug-adapter'); var Resolver = require('ember/resolver'); diff --git a/packages/ember-resolver/lib/initializers.js b/packages/ember-resolver/lib/initializers.js index 1c571526..fe0508d5 100644 --- a/packages/ember-resolver/lib/initializers.js +++ b/packages/ember-resolver/lib/initializers.js @@ -4,7 +4,9 @@ Ember.Application.initializer({ name: 'container-debug-adapter', - initialize: function(container, app) { + initialize: function() { + var app = arguments[1] || arguments[0]; + var container = arguments[1] ? arguments[0] : app; var ContainerDebugAdapter = require('ember/container-debug-adapter'); var Resolver = require('ember/resolver');