osteele-ropenlaszlo 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.rdoc CHANGED
@@ -1,13 +1,14 @@
1
1
  = Change Log
2
2
 
3
3
  == Version 0.6.2 (2009-03-23)
4
- * return which compiler was used
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
@@ -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).map { |w| w.first }
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 => compiler}
212
+ results = {:output => output, :warnings => warnings, :compiler => self}
211
213
  return results
212
214
  end
213
215
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osteele-ropenlaszlo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Steele