{I" class:ETI"ProcessedAsset;FI"logical_path;TI"ember-appkit/resolver.js;FI" pathname;TI"n/Users/bcardarella/Dropbox/projects/ember-appkit-rails/vendor/assets/javascripts/ember-appkit/resolver.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+ξ™RI" length;Ti…I" digest;TI"%27bc8d3581a3d9c0ca984a103033b36b;FI" source;TI"…// Fetched from: https://raw.github.com/stefanpenner/ember-jj-abrams-resolver/master/dist/ember-resolver.js // Fetched on: 2013-11-27T08:26:18 // ========================================================================== // Project: Ember - JavaScript Application Framework // Copyright: Copyright 2013 Stefan Penner and Ember App Kit Contributors // License: Licensed under MIT license // See https://raw.github.com/stefanpenner/ember-jj-abrams-resolver/master/LICENSE // ========================================================================== // Version: 0.0.1 (function() { /*globals define registry requirejs */ define("resolver", [], function() { "use strict"; /* * This module defines a subclass of Ember.DefaultResolver that adds two * important features: * * 1) The resolver makes the container aware of es6 modules via the AMD * output. The loader's _seen is consulted so that classes can be * resolved directly via the module loader, without needing a manual * `import`. * 2) is able provide injections to classes that implement `extend` * (as is typical with Ember). */ function classFactory(klass) { return { create: function (injections) { if (typeof klass.extend === 'function') { return klass.extend(injections); } else { return klass; } } }; } var underscore = Ember.String.underscore; var classify = Ember.String.classify; var get = Ember.get; function parseName(fullName) { /*jshint validthis:true */ var nameParts = fullName.split(":"), type = nameParts[0], fullNameWithoutType = nameParts[1], name = fullNameWithoutType, namespace = get(this, 'namespace'), root = namespace; return { fullName: fullName, type: type, fullNameWithoutType: fullNameWithoutType, name: name, root: root, resolveMethodName: "resolve" + classify(type) }; } function chooseModuleName(seen, moduleName) { var underscoredModuleName = Ember.String.underscore(moduleName); if (moduleName !== underscoredModuleName && seen[moduleName] && seen[underscoredModuleName]) { throw new TypeError("Ambigous module names: `" + moduleName + "` and `" + underscoredModuleName + "`"); } if (seen[moduleName]) { return moduleName; } else if (seen[underscoredModuleName]) { return underscoredModuleName; } else { return moduleName; } } function resolveRouter(parsedName) { /*jshint validthis:true */ var prefix = this.namespace.configPrefix, routerModule; if (parsedName.fullName === 'router:main') { // for now, lets keep the router at app/router.js if (requirejs._eak_seen[prefix + '/router']) { routerModule = require(prefix + '/router'); if (routerModule['default']) { routerModule = routerModule['default']; } return routerModule; } } } function resolveOther(parsedName) { /*jshint validthis:true */ var prefix = this.namespace.modulePrefix; Ember.assert('module prefix must be defined', prefix); var pluralizedType = parsedName.type + 's'; var name = parsedName.fullNameWithoutType; var moduleName = prefix + '/' + pluralizedType + '/' + name; // allow treat all dashed and all underscored as the same thing // supports components with dashes and other stuff with underscores. var normalizedModuleName = chooseModuleName(requirejs._eak_seen, moduleName); if (requirejs._eak_seen[normalizedModuleName]) { var module = require(normalizedModuleName, null, null, true /* force sync */); if (module['default']) { module = module['default']; } if (module === undefined) { throw new Error(" Expected to find: '" + parsedName.fullName + "' within '" + normalizedModuleName + "' but got 'undefined'. Did you forget to `export default` within '" + normalizedModuleName + "'?"); } if (this.shouldWrapInClassFactory(module, parsedName)) { module = classFactory(module); } if (Ember.ENV.LOG_MODULE_RESOLVER) { Ember.Logger.info('[βœ“]', parsedName.fullName, new Array(40 - parsedName.fullName.length).join('.'), moduleName); } return module; } else { if (Ember.ENV.LOG_MODULE_RESOLVER) { Ember.Logger.info('[ ]', parsedName.fullName, new Array(40 - parsedName.fullName.length).join('.'), moduleName); } return this._super(parsedName); } } // Ember.DefaultResolver docs: // https://github.com/emberjs/ember.js/blob/master/packages/ember-application/lib/system/resolver.js var Resolver = Ember.DefaultResolver.extend({ resolveTemplate: resolveOther, resolveOther: resolveOther, resolveRouter: resolveRouter, makeToString: function(factory, fullName) { return '' + this.namespace.modulePrefix + '@' + fullName + ':'; }, parseName: parseName, shouldWrapInClassFactory: function(module, parsedName){ return false; }, normalize: function(fullName) { // replace `.` with `/` in order to make nested controllers work in the following cases // 1. `needs: ['posts/post']` // 2. `{{render "posts/post"}}` // 3. `this.render('posts/post')` from Route return Ember.String.dasherize(fullName.replace(/\./g, '/')); } }); Resolver['default'] = Resolver; return Resolver; }); })(); (function() { })(); ;TI"dependency_digest;TI"%3d7ae0a6772307e23d78adf262b73be1;FI"required_paths;T[I"n/Users/bcardarella/Dropbox/projects/ember-appkit-rails/vendor/assets/javascripts/ember-appkit/resolver.js;FI"dependency_paths;T[{I" path;TI"n/Users/bcardarella/Dropbox/projects/ember-appkit-rails/vendor/assets/javascripts/ember-appkit/resolver.js;FI" mtime;TI"2013-11-29T18:14:54-05:00;TI" digest;TI"%27bc8d3581a3d9c0ca984a103033b36b;FI" _version;TI"%ad5851230fbdd4f8a862674697158df2;F