diff options
author | makoto kuwata <kwa@kuwata-lab.com> | 2006-04-24 09:34:10 +0000 |
---|---|---|
committer | makoto kuwata <kwa@kuwata-lab.com> | 2006-04-24 09:34:10 +0000 |
commit | e58249ed059ac9d961afda61190447299da4e475 (patch) | |
tree | 4ffdb2c86d1fe4796c7babc1399c43e5a2f5732e /ReleaseNote.txt | |
parent | 2481e29aa76b99f8a5236f16c67be73646522223 (diff) | |
download | erubis-e58249ed059ac9d961afda61190447299da4e475.tar.gz |
- [enhance] new classes LightweightEruby and LightweightXmlEruby added
- [enhance] new classes EscapedEruby and LightweightEscapedEruby added
- [change] XmlEruby.escape_xml() is moved to XmlHelper.escape_xml()
Diffstat (limited to 'ReleaseNote.txt')
-rw-r--r-- | ReleaseNote.txt | 98 |
1 files changed, 96 insertions, 2 deletions
diff --git a/ReleaseNote.txt b/ReleaseNote.txt index fd24c33..3e37eb9 100644 --- a/ReleaseNote.txt +++ b/ReleaseNote.txt @@ -1,5 +1,5 @@ -$ Release 1.1.0 (2006-03-05) +$ Release 1.1.1 (2006-03-06) I have released Erubis 1.1.0. http://rubyforge.org/projects/erubis/ @@ -12,16 +12,105 @@ It has the following features: * Embedded pattern changeable (default '<% %>') * Context object available * Print statement available +* Faster mode support +* Easy to expand in subclass + +Erubis is implemented in pure Ruby. It requires Ruby 1.8 or higher. + +See doc/users-guide.html in archive for details. + + +: Enhancement from 1.1.0 + + * New command-line option '-x' supported. + This option prints Ruby source code of eRuby script coverted + and remove the last '_out' line. + This is more convenient than '-s' when validating with 'ruby -wc'. + + example: + ==================== + $ cat foo.eruby + <% (1..3).each do |i| %> + i = <%= i %> + <% end %> + + $ eruby -x foo.eruby + _out = ''; (1..3).each do |i| + _out << " i = "; _out << ( i ).to_s; _out << "¡Àn" + end + $ eruby -x foo.eruby | ruby -wc + Syntax OK + + $ eruby -s foo.eruby + _out = ''; (1..3).each do |i| + _out << " i = "; _out << ( i ).to_s; _out << "¡Àn" + end + _out + $ erubis -s foo.rhtml | ruby -wc + -:4: warning: useless use of a variable in void context + Syntax OK + ==================== + + +$ Release 1.1.0 (2006-03-05) + +I have released Erubis 1.1.0. +http://rubyforge.org/projects/erubis/ + +Erubis is an implementation of eRuby. +It has the following features: + +* Auto sanitizing support +* Embedded pattern changeable (default '<% %>') +* Auto trimming spaces around '<% %>' +* Context object available +* Print statement available +* Faster mode support * Easy to expand in subclass Erubis is implemented in pure Ruby. It requires Ruby 1.8 or higher. +Sample code (example.rb): +-------------------- +## eRuby script +## ('<%= %>' is escaped and '<%== %>' is not escaped when using XmlEruby class) +input = <<END +<ul> + <% for item in list %> + <li><%= item %> + <%== item %></li> + <% end %> +</ul> +END + +## create Eruby object +require 'erubis' +eruby = Erubis::XmlEruby.new(input) # or Erubis::Eruby.new(input) + +## get result +list = ['<aaa>', 'b&b', '"ccc"'] +puts eruby.result(binding()) +-------------------- + +result: +==================== +$ ruby example.rb +<ul> + <li><aaa> + <aaa></li> + <li>b&b + b&b</li> + <li>"ccc" + "ccc"</li> +</ul> +==================== + See doc/users-guide.html in archive for details. : Enhancement from 1.0.1 - * '<%# .. %>' support. Erubis ignores '<%# %>'. + * '<%# .. %>' supported. Erubis ignores '<%# %>'. * New class PrintEruby and PrintXmlEruby available. These class enables you to embed print statement in eRuby @@ -60,3 +149,8 @@ See doc/users-guide.html in archive for details. </ul> ==================== +Have fun! + +-- +regards, +kwatch |