Gems_big

erubis

2.7.0

Erubis is an implementation of eRuby and has the following features: * Very fast, almost three times faster than ERB and about 10% faster than eruby. * Multi-language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript) * Auto escaping support * Auto trimming spaces around '<% %>' * Embedded pattern changeable (default '<% %>') * Enable to handle Processing Instructions (PI) as embedded pattern (ex. '<?rb ... ?>') * Context object available and easy to combine eRuby template with YAML datafile * Print statement available * Easy to extend and customize in subclass * Ruby on Rails support

Critical or Security advisories for 2.7.0

This version doesn't have any advisory. Want to report one?

Changelog for 2.7.0

  date: 2011-04-01
  enhancements:

    - |
	New option ':bufvar' supported to specify buffer variable name.

	ex:
	    input = "Hello !"
	    eruby = Erubis::Eruby.new(input)
	    puts eruby.src
	       #=>  _buf = ''; _buf << "Hello "; _buf << ( name ).to_s; _buf << '!';

	    eruby = Erubis::Eruby.new(input, :bufvar=>'@_out')
	    puts eruby.src
	       #=>  @_out = ''; @_out << 'Hello '; @_out << ( name ).to_s; @_out << '!';

    - |
	New enhancer 'PrefixedLineEnhancer' which is a customizable version
	of PercentLineEnhancer.
	The difference between PrefixedLineEnhancer and PercentLineEnhancer is:
	* You can indent Ruby statetment lines starting with '%'
	* You can specify prefix character by :prefixchar option.

	ex:
	    class MyEruby < Erubis::Eruby
	      include Erubis::PrefixedLineEnhancer
	    end
	    input = <
    % for item in @items
  • % end %% you can indent '%' lines
END eruby = MyEruby.new(input, :prefixchar=>'%') # default '%' puts eruby.src output: _buf = ''; _buf << '
    '; for item in @items _buf << '
  • '; _buf << ( item ).to_s; _buf << '
  • '; end % you can indent '%' lines _buf << '
'; _buf.to_s - | Add helper CGI script. See 'public_html/README.txt' for details. - | Rubinius is supported as first-class Ruby implementation. - | C++ support. Try '-l cpp' command-line option. changes: - | Remove dependency to 'abstract' library. You don't need to install 'abstract' gem. - | Erubis::Eruby#load_file() now sets cache file timestamp to the same value as original eRuby file. For example, if you restore eRuby files from backup, Erubis::Eruby#load_file() can detect it and generate cache file again. ## generates cache file (A.rhtml.cache). eruby = Erubis::Eruby.load_file('A.rhtml') p File.mtime('A.rhtml') == File.mtime('A.rhtml.cache') #=> true

Dependencies for 2.7.0

Name Requirement Status
This version doesn't have runtime dependencies.

My projects using erubis

Name Locked version Requirement
You should be logged in to see which of your projects use erubis.