diff options
author | makoto kuwata <kwa@kuwata-lab.com> | 2007-10-23 06:35:40 +0000 |
---|---|---|
committer | makoto kuwata <kwa@kuwata-lab.com> | 2007-10-23 06:35:40 +0000 |
commit | 4ca35ae82dc946df548e5b399625a2ffb72946e9 (patch) | |
tree | c78a0573df2762f9b362ba3ae0e9d340c2e69a3f | |
parent | 1b913d61adcab0e377abe6022dbf54892c0482e5 (diff) | |
download | erubis-4ca35ae82dc946df548e5b399625a2ffb72946e9.tar.gz |
- [change] remove 'website/'
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | ChangeLog.txt | 6 | ||||
-rw-r--r-- | ReleaseNote.txt | 64 | ||||
-rw-r--r-- | website/.htaccess | 4 | ||||
-rw-r--r-- | website/.properties | 6 | ||||
-rw-r--r-- | website/Rookbook.rb | 89 | ||||
l--------- | website/docstyle.css | 1 | ||||
-rw-r--r-- | website/download.cgi | 61 | ||||
-rw-r--r-- | website/img/erubis01.bmp | bin | 11824 -> 0 bytes | |||
-rw-r--r-- | website/img/erubis01.png | bin | 3317 -> 0 bytes | |||
-rw-r--r-- | website/img/erubis02.bmp | bin | 14744 -> 0 bytes | |||
-rw-r--r-- | website/img/erubis02.png | bin | 4169 -> 0 bytes | |||
-rw-r--r-- | website/index.txt | 134 | ||||
-rw-r--r-- | website/index.xhtml | 210 | ||||
l--------- | website/site-design.css | 1 | ||||
l--------- | website/site-design.ktag | 1 |
16 files changed, 71 insertions, 508 deletions
@@ -4,7 +4,7 @@ # - release: 2.4.1 - date: + date: 2007-09-25 enhancements: - | diff --git a/ChangeLog.txt b/ChangeLog.txt index e32fb55..3541352 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,12 @@ .?lastupdate: $Date$ .?version: $Rev$ +: Rev.97 (2007-10-23) + .- [change] remove 'website/' + +: Rev.96 (2007-09-25) + .- [release] 2.4.1 + : Rev.95 (2007-09-24) .- [enhance] add '--docwrite={true|false}' property to Ejavascript class. .- [update] user's guide diff --git a/ReleaseNote.txt b/ReleaseNote.txt index fedbc82..73e9d0f 100644 --- a/ReleaseNote.txt +++ b/ReleaseNote.txt @@ -1,3 +1,67 @@ +$ [ANN] Erubis 2.4.1 released - two bugs are fixed + +I have released Erubis 2.4.1. +http://www.kuwata-lab.com/erubis/ +Erubis is another eRuby implementation which is very fast and +extensible than ERB and eruby. + +This is a bugfix release. + + enhancements: + + - | + Add new section 'evaluate(context) v.s. result(binding)' to user's guide. + This section describes why Erubis::Eruby#evaluate(context) is recommended + rather than Erubis::Eruby#result(binding). + User's Guide > Other Topics > evaluate(context) v.s. result(binding) + http://www.kuwata-lab.com/erubis/users-guide.06.html#topics-context-vs-binding + + - | + Add new command-line property '--docwrite={true|false}' to + Erubis::Ejavascript. + If this property is true then 'document.write(_buf.join(""));' is used + as postamble and if it is false then '_buf.join("")' is used. + Default is true for compatibility reason but it will be false in the + future release. + (This feature was proposed by D.Dribin. Thank you.) + + bugfix: + + - | + When using Erubis::Eruby#evaluate(), changing local variables in + templates have affected to variables accessible with TOPLEVEL_BINDING. + It means that if you change variables in templates, it is possible to + change variables in main program. + This was a bug and is now fixed not to affect to variables in main + program. + + ex. template.rhtml + -------------------- + <% for x in @items %> + item = <%= x %> + <% end %> + -------------------- + + ex. main-program.rb + -------------------- + require 'erubis' + x = 10 + items = ['foo', 'bar', 'baz'] + eruby = Erubis::Eruby.new(File.read('template.rhtml')) + s = eruby.evaluate(:items=>items) + print s + $stderr.puts "*** debug: x=#{x.inspect}" #=> x="baz" (2.4.0) + #=> x=10 (2.4.1) + -------------------- + + - | + PercentLineEnhancer was very slow. Now performance problem is solved. + +-- +regards, +kwatch + + $ [ANN] Erubis 2.4.0 released - a fast eRuby implementation Erubis 2.4.0 released. diff --git a/website/.htaccess b/website/.htaccess deleted file mode 100644 index 6c07aaf..0000000 --- a/website/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ - RewriteEngine on - #RewriteRule (.*)\.html$ /site-design.cgi?fn=$1.html - RewriteRule \.html$ /site-design.cgi - RewriteRule ^$ /site-design.cgi diff --git a/website/.properties b/website/.properties deleted file mode 100644 index 2a0aa25..0000000 --- a/website/.properties +++ /dev/null @@ -1,6 +0,0 @@ -name: erubis -title: Erubis -#parent: ../../../../work/kuwata-lab -parent: ../../../kuwata-lab -#cssfile: default.css -#maincolor: #FFCC66 diff --git a/website/Rookbook.rb b/website/Rookbook.rb deleted file mode 100644 index 06e9778..0000000 --- a/website/Rookbook.rb +++ /dev/null @@ -1,89 +0,0 @@ -U = 'users-guide' unless defined?(U) -docdir = '../doc' -#website_tagfile = 'kuwata-lab' -website_tagfile = 'site-design.ktag' -html_tagfile = 'html-css_i' - -material 'index.txt' - -require 'yaml' -parameters = YAML.load_file('../Rookbook.props') -release = parameters['release'] -copyright = parameters['copyright'] - - -## -## recipes for kuwata-lab.com -## -#all = %W[index.xhtml README.xhtml #{U}.01.xhtml ChangeLog.txt] -all = %W[index.xhtml #{U}.01.xhtml CHANGES.txt ReleaseNote.txt] - -recipe :default , :all - -recipe :all , all - -recipe :clean do - files = [] - files.concat Dir.glob("README.*") - files.concat Dir.glob("CHANGES*") - files.concat Dir.glob("#{U}.*") - files.concat(%w[m18n.rb guide.d index.xhtml]) - rm_rf [files] - end - -recipe "#{U}.txt" , "../doc/#{U}.txt" do - cp @ingred, @product - end - -recipe "#{U}.01.xhtml" , "#{U}.txt", :byprods=>["#{U}.toc.html"] do - tagfile = website_tagfile - dir = "guide.d" - rm_rf dir - mkdir_p dir - sys "retrieve -d #{dir} #{@ingred}" - ## -b: .profile and breadcrumbs, -s: separate, -n: number - sys "kwaser -t #{tagfile} -bsn -T2 #{@ingred} > #{@byprods[0]}" - sys "kwaser -t #{tagfile} -bsn #{@ingred}" - files = Dir.glob("#{U}.??.html") - files << "#{U}.html" - #p files - edit files do |content| - content.gsub!(/\$Release\$/, "#{release}") - content.gsub!(/\$Release:.*?\$/, "$Release: #{release} $") - content.gsub!(/\$Copyright.*?\$/, copyright) - content - end - files.each do |old| - new = old.sub(/\.html$/, '.xhtml') - File.rename(old, new) if old != new - end - rm_f @byprods - end - -#recipe 'README.xhtml' , '../README' do -# tagfile = website_tagfile -# sys "kwaser -t #{tagfile} -b #{@ingred} > #{@product}" -# end - -recipe "index.xhtml" , "index.txt", - :byprods=>%w[data.yaml example.eruby] do - tagfile = website_tagfile - sys "retrieve #{@ingred}" - sys "kwaser -t #{tagfile} -b #{@ingred} > #{@product}" - rm_f @byprods - end - -#recipe "ChangeLog.html" , "../ChangeLog" do -# tagfile = website_tagfile -# sys "kwaser -t #{tagfile} -b #{@ingred} > #{@product}" -# end - -recipe "CHANGES.txt" , "../CHANGES" do - #copy r.ingreds[0], r.product - cp @ingred, @product - end - -recipe "ReleaseNote.txt" , "../ReleaseNote.txt" do - cp @ingred, @product - end - diff --git a/website/docstyle.css b/website/docstyle.css deleted file mode 120000 index 65c8cbb..0000000 --- a/website/docstyle.css +++ /dev/null @@ -1 +0,0 @@ -/Users/kwatch/src/kwaff/trunk/doc/docstyle.css
\ No newline at end of file diff --git a/website/download.cgi b/website/download.cgi deleted file mode 100644 index 32fe037..0000000 --- a/website/download.cgi +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/local/bin/php -<?php - -/* - * redirecto url - */ -#$redirect_url = "http://sourceforge.net/projects/kwaff/"; -if ($_REQUEST['project'] == 'erubisj') { - $redirect_url = "http://sourceforge.net/project/showfiles.php?group_id=178490"; -} else { - //$redirect_url = "http://rubyforge.net/projects/erubis/"; - $redirect_url = "http://rubyforge.org/frs/?group_id=1320&release_id=7090"; -} - - -/* - * counter increment and return value - */ -function counter_incr(&$basedir, &$filename) { - $filename = preg_replace('/\.\./', '_', $filename); // for security - if (!is_dir($basedir) && !mkdir($basedir)) { - die($basedir); - } - $dir = dirname("${basedir}/${filename}"); - if (!is_dir($dir) && !mkdir_p($dir, 0700)) { - die("cannot create '${dir}'"); - } - if (! ($f = fopen("${basedir}/${filename}", "a+"))) { - die("${basedir}/${filename}"); - } - flock($f, LOCK_EX); - rewind($f); - $s = fread($f, 1024); - $n = 1 + $s; - ftruncate($f, 0); - fwrite($f, "$n"); - //flock($f, LOCK_UN); - fclose($f); - return $n; -} - - -/* - * main program - */ -// increment counter -$docroot = $_SERVER['DOCUMENT_ROOT']; -$basedir_data = dirname($docroot) . "/Counter"; -$request_uri = $_SERVER['REQUEST_URI']; -$filepath = preg_replace('/^http:\/\/[^\/]+/', '', $request_uri); -counter_incr($basedir_data, $filepath); - -// redirect -header("Location: ${redirect_url}"); - -?> -<html> -<body> -Jump to <a href="<?php echo htmlspecialchars($redirect_url); ?>"><?php echo htmlspecialchars($redirect_url); ?></a> -</body> -</html> diff --git a/website/img/erubis01.bmp b/website/img/erubis01.bmp Binary files differdeleted file mode 100644 index c131aab..0000000 --- a/website/img/erubis01.bmp +++ /dev/null diff --git a/website/img/erubis01.png b/website/img/erubis01.png Binary files differdeleted file mode 100644 index b56931e..0000000 --- a/website/img/erubis01.png +++ /dev/null diff --git a/website/img/erubis02.bmp b/website/img/erubis02.bmp Binary files differdeleted file mode 100644 index 5940ea6..0000000 --- a/website/img/erubis02.bmp +++ /dev/null diff --git a/website/img/erubis02.png b/website/img/erubis02.png Binary files differdeleted file mode 100644 index ab5b234..0000000 --- a/website/img/erubis02.png +++ /dev/null diff --git a/website/index.txt b/website/index.txt deleted file mode 100644 index c4c5c0b..0000000 --- a/website/index.txt +++ /dev/null @@ -1,134 +0,0 @@ -.=title: Erubis -.#.?lastupdate: $Date$ -.#.?stylesheet: docstyle.css -.#.?stylesheet: site-design.css - - -.$ News - -.* [2007-07-19] {{<erubis_2.4.0|download.cgi>}} released. -.* [2007-05-26] {{<erubis_2.3.1|download.cgi>}} released. - This is a bugfix release. You should update immediately. -.* [2007-05-23] {{<erubis_2.3.0|download.cgi>}} released. -.* [2007-02-12] {{<erubis_2.2.0|download.cgi>}} released. -.* [2006-09-28] {{<erubis-j_1.0.0|download.cgi>}} (porting to Java) released. -.* [2006-09-24] {{<erubis_2.1.0|download.cgi>}} released. -.#.* [2006-05-20] {{<erubis_2.0.0|download.cgi>}} released. -.#.* [2006-03-05] {{<erubis_1.1.0|download.cgi>}} released. -.#.* [2006-05-20] {{<erubis_2.0.0|http://rubyforge.org/projects/erubis/>}} released. -.#.* [2006-03-05] {{<erubis_1.1.0|http://rubyforge.org/projects/erubis/>}} released. - - -.$ Introduction - -.+++++ -<p></p> <!-- escape IE Bug --> -<table class="fig-entry" summary=""> - <tr> - <td class="fig-caption"> - Fig: Erubis is the fastest eRuby implementation. - </td> - </tr> - <tr> - <td class="fig-body"> - <img src="img/erubis01.png" width="351" height="262" alt="figure of Erubis" /> - </td> - </tr> -</table> -.+++++ - -Erubis is a fast, secure, and very extensible implementation of eRuby. -It has the following features. -.* Very fast, almost three times faster than ERB and about ten percent faster than eruby (implemented in C). -.* File caching of converted Ruby script support. -.* Auto escaping (sanitizing) support, it means that '<%= %>' can be escaped in default. - It is desirable for web application. -.* Spaces around '<% %>' are trimmed automatically only when '<%' is at the beginning of line and '%>' is at the end of line. -.* Embedded pattern changeable (default '<% %>'), for example '[% %]' or '<? ?>' are available. -.* Enable to handle Processing Instructions (PI) as embedded pattern (ex. '<?rb ... ?>'). - This is desirable for XML/HTML than '<% .. %>' because the latter breaks HTML design - but the former doesn't. -.* Multi-language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript). -.* Context object available and easy to combine eRuby template with YAML datafile - (see the below example). -.* Print statement available. -.* Easy to expand and customize in subclass - .- Print statement support - .- Lines starting with percent character ('%') support - .- Another embedded pattern support - .- etc... -.* Ruby on Rails support. -.* Mod_ruby support. - -eRuby means "embedded Ruby" in documents. -Embedded patterns are '{{,<% {{/statement/}} %>,}}' and '{{,<%= {{/expression/}} %>,}}'. -The following is an example of eRuby. '<% ... %>' means Ruby statement and '<%= ... %>' means Ruby expression. - -.? example.eruby -.-------------------- example.eruby -<h1>{{*<%= @title %>*}}</h1> -<ul> - {{*<% for item in @items %>*}} - <li><%= item %></td> - {{*<% end %>*}} -</ul> -.-------------------- - -This will be compiled into Ruby program code. -.==================== -$ erubis -x example.eruby -.<<<:! erubis -x example.eruby -.==================== - -Or you can execute eRuby script directry. -.==================== -$ cat data.yaml -.<<<:! cat data.yaml -$ erubis -f data.yaml example.eruby -.<<<:! erubis -f data.yaml example.eruby -.==================== - -.#+++ -.-------------------- data.yaml -title: Erubis Example -items: - - AAA - - BBB - - CCC -.-------------------- -.#--- - -.#In addition, Erubis supports '{{,<?rb {{/statement/}} ?>,}}' and '{{,@{{{/expression/}}}@,}}' which is more desirable for XML/HTML than ordinaly pattern because they don't break HTML desgin. -.#The following is an example of '{{,<?rb ?>,}}' and '{{,@{ }@,}}'. - -.#Erubis supports not only Ruby but also PHP, C, Java, Scheme, Perl, and Javascript. -.#You can embed these language code into your document and compile it into target program code. - -Erubis is implemented in Ruby and is now ported into Java. -You can use Erubis in Java with Rhino. - - - -.$ Download - .* Erubis 2.4.0 (implemented in Ruby) - .- if you have installed RubyGems, just type `{{,gem install -r erubis,}}' to install Erubis - .- Or {{<download|download.cgi>}}.^ - (Erubis requires {{<abstract|http://rubyforge.org/projects/abstract>}} library. - Download and install it at first.) - .* Erubis-J 1.0.0 (implemented in Java) {{!(New!)!}} - .- {{<download|download.cgi?project=erubisj>}} - -.$ Documents - .#.* {{<README|README.en.html>}} - .* Erubis 2.4.0 (implemented in Ruby) - .- {{<User's guide|users-guide.html>}} - .- {{<CHANGES|CHANGES.txt>}} - .#.- {{<ReleaseNote|ReleaseNote.txt>}} - .* Erubis-J 1.0.0 (implemented in Java) - .- {{<User's guide|erubisj-users-guide.html>}} - .#.- {{<Changelog|erubisj-ChangeLog>}} - .#.- {{<ReleaseNote|erubisj-ReleaseNote.txt>}} - -.$ License - .* Erubis is released under the MIT License. - .* Erubis-J is released under the LGPL License. diff --git a/website/index.xhtml b/website/index.xhtml deleted file mode 100644 index 92990e8..0000000 --- a/website/index.xhtml +++ /dev/null @@ -1,210 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/xhtml" /> - <title>Erubis</title> - <meta name="generator" content="kwaser" /> - <link rel="stylesheet" href="site-design.css" type="text/css" /> - <meta http-equiv="Content-Style-Type" content="text/css" /> - </head> - <body> - - <div id="mainbody"> - - <!-- BeginEditable "breadcrumbs" --> - <a href="/">HOME</a> - > Erubis<br /> - <!-- EndEditable "breadcrumbs" --> - - <!-- BeginEditable "doc_content" --> - <div id="doc_content"> - <h1 id="doc_title">Erubis</h1> -<a name="News"></a> -<h2 class="section">News</h2> -<ul class="ul1"> -<li>[2007-07-19] <a href="download.cgi">erubis_2.4.0</a> released. -</li> -<li>[2007-05-26] <a href="download.cgi">erubis_2.3.1</a> released. - This is a bugfix release. You should update immediately. -</li> -<li>[2007-05-23] <a href="download.cgi">erubis_2.3.0</a> released. -</li> -<li>[2007-02-12] <a href="download.cgi">erubis_2.2.0</a> released. -</li> -<li>[2006-09-28] <a href="download.cgi">erubis-j_1.0.0</a> (porting to Java) released. -</li> -<li>[2006-09-24] <a href="download.cgi">erubis_2.1.0</a> released. -</li> -</ul> - - - -<a name="Introduction"></a> -<h2 class="section">Introduction</h2> -<p></p> <!-- escape IE Bug --> -<table class="fig-entry" summary=""> - <tr> - <td class="fig-caption"> - Fig: Erubis is the fastest eRuby implementation. - </td> - </tr> - <tr> - <td class="fig-body"> - <img src="img/erubis01.png" width="351" height="262" alt="figure of Erubis" /> - </td> - </tr> -</table> -<p>Erubis is a fast, secure, and very extensible implementation of eRuby. -It has the following features. -</p> -<ul class="ul1"> -<li>Very fast, almost three times faster than ERB and about ten percent faster than eruby (implemented in C). -</li> -<li>File caching of converted Ruby script support. -</li> -<li>Auto escaping (sanitizing) support, it means that '<%= %>' can be escaped in default. - It is desirable for web application. -</li> -<li>Spaces around '<% %>' are trimmed automatically only when '<%' is at the beginning of line and '%>' is at the end of line. -</li> -<li>Embedded pattern changeable (default '<% %>'), for example '[% %]' or '<? ?>' are available. -</li> -<li>Enable to handle Processing Instructions (PI) as embedded pattern (ex. '<?rb ... ?>'). - This is desirable for XML/HTML than '<% .. %>' because the latter breaks HTML design - but the former doesn't. -</li> -<li>Multi-language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript). -</li> -<li>Context object available and easy to combine eRuby template with YAML datafile - (see the below example). -</li> -<li>Print statement available. -</li> -<li>Easy to expand and customize in subclass - <ul class="ul2"> - <li>Print statement support - </li> - <li>Lines starting with percent character ('%') support - </li> - <li>Another embedded pattern support - </li> - <li>etc... - </li> - </ul> -</li> -<li>Ruby on Rails support. -</li> -<li>Mod_ruby support. -</li> -</ul> -<p>eRuby means "embedded Ruby" in documents. -Embedded patterns are '<code><% <em>statement</em> %></code>' and '<code><%= <em>expression</em> %></code>'. -The following is an example of eRuby. '<% ... %>' means Ruby statement and '<%= ... %>' means Ruby expression. -</p> -<a name="example.eruby"></a> -<div class="program_caption">example.eruby</div> -<pre class="program"><h1><strong><%= @title %></strong></h1> -<ul> - <strong><% for item in @items %></strong> - <li><%= item %></td> - <strong><% end %></strong> -</ul> -</pre> -<p>This will be compiled into Ruby program code. -</p> -<pre class="terminal">$ erubis -x example.eruby -_buf = ''; _buf << '<h1>'; _buf << ( @title ).to_s; _buf << '</h1> -<ul> -'; for item in @items - _buf << ' <li>'; _buf << ( item ).to_s; _buf << '</td> -'; end - _buf << '</ul> -'; -_buf.to_s -</pre> -<p>Or you can execute eRuby script directry. -</p> -<pre class="terminal">$ cat data.yaml -title: Erubis Example -items: - - AAA - - BBB - - CCC -$ erubis -f data.yaml example.eruby -<h1>Erubis Example</h1> -<ul> - <li>AAA</td> - <li>BBB</td> - <li>CCC</td> -</ul> -</pre> -<p>Erubis is implemented in Ruby and is now ported into Java. -You can use Erubis in Java with Rhino. -</p> - - - -<a name="Download"></a> -<h2 class="section">Download</h2> - <ul class="ul1"> - <li>Erubis 2.4.0 (implemented in Ruby) - <ul class="ul2"> - <li>if you have installed RubyGems, just type `<code>gem install -r erubis</code>' to install Erubis - </li> - <li>Or <a href="download.cgi">download</a><br /> - (Erubis requires <a href="http://rubyforge.org/projects/abstract">abstract</a> library. - Download and install it at first.) - </li> - </ul> - </li> - <li>Erubis-J 1.0.0 (implemented in Java) <span style="color:#FF0000">(New!)</span> - <ul class="ul2"> - <li><a href="download.cgi?project=erubisj">download</a> - </li> - </ul> - </li> - </ul> - - - -<a name="Documents"></a> -<h2 class="section">Documents</h2> - <ul class="ul1"> - <li>Erubis 2.4.0 (implemented in Ruby) - <ul class="ul2"> - <li><a href="users-guide.html">User's guide</a> - </li> - <li><a href="CHANGES.txt">CHANGES</a> - </li> - </ul> - </li> - <li>Erubis-J 1.0.0 (implemented in Java) - <ul class="ul2"> - <li><a href="erubisj-users-guide.html">User's guide</a> - </li> - </ul> - </li> - </ul> - - - -<a name="License"></a> -<h2 class="section">License</h2> - <ul class="ul1"> - <li>Erubis is released under the MIT License. - </li> - <li>Erubis-J is released under the LGPL License. - </li> - </ul> - - - - - </div> - <!-- EndEditable "doc_content" --> - </div> - - </body> -</html> diff --git a/website/site-design.css b/website/site-design.css deleted file mode 120000 index 135fda2..0000000 --- a/website/site-design.css +++ /dev/null @@ -1 +0,0 @@ -../../../kuwata-lab/site-design.css
\ No newline at end of file diff --git a/website/site-design.ktag b/website/site-design.ktag deleted file mode 120000 index 712da7a..0000000 --- a/website/site-design.ktag +++ /dev/null @@ -1 +0,0 @@ -../../../kuwata-lab/site-design.ktag
\ No newline at end of file |