diff options
author | (no author) <(no author)@c9e70521-770b-0410-b9ac-ce6205b42a9f> | 2007-02-06 12:56:07 +0000 |
---|---|---|
committer | (no author) <(no author)@c9e70521-770b-0410-b9ac-ce6205b42a9f> | 2007-02-06 12:56:07 +0000 |
commit | 0129aafbb64cb552c35dc62a4fe319608cdbfdf1 (patch) | |
tree | 9d1e4f0f5c4d804f9af884f327cadeb23d880840 | |
parent | 1bb46a76a4cbaba2811969db0bc3a71568ce8a02 (diff) | |
download | erubis-0129aafbb64cb552c35dc62a4fe319608cdbfdf1.tar.gz |
- [change] 'helpers/rails.rb' is renamed to 'helpers/rails_helper.rb'
-rw-r--r-- | ChangeLog.txt | 6 | ||||
-rw-r--r-- | Rookbook.yaml | 18 | ||||
-rw-r--r-- | doc/users-guide.html | 12 | ||||
-rw-r--r-- | doc/users-guide.txt | 10 | ||||
-rw-r--r-- | lib/erubis/helpers/rails_helper.rb (renamed from lib/erubis/helpers/rails.rb) | 19 |
5 files changed, 40 insertions, 25 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index dd07adb..0b56e20 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,7 +2,11 @@ .?lastupdate: $Date$ .?version: $Rev$ -: Rev.60 (2007-02-06) + +: Rev.62 (2007-02-06) + .- [change] 'helpers/rails.rb' is renamed to 'helpers/rails_helper.rb' + +: Rev.61 (2007-02-06) .- [change] 'lib/erubis/helper' is renamed to 'lib/erubis/helpers' : Rev.60 (2007-02-06) diff --git a/Rookbook.yaml b/Rookbook.yaml index 63151f2..6041df6 100644 --- a/Rookbook.yaml +++ b/Rookbook.yaml @@ -5,13 +5,13 @@ ### properties: - - release : 0.0.0 + - release : 2.2.0 parameters: - project : erubis - copyright : copyright(c) 2006 kuwata-lab all rights reserved. - - text_files : [ChangeLog, README.txt, LGPL, setup.rb, erubis.gemspec] + - text_files : [CHANGES, README.txt, MIT-LICENSE, setup.rb, erubis.gemspec] - guide : doc/users-guide.html - doc_files : [$(guide), doc/docstyle.css] - apidocdir : doc-api @@ -52,7 +52,7 @@ recipes: ingreds: [ $(apidocdir)/index.html ] - product: $(apidocdir)/index.html - ingreds: [ $(libfiles) ] + ingreds: [ $(libfiles), README.txt ] method*: | rm_rf '$(apidocdir)' opts = "-o ../$(apidocdir) -S -m ../README.txt" @@ -73,21 +73,24 @@ recipes: ingreds: [ $(project)_$(1) ] method*: | rm_f @product if test(?f, @product) - tar_cjf @product, @ingred + #tar_cjf @product, @ingred + sys "tar cjf #{@product} #{@ingred}" - product: $(project)_*.tar.gz desc: create *.tar.gz ingreds: [ $(project)_$(1) ] method*: | rm_f @product if test(?f, @product) - tar_czf @product, @ingred + #tar_czf @product, @ingred + sys "tar czf #{@product} #{@ingred}" - product: $(project)_*.zip desc: create *.zip ingreds: [ $(project)_$(1) ] method*: | rm_f @product if test(?f, @product) - zip_r @product, @ingred + #zip_r @product, @ingred + sys "zip -r9 #{@product} #{@ingred}" - product: $(project)-*.gem @@ -133,7 +136,8 @@ recipes: mkdir_p "#{dir}/doc" cp_r doc_files, "#{dir}/doc" # - mkdir_p "#{dir}/contrib" + store 'contrib/*', dir + #mkdir_p "#{dir}/contrib" cp_r '$(inline_require_script)', "#{dir}/contrib" # edit "#{dir}/**/*" do |content| diff --git a/doc/users-guide.html b/doc/users-guide.html index 404b588..9d90677 100644 --- a/doc/users-guide.html +++ b/doc/users-guide.html @@ -1995,10 +1995,10 @@ try Erubis::TinyEruby class. <li>Add the following code to your 'config/environment.rb'. <div class="program_caption"> config/environment.rb</div> -<pre class="program">require 'erubis/helper/rails' -#Erubis::Helper::Rails.engine_class = Erubis::Eruby -#Erubis::Helper::Rails.init_properties = {} -#Erubis::Helper::Rails.show_src = false +<pre class="program">require 'erubis/helpers/rails_helper' +#Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby +#Erubis::Helpers::RailsHelper.init_properties = {} +#Erubis::Helpers::RailsHelper.show_src = false </pre> </li> <li>(Optional) apply the following patch to 'action_pack/lib/action_view/base.rb'. @@ -2037,6 +2037,10 @@ how to apply patch:</div> $ sudo patch -p1 < /tmp/erubis_2.X.X/contrib/action_view_base_rb.patch </pre> </li> +</ol> +<p> Notice that this patch is optinal if you are using Ruby on Rails ver 1.1 or 1.2. +</p> +<ol type="1"> <li>Restart web server. <pre class="terminal">$ ruby script/server </pre> diff --git a/doc/users-guide.txt b/doc/users-guide.txt index 4213731..4d19f65 100644 --- a/doc/users-guide.txt +++ b/doc/users-guide.txt @@ -1589,10 +1589,10 @@ Erubis supports Ruby on Rails. .? config/environment.rb .-------------------- - require 'erubis/helper/rails' - #Erubis::Helper::Rails.engine_class = Erubis::Eruby - #Erubis::Helper::Rails.init_properties = {} - #Erubis::Helper::Rails.show_src = false + require 'erubis/helpers/rails_helper' + #Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby + #Erubis::Helpers::RailsHelper.init_properties = {} + #Erubis::Helpers::RailsHelper.show_src = false .-------------------- .2) (Optional) apply the following patch to 'action_pack/lib/action_view/base.rb'. @@ -1632,6 +1632,8 @@ Erubis supports Ruby on Rails. $ cd /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_view/ $ sudo patch -p1 < /tmp/erubis_2.X.X/contrib/action_view_base_rb.patch .==================== + + Notice that this patch is optinal if you are using Ruby on Rails ver 1.1 or 1.2. .3) Restart web server. .==================== diff --git a/lib/erubis/helpers/rails.rb b/lib/erubis/helpers/rails_helper.rb index f13da35..32873ca 100644 --- a/lib/erubis/helpers/rails.rb +++ b/lib/erubis/helpers/rails_helper.rb @@ -10,7 +10,7 @@ require 'erubis' module Erubis - module Helper + module Helpers ## ## helper module for Ruby on Rails @@ -19,10 +19,10 @@ module Erubis ## ## 1. add the folliwng code in your 'config/environment.rb' ## - ## require 'erubis/helper/rails' - ## #Erubis::Helper::Rails.engine_class = Erubis::Eruby - ## #Erubis::Helper::Rails.init_properties = {} - ## #Erubis::Helper::Rails.show_src = false + ## require 'erubis/helpers/rails_helper' + ## #Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby + ## #Erubis::Helpers::RailsHelper.init_properties = {} + ## #Erubis::Helpers::RailsHelper.show_src = false ## ## 2. (optional) apply the patch for 'action_view/base.rb' ## @@ -34,7 +34,7 @@ module Erubis ## if Erubis::Helper::Rails.show_src is ture, Erubis prints converted Ruby code ## into log file ('log/development.log' or so). This may be useful for debug. ## - module Rails + module RailsHelper #cattr_accessor :init_properties @@engine_class = Erubis::Eruby @@ -174,11 +174,12 @@ class ActionView::Base # :nodoc: private def convert_template_into_ruby_code(template) #src = Erubis::Eruby.new(template).src - klass = Erubis::Helper::Rails.engine_class - properties = Erubis::Helper::Rails.init_properties + klass = Erubis::Helpers::RailsHelper.engine_class + properties = Erubis::Helpers::RailsHelper.init_properties + show_src = Erubis::Helpers::RailsHelper.show_src src = klass.new(template, properties).src src.insert(0, '_erbout = ') - logger.debug "** Erubis: src=<<'END'\n#{src}END\n" if Erubis::Helper::Rails.show_src + logger.debug "** Erubis: src==<<'END'\n#{src}END\n" if show_src src end end |