ymdp 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/ymdp/compiler/base.rb +3 -1
- data/lib/ymdp/compiler/template.rb +17 -1
- data/lib/ymdp/configuration/config.rb +2 -0
- data/ymdp.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.3
|
data/lib/ymdp/compiler/base.rb
CHANGED
@@ -77,7 +77,7 @@ module YMDP
|
|
77
77
|
def process_all_files(path)
|
78
78
|
Dir["#{path}**/*"].each do |f|
|
79
79
|
build_file(f)
|
80
|
-
end
|
80
|
+
end
|
81
81
|
end
|
82
82
|
|
83
83
|
# Build this file if it's either:
|
@@ -98,6 +98,8 @@ module YMDP
|
|
98
98
|
if build?(file)
|
99
99
|
if file =~ /(\.haml|\.erb)$/
|
100
100
|
YMDP::Compiler::Template::View.new(params).build
|
101
|
+
elsif file =~ /\.coffee$/
|
102
|
+
YMDP::Compiler::Template::CoffeeScript.new(params).build
|
101
103
|
elsif file =~ /\.js$/
|
102
104
|
YMDP::Compiler::Template::JavaScript.new(params).build
|
103
105
|
end
|
@@ -280,7 +280,7 @@ module YMDP
|
|
280
280
|
end
|
281
281
|
|
282
282
|
def process_coffee(template, filename=nil)
|
283
|
-
CoffeeScript.compile(process_template(template))
|
283
|
+
::CoffeeScript.compile(process_template(template))
|
284
284
|
end
|
285
285
|
|
286
286
|
# Write this template with the application layout applied.
|
@@ -318,6 +318,22 @@ module YMDP
|
|
318
318
|
write_template_without_layout(result)
|
319
319
|
end
|
320
320
|
end
|
321
|
+
|
322
|
+
class CoffeeScript < View
|
323
|
+
# Compile CoffeeScript into JavaScript and write it
|
324
|
+
#
|
325
|
+
def write_template(result)
|
326
|
+
@file.gsub!(/\.coffee$/, "")
|
327
|
+
filename = @file.split("/").last
|
328
|
+
tmp_filename = "#{TMP_PATH}/#{filename}"
|
329
|
+
|
330
|
+
# result = process_coffee(process_template(result))
|
331
|
+
result = process_coffee(result)
|
332
|
+
|
333
|
+
F.save_to_file(result, tmp_filename)
|
334
|
+
write_template_without_layout(result)
|
335
|
+
end
|
336
|
+
end
|
321
337
|
|
322
338
|
# Process Yahoo! Resource Bundle format translation files.
|
323
339
|
#
|
data/ymdp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ymdp}
|
8
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Isaac Priestley"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-28}
|
13
13
|
s.description = %q{Framework for developing applications in the Yahoo! Mail Development Platform.}
|
14
14
|
s.email = %q{progressions@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
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: 57
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 3
|
10
|
+
version: 0.8.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Isaac Priestley
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-28 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|