ymdp 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ymdp/compiler/template.rb +7 -7
- data/lib/ymdp/view/application_view.rb +2 -2
- data/ymdp.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.1
|
@@ -100,7 +100,7 @@ module YMDP
|
|
100
100
|
if @file =~ /\.haml$/
|
101
101
|
result = process_haml(template, @file)
|
102
102
|
else
|
103
|
-
result =
|
103
|
+
result = process_erb(template)
|
104
104
|
end
|
105
105
|
result
|
106
106
|
end
|
@@ -111,7 +111,7 @@ module YMDP
|
|
111
111
|
|
112
112
|
# Implemented in child classes, this defines what must be done to process a template.
|
113
113
|
#
|
114
|
-
def
|
114
|
+
def process_erb(template)
|
115
115
|
raise "Define in child"
|
116
116
|
end
|
117
117
|
|
@@ -259,8 +259,8 @@ module YMDP
|
|
259
259
|
|
260
260
|
# Process this template with ERB.
|
261
261
|
#
|
262
|
-
def
|
263
|
-
# puts "View
|
262
|
+
def process_erb(template)
|
263
|
+
# puts "View process_erb"
|
264
264
|
ERB.new(template, 0, "%<>").result(binding)
|
265
265
|
end
|
266
266
|
|
@@ -280,11 +280,11 @@ module YMDP
|
|
280
280
|
end
|
281
281
|
|
282
282
|
def process_coffee(template, filename=nil)
|
283
|
-
::CoffeeScript.compile(
|
283
|
+
::CoffeeScript.compile(process_erb(template))
|
284
284
|
end
|
285
285
|
|
286
286
|
def process_scss(template, filename=nil)
|
287
|
-
::Sass.compile(template)
|
287
|
+
::Sass.compile(process_erb(template))
|
288
288
|
end
|
289
289
|
|
290
290
|
# Write this template with the application layout applied.
|
@@ -331,7 +331,7 @@ module YMDP
|
|
331
331
|
filename = @file.split("/").last
|
332
332
|
tmp_filename = "#{TMP_PATH}/#{filename}"
|
333
333
|
|
334
|
-
# result = process_coffee(
|
334
|
+
# result = process_coffee(process_erb(result))
|
335
335
|
result = process_coffee(result)
|
336
336
|
|
337
337
|
F.save_to_file(result, tmp_filename)
|
@@ -223,7 +223,7 @@ module YMDP
|
|
223
223
|
if path =~ /haml$/
|
224
224
|
output = process_haml(template, path)
|
225
225
|
else
|
226
|
-
output =
|
226
|
+
output = process_erb(template)
|
227
227
|
end
|
228
228
|
else
|
229
229
|
raise "Could not find partial: #{filename}"
|
@@ -437,7 +437,7 @@ module YMDP
|
|
437
437
|
elsif File.exists?(path)
|
438
438
|
$stdout.puts("Parsing #{path}")
|
439
439
|
template = File.read(path)
|
440
|
-
output =
|
440
|
+
output = process_erb(template)
|
441
441
|
end
|
442
442
|
|
443
443
|
output
|
data/ymdp.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ymdp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 53
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 10
|
9
|
-
-
|
10
|
-
version: 0.10.
|
9
|
+
- 1
|
10
|
+
version: 0.10.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Isaac Priestley
|