handlebars_assets 0.19 → 0.19.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c1155389dd205ef3621842a8035be4a3b382852
|
4
|
+
data.tar.gz: 1e31aed6066e1d2c432699f124fe48b2d496b449
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d4f0673c0190056842528c0ca3b7987aafe5e6e9691818ffbe5d332ec9d1f1ab22bc8ed9a6a0baa562b3b2eaef53d780c2684fc0cfbf5ccaeb8cb1a17baa327
|
7
|
+
data.tar.gz: 041be79883b641c42659d28be50c9f51c11d6ad467486de8ebe4aa9ebcdd8f0699e719966cac85b9aabc25f755f8ed055a77787dc5e6fd0e777bcb65d182d3f7
|
@@ -144,15 +144,21 @@ module HandlebarsAssets
|
|
144
144
|
@full_path = path
|
145
145
|
end
|
146
146
|
|
147
|
+
def check_extension(ext)
|
148
|
+
result = false
|
149
|
+
if ext.start_with? '.'
|
150
|
+
ext = "\\#{ext}"
|
151
|
+
result ||= !(@full_path =~ /#{ext}(\..*)*$/).nil?
|
152
|
+
else
|
153
|
+
result ||= !(@full_path =~ /\.#{ext}(\..*)*$/).nil?
|
154
|
+
end
|
155
|
+
result
|
156
|
+
end
|
157
|
+
|
147
158
|
def is_haml?
|
148
159
|
result = false
|
149
160
|
::HandlebarsAssets::Config.hamlbars_extensions.each do |ext|
|
150
|
-
|
151
|
-
ext = '\\#{ext}'
|
152
|
-
result ||= !(@full_path =~ /#{ext}(\..*)*$/).nil?
|
153
|
-
else
|
154
|
-
result ||= !(@full_path =~ /\.#{ext}(\..*)*$/).nil?
|
155
|
-
end
|
161
|
+
result ||= check_extension(ext)
|
156
162
|
end
|
157
163
|
result
|
158
164
|
end
|
@@ -160,33 +166,23 @@ module HandlebarsAssets
|
|
160
166
|
def is_slim?
|
161
167
|
result = false
|
162
168
|
::HandlebarsAssets::Config.slimbars_extensions.each do |ext|
|
163
|
-
|
164
|
-
ext = '\\#{ext}'
|
165
|
-
result ||= !(@full_path =~ /#{ext}(\..*)*$/).nil?
|
166
|
-
else
|
167
|
-
result ||= !(@full_path =~ /\.#{ext}(\..*)*$/).nil?
|
168
|
-
end
|
169
|
+
result ||= check_extension(ext)
|
169
170
|
end
|
170
171
|
result
|
171
172
|
end
|
172
173
|
|
173
|
-
def is_partial?
|
174
|
-
@full_path.gsub(%r{.*/}, '').start_with?('_')
|
175
|
-
end
|
176
|
-
|
177
174
|
def is_ember?
|
178
175
|
result = false
|
179
176
|
::HandlebarsAssets::Config.ember_extensions.each do |ext|
|
180
|
-
|
181
|
-
ext = '\\#{ext}'
|
182
|
-
result ||= !(@full_path =~ /#{ext}(\..*)*$/).nil?
|
183
|
-
else
|
184
|
-
result ||= !(@full_path =~ /\.#{ext}(\..*)*$/).nil?
|
185
|
-
end
|
177
|
+
result ||= check_extension(ext)
|
186
178
|
end
|
187
179
|
result
|
188
180
|
end
|
189
181
|
|
182
|
+
def is_partial?
|
183
|
+
@full_path.gsub(%r{.*/}, '').start_with?('_')
|
184
|
+
end
|
185
|
+
|
190
186
|
def name
|
191
187
|
template_name
|
192
188
|
end
|
@@ -143,6 +143,7 @@ module HandlebarsAssets
|
|
143
143
|
source = "This is {{handlebars}}"
|
144
144
|
|
145
145
|
HandlebarsAssets::Config.ember = true
|
146
|
+
HandlebarsAssets::Config.multiple_frameworks = false
|
146
147
|
template = HandlebarsAssets::HandlebarsTemplate.new(scope.pathname.to_s) { source }
|
147
148
|
|
148
149
|
expected_compiled = %{window.Ember.TEMPLATES["test_render"] = Ember.Handlebars.compile("This is {{handlebars}}");};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handlebars_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Hill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|