ember-cli-assets 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a836d02e948b1017247c4401b7baa8a23e2462f9
4
- data.tar.gz: c9de097806b74bc479ed3f5fb3f4c061c478ff86
3
+ metadata.gz: 0ace9f80463a9cdadad58921de5b2fd494cf3138
4
+ data.tar.gz: ad57f2ea5ba67faca424b9a77f9d0b6c96ab18b9
5
5
  SHA512:
6
- metadata.gz: 329400507b991eeb50eb3c2cf19b9cd6cb0af0a9d67235c970a95e172badd02ee390b48614cc66ed1f6ab5cd7dcb8e777c5acd8ab92fd9fe56331a37e26d508a
7
- data.tar.gz: 549bd4c839c97879179f9591d6983b1484f9ed0ebc406038b5e84e1d931767977c9591546d2bdf22b70e03fd735ebfe5c1bb06fa0655ca16da20f66f0e94b4f0
6
+ metadata.gz: bc26f7b57ac9d29a30e3f0fd9fb39171ee52a2359245c4a4d74f471459f26b1660d426546e816c170f1ab690bc56ee8967afeb03e7baf5857d3d2ad82cca6a5d
7
+ data.tar.gz: a92a1776db105971fe1921dc9a0795b8327bbb4098e4c59217981773d2fd59d0e5dda8a4eafe0c289b7e3043c0c4685ce93a354f0996a276786ddae8b9b94b32
@@ -1,7 +1,7 @@
1
1
  module Ember
2
2
  module CLI
3
3
  module Assets
4
- VERSION = '0.0.15'
4
+ VERSION = '0.0.16'
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module Ember
2
2
  module CLI
3
3
  module Resolver
4
- VERSION = '0.1.20'
4
+ VERSION = '0.1.21'
5
5
  end
6
6
  end
7
7
  end
@@ -371,19 +371,29 @@ define("ember/resolver",
371
371
 
372
372
  translateToContainerFullname: function(type, moduleName) {
373
373
  var prefix = this.prefix({ type: type });
374
- var pluralizedType = this.pluralize(type);
375
- var nonPodRegExp = new RegExp('^' + prefix + '/' + pluralizedType + '/(.+)$');
376
- var podRegExp = new RegExp('^' + prefix + '/(.+)/' + type + '$');
377
- var matches;
378
-
379
374
 
380
- if ((matches = moduleName.match(podRegExp))) {
381
- return type + ':' + matches[1];
375
+ // Note: using string manipulation here rather than regexes for better performance.
376
+ // pod modules
377
+ // '^' + prefix + '/(.+)/' + type + '$'
378
+ var podPrefix = prefix + '/';
379
+ var podSuffix = '/' + type;
380
+ var start = moduleName.indexOf(podPrefix);
381
+ var end = moduleName.indexOf(podSuffix);
382
+
383
+ if (start === 0 && end === (moduleName.length - podSuffix.length) &&
384
+ moduleName.length > (podPrefix.length + podSuffix.length)) {
385
+ return type + ':' + moduleName.slice(start + podPrefix.length, end);
382
386
  }
383
387
 
384
- if ((matches = moduleName.match(nonPodRegExp))) {
385
- return type + ':' + matches[1];
388
+ // non-pod modules
389
+ // '^' + prefix + '/' + pluralizedType + '/(.+)$'
390
+ var pluralizedType = this.pluralize(type);
391
+ var nonPodPrefix = prefix + '/' + pluralizedType + '/';
392
+
393
+ if (moduleName.indexOf(nonPodPrefix) === 0 && moduleName.length > nonPodPrefix.length) {
394
+ return type + ':' + moduleName.slice(nonPodPrefix.length);
386
395
  }
396
+
387
397
  },
388
398
 
389
399
  _extractDefaultExport: function(normalizedModuleName) {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-cli-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryunosuke SATO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-28 00:00:00.000000000 Z
11
+ date: 2015-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler