public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Add warning when loading rexml instead of libxml-ruby

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
mholub (author)
Sat Oct 11 06:42:11 -0700 2008
michaelklishin (committer)
Sat Oct 11 21:30:57 -0700 2008
commit  ef6092a6ee79d112eccbea1b8862c21d46d51b99
tree    53c61f0e45282bf7fb00ad6f78b61d16b10f1a4c
parent  1f6de2c3a0ec4bf42b4d6883e3898c2cc395f118
...
356
357
358
359
 
 
 
 
 
 
360
361
362
...
356
357
358
 
359
360
361
362
363
364
365
366
367
0
@@ -356,7 +356,12 @@ module Merb::Test::Rspec::ViewMatchers
0
       require "libxml"
0
       type = "libxml"
0
     rescue LoadError => e
0
-      require "rexml/document"
0
+      if require "rexml/document" # show warning only once
0
+        warn(<<-WARN_TEXT)
0
+Standard REXML library is slow. Please consider to install libxml-ruby.
0
+Use "sudo gem install libxml-ruby"
0
+WARN_TEXT
0
+      end
0
       type = "rexml"
0
     end
0
     HaveXpath.new(expected, type)

Comments