osteele-ropenlaszlo 0.6.2 → 0.6.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/CHANGES.rdoc +3 -2
- data/lib/openlaszlo/compiler.rb +5 -3
- metadata +1 -1
data/CHANGES.rdoc
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
= Change Log
|
2
2
|
|
3
3
|
== Version 0.6.2 (2009-03-23)
|
4
|
-
*
|
4
|
+
* unquote html entities in errors and warnings
|
5
5
|
|
6
|
+
== Version 0.6.2 (2009-03-23)
|
7
|
+
* return which compiler was used
|
6
8
|
|
7
9
|
== Version 0.6.1 (2009-03-23)
|
8
10
|
* rename command-line compiler output file
|
9
11
|
|
10
|
-
|
11
12
|
== Version 0.6 (2009-03-23)
|
12
13
|
* follow symbolic links
|
13
14
|
* reorganize directory structure
|
data/lib/openlaszlo/compiler.rb
CHANGED
@@ -70,10 +70,12 @@ module OpenLaszlo
|
|
70
70
|
options = {}.update(options).update(:format => 'canvas-xml', :output => nil)
|
71
71
|
results = {:compiler => self}
|
72
72
|
text = request(source_file, options)
|
73
|
+
entities = {'lt' => '<', 'gt' => '>', 'quot' => '"', 'amp' => '&'}
|
73
74
|
if text =~ %r{<warnings>(.*?)</warnings>}m
|
74
|
-
results[:warnings] = $1.scan(%r{<error>\s*(.*?)\s*</error>}m).
|
75
|
+
results[:warnings] = $1.scan(%r{<error>\s*(.*?)\s*</error>}m).
|
76
|
+
map { |w| w.first.gsub(/&(\w+);/) { |s| entities[$0] || s } }
|
75
77
|
elsif text !~ %r{<canvas>} && text =~ %r{<pre>Error:\s*(.*?)\s*</pre>}m
|
76
|
-
results[:error] = $1
|
78
|
+
results[:error] = $1.gsub(/&(\w+);/) { |s| entities[$0] || s }
|
77
79
|
end
|
78
80
|
return results
|
79
81
|
end
|
@@ -207,7 +209,7 @@ module OpenLaszlo
|
|
207
209
|
if errors =~ /^Compilation errors occurred:\n/
|
208
210
|
raise CompilationError.new($'.strip)
|
209
211
|
end
|
210
|
-
results = {:output => output, :warnings => warnings, :compiler =>
|
212
|
+
results = {:output => output, :warnings => warnings, :compiler => self}
|
211
213
|
return results
|
212
214
|
end
|
213
215
|
|