ember-handlebars-template 0.1.4 → 0.1.5

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: 5c25ed8d75f46cc9f05fe573b6cdcf1db1ec2426
4
- data.tar.gz: 90c24f5792c35e23431115a4a08cfa028a7cbf06
3
+ metadata.gz: a634817413b985932816f357b9869f19005c1913
4
+ data.tar.gz: 32837cf31232756ad9cc579f3f2173e842e3fe7f
5
5
  SHA512:
6
- metadata.gz: 5c4bc0deb1284c0c246155d40212c464b0da4407525ac110674264c7719b54f1be26ab2b6f4046ff0fb6c3abea1021aba25bac6d05bc487018e9f71e070db6d6
7
- data.tar.gz: 379c8314eabee4ccda9c95b144ea8565ef7364868435be28c28e41cfdde3db63fa14ef20f681762126d5983c78047d047069851a95a87d79b459669031f2ccfd
6
+ metadata.gz: 0546a34e7d35b5fb4033d827483f0123c409a2b6f464a081d4714529c9940f8a9fc378ee83b0ca9e272260880515b1a76140d0245453881409e33fead69838ae
7
+ data.tar.gz: d8dad71e61b76fa7d79828a986363f1a993a1ca253a5696b7e2aab11bb2859cbd04639d02cab7127db21c4905a6a32045a6a36cdc4bd1c21ecfde20de884a867
@@ -58,16 +58,13 @@ module Ember
58
58
  end
59
59
  end
60
60
 
61
- actual_name = input[:name]
62
- actual_name += '/index' if input[:filename][input[:load_path] + '/' + input[:name] + '/index']
63
-
64
61
  case config.output_type
65
62
  when :amd
66
- target = amd_template_target(config.amd_namespace, actual_name)
63
+ target = amd_template_target(config.amd_namespace, actual_name(input))
67
64
 
68
65
  "define('#{target}', ['exports'], function(__exports__){ __exports__['default'] = #{template} });"
69
66
  when :global
70
- target = global_template_target(actual_name, config)
67
+ target = global_template_target(actual_name(input), config)
71
68
 
72
69
  "#{target} = #{template}\n"
73
70
  else
@@ -107,6 +104,20 @@ module Ember
107
104
  Barber::VERSION
108
105
  ]
109
106
  end
107
+
108
+ def actual_name(input)
109
+ actual_name = input[:name]
110
+
111
+ if input[:filename][File.expand_path(input[:name] + '/index', input[:load_path])]
112
+ if actual_name == '.'
113
+ actual_name = 'index'
114
+ else
115
+ actual_name += '/index'
116
+ end
117
+ end
118
+
119
+ actual_name
120
+ end
110
121
  end
111
122
  end
112
123
  end
@@ -1,5 +1,5 @@
1
1
  module Ember
2
2
  module Handlebars
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-handlebars-template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryunosuke SATO