Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

prepare 0.9.0 release

  • Loading branch information...
commit 0537e176bd1321dca688a36d59e0682437344d0b 1 parent 52c6e28
@alexch alexch authored
View
7 History.txt
@@ -1,4 +1,4 @@
-== 0.9.0
+== 0.9.0 - 2012-08-12
* Finally merged bigfix/rails3 branch - Erector now works with either Rails 2 or Rails 3 (or neither)
* 'scss' external type [needs tests]
@@ -10,6 +10,7 @@
* remove dependency on rake gem
* rename 'render' method to 'emit' (to reduce confusion with Rails' "render" methods)
* Add missing favicon_link_tag and crsf_meta_tags helper methods
+* Add #capture_content as an alias for #capture, so we can call it in a Rails 3.1 app
Deprecated or Removed:
@@ -47,7 +48,7 @@ Core:
* delegate method_missing to parent widget
* 'embed' and 'param' are now self-closing tags (as per browser warnings)
* Converted Widget#context to take a params hash.
-* Exposed an Output object, with rather useful #placeholder method
+* Exposed an Output object, with rather useful #placeholder method
* Defined Widget#output to delegate to #parent if @parent is not already set.
* Removed :parent param for Output#initialize in favor of a block.
* Page#extra_widgets
@@ -149,7 +150,7 @@ Erector tool:
and there should be an upgrade guide up on the website soon.
* 'render' renamed to 'content'
* widget constructor only takes one parameter, an 'assigns' hash (plus the optional default block)
-* to render one widget from inside another, use the 'widget' method (not 'render_to'). This method
+* to render one widget from inside another, use the 'widget' method (not 'render_to'). This method
accepts either a widget instance, or a widget class and an assigns hash.
* 'needs' macro to declare the variables your widget accepts via the 'assigns' constructor parameter
* Removed Widget#to_html caching, which fixed indentation issues.
View
3  VERSION.yml
@@ -1,5 +1,4 @@
----
+---
:major: 0
:minor: 9
:patch: 0
-:build: pre2
View
2  web/cheatsheet.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
View
4 web/community.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
@@ -235,7 +235,7 @@
<li class="clickable" onclick="document.location='http://rubyforge.org/projects/erector/'"><a href="http://rubyforge.org/projects/erector/">RubyForge Project</a></li>
<li class="clickable" onclick="document.location='http://rubyforge.org/pipermail/erector-devel/'"><a href="http://rubyforge.org/pipermail/erector-devel/">erector-devel archive</a></li>
<li class="clickable" onclick="document.location='http://rubyforge.org/frs/?group_id=4797'"><a href="http://rubyforge.org/frs/?group_id=4797">Download</a><br />
- <span> (current version: 0.9.0.pre1)</span></li>
+ <span> (current version: 0.9.0)</span></li>
</ul>
</div>
<div class="footer"><a href="http://www.pivotallabs.com"><img alt="Pivotal Labs" height="57" src="pivotal.gif" style="float:right; padding: 8px;" width="158" /></a>
View
2  web/developers.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
View
2  web/faq.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
View
4 web/index.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
@@ -320,7 +320,7 @@ <h2 class="clear">Examples</h2>
<div class="clear"></div>
</div>
<hr />
- <p>Current version: 0.9.0.pre1</p>
+ <p>Current version: 0.9.0</p>
</div>
<div class="footer"><a href="http://www.pivotallabs.com"><img alt="Pivotal Labs" height="57" src="pivotal.gif" style="float:right; padding: 8px;" width="158" /></a>
<center>Erector is an open source project released under the MIT license.<br />
View
12 web/rails.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
@@ -240,6 +240,7 @@ <h1 class="name">Erector On Rails</h1>
<li><a href="#pagelayoutinheritance">Page Layout Inheritance</a></li>
<li><a href="#erectorlayoutsinrails">Erector Layouts in Rails</a></li>
<li><a href="#instancevariables">Instance Variables</a></li>
+ <li><a href="#moreaboutrails">More about Rails</a></li>
</ol>
</div>
<div class="clear"></div>
@@ -437,7 +438,7 @@ <h1 class="name">Erector On Rails</h1>
def footer
p &quot;Copyright (c) 2112, Rush Enterprises Inc.&quot;
- content_for :footer if content_for? :footer
+ content_for :footer if content_for? :footer
end
end
@@ -459,7 +460,7 @@ <h1 class="name">Erector On Rails</h1>
</p>
<a name="instancevariables"></a>
<h2>6. Instance Variables</h2>
- <p>Controller instance variables (sometimes called &quot;assigns&quot;) are available to
+ <p>Controller instance variables (sometimes called &quot;assigns&quot;) are available to
the view, and also to any partial
that gets rendered by the view, no matter how deeply-nested. This effectively
makes controller instance variables &quot;globals&quot;. In small view hierarchies this
@@ -470,7 +471,7 @@ <h1 class="name">Erector On Rails</h1>
Sometimes these aren't used by a view: ApplicationController might assign
variables that are used by many, but not all, views; and various other things
may accumulate, especially if you've been using templating systems that are
-more forgiving than Erector. Erector's &quot;needs&quot; mechanism helps enforce
+more forgiving than Erector. Erector's &quot;needs&quot; mechanism helps enforce
stricter encapsulation. But if you migrate from a promiscuous Rails app
to Erector, you're stuck using
no &quot;needs&quot; declaration at all, because it needs to contain every assigned
@@ -493,6 +494,9 @@ <h1 class="name">Erector On Rails</h1>
something), but they won't cause widget instantiation to fail, either. This
can let a large Rails project transition to Erector more smoothly.
</p>
+ <a name="moreaboutrails"></a>
+ <h2>7. More about Rails</h2>
+ <p>#capture_content is now an alias for #capture, so we can call it in a Rails 3.1 app</p>
</div>
</div>
</div>
View
38 web/rails.rb
@@ -15,7 +15,7 @@ def initialize
def promo
"images/erectorhudson.jpeg"
end
-
+
def body_content
p do
text "This page describes integrating Erector into ",
@@ -31,8 +31,8 @@ def body_content
def article
Article.new(:name => "Erector On Rails").tap { |a|
a.add(:name => "Install") do
- p {
- text "To install as a gem, add ", code("gem 'erector'"), " to your ", code("Gemfile"),
+ p {
+ text "To install as a gem, add ", code("gem 'erector'"), " to your ", code("Gemfile"),
", then add ", code("require 'erector'"), " to ", code("environment.rb"), "."
}
p {
@@ -41,7 +41,7 @@ def article
"When installing this way, erector is automatically available to your Rails code (no require directive is needed)."
}
end
-
+
a.add(:name => "Using Erector from Ruby on Rails", :href => "rails") do
p do
text "Your views are just ruby classes. Your controller can either call Rails' "
@@ -223,7 +223,7 @@ def navbar
text " in the HEAD element."
}
end
-
+
a.add(:name => "Erector Layouts in Rails") do
p do
@@ -272,15 +272,15 @@ def navbar
def footer
p "Copyright (c) 2112, Rush Enterprises Inc."
- content_for :footer if content_for? :footer
+ content_for :footer if content_for? :footer
end
end
RUBY
-
+
br
code "app/views/faq/index.rb:"
-
+
source_code :ruby, <<-RUBY
class Views::Faq::Index < Erector::Widget
def content
@@ -295,34 +295,34 @@ def content
RUBY
p "[TODO: more explanation]"
-
+
end
end
-
+
a.add(:name => "Instance Variables") do
p <<-TEXT
-Controller instance variables (sometimes called "assigns") are available to
+Controller instance variables (sometimes called "assigns") are available to
the view, and also to any partial
that gets rendered by the view, no matter how deeply-nested. This effectively
makes controller instance variables "globals". In small view hierarchies this
probably isn't an issue, but in large ones it can make debugging and
reasoning about the code very difficult.
TEXT
-
+
p <<-TEXT
Often, large Rails applications will assign many controller instance variables.
Sometimes these aren't used by a view: ApplicationController might assign
variables that are used by many, but not all, views; and various other things
may accumulate, especially if you've been using templating systems that are
-more forgiving than Erector. Erector's "needs" mechanism helps enforce
+more forgiving than Erector. Erector's "needs" mechanism helps enforce
stricter encapsulation. But if you migrate from a promiscuous Rails app
to Erector, you're stuck using
no "needs" declaration at all, because it needs to contain every assigned
variable, or Erector will raise an exception.
TEXT
-
+
p "Two widget-class-level settings can help you with these problems."
-
+
h3 "controller_assigns_propagate_to_partials"
p <<-TEXT
@@ -334,11 +334,11 @@ def content
as they must be passed everything they use and can't rely on controller
instance variables.
TEXT
-
+
# example
h3 "ignore_extra_controller_assigns"
-
+
p <<-TEXT
If you set this to true (and it's inherited through to subclasses), however,
then "needs" declarations on the widget will cause excess controller variables
@@ -348,6 +348,10 @@ def content
TEXT
end
+
+ a.add(:name => "More about Rails") do
+ p "#capture_content is now an alias for #capture, so we can call it in a Rails 3.1 app"
+ end
}
end
end
View
298 web/readme.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
@@ -227,186 +227,140 @@
</div>
<div class="promo_wrapper"> <div class="promo"><img src="images/erector-the-worlds-greatest-toy.jpg" /></div>
</div>
- <div class="main"> <div class="body"><ul>
-<li><p>
-<a href="http://erector.rubyforge.org">erector.rubyforge.org</a>
-</p>
-</li>
-<li><p>
-<a href="mailto:erector@googlegroups.com">erector@googlegroups.com</a>
-</p>
-</li>
-<li><p>
-<a
-href="http://www.pivotaltracker.com/projects/482">www.pivotaltracker.com/projects/482</a>
-</p>
-</li>
-</ul>
-<h2>DESCRIPTION</h2>
-<p>
-Erector is a Builder-like view framework, inspired by Markaby but
+ <div class="main"> <div class="body"><ul><li>
+<p><a href="http://erector.rubyforge.org">erector.rubyforge.org</a></p>
+</li><li>
+<p><a href="mailto:erector@googlegroups.com">erector@googlegroups.com</a></p>
+</li><li>
+<p><a
+href="http://www.pivotaltracker.com/projects/482">www.pivotaltracker.com/projects/482</a></p>
+</li></ul>
+
+<h2 id="label-DESCRIPTION">DESCRIPTION</h2>
+
+<p>Erector is a Builder-like view framework, inspired by Markaby but
overcoming some of its flaws. In Erector all views are objects, not
template files, which allows the full power of object-oriented programming
(inheritance, modular decomposition, encapsulation) in views. See the rdoc
for the <a href="rdoc/classes/Erector/Widget.html">Erector::Widget</a> class to learn how to make your own widgets, and
visit the project site at <a
href="http://erector.rubyforge.org">erector.rubyforge.org</a> for more
-documentation.
-</p>
-<p>
-No, seriously, we&#8217;ve got hella docs at <a
-href="http://erector.rubyforge.org">erector.rubyforge.org</a> &#8212; go
-check it out.
-</p>
-<h2>SYNOPSIS</h2>
-<pre>
- require 'erector'
-
- class Hello &lt; <a href="rdoc/classes/Erector/Widget.html">Erector::Widget</a>
- def content
- html do
- head do
- title &quot;Hello&quot;
- end
- body do
- text &quot;Hello, &quot;
- b @target, :class =&gt; 'big'
- text &quot;!&quot;
- end
- end
- end
- end
-
- Hello.new(:target =&gt; 'world').to_html
- =&gt; &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;Hello&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Hello, &lt;b class=\&quot;big\&quot;&gt;world&lt;/b&gt;!&lt;/body&gt;&lt;/html&gt;&quot;
-
- include Erector::Mixin
- erector { div &quot;love&quot;, :class =&gt; &quot;big&quot; }
- =&gt; &quot;&lt;div class=\&quot;big\&quot;&gt;love&lt;/div&gt;&quot;
+documentation.</p>
+
+<p>No, seriously, we’ve got hella docs at <a
+href="http://erector.rubyforge.org">erector.rubyforge.org</a> – go check it
+out.</p>
+
+<h2 id="label-SYNOPSIS">SYNOPSIS</h2>
+
+<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'erector'</span>
+
+<span class="ruby-keyword">class</span> <span class="ruby-constant">Hello</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">Erector</span><span class="ruby-operator">::</span><span class="ruby-constant">Widget</span>
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">content</span>
+ <span class="ruby-identifier">html</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-identifier">head</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-identifier">title</span> <span class="ruby-string">&quot;Hello&quot;</span>
+ <span class="ruby-keyword">end</span>
+ <span class="ruby-identifier">body</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-identifier">text</span> <span class="ruby-string">&quot;Hello, &quot;</span>
+ <span class="ruby-identifier">b</span> <span class="ruby-ivar">@target</span>, :<span class="ruby-keyword">class</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'big'</span>
+ <span class="ruby-identifier">text</span> <span class="ruby-string">&quot;!&quot;</span>
+ <span class="ruby-keyword">end</span>
+ <span class="ruby-keyword">end</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+
+<span class="ruby-constant">Hello</span>.<span class="ruby-identifier">new</span>(:<span class="ruby-identifier">target</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'world'</span>).<span class="ruby-identifier">to_html</span>
+=<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;Hello&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Hello, &lt;b class=\&quot;big\&quot;&gt;world&lt;/b&gt;!&lt;/body&gt;&lt;/html&gt;&quot;</span>
+
+<span class="ruby-identifier">include</span> <span class="ruby-constant">Erector</span><span class="ruby-operator">::</span><span class="ruby-constant">Mixin</span>
+<span class="ruby-identifier">erector</span> { <span class="ruby-identifier">div</span> <span class="ruby-string">&quot;love&quot;</span>, :<span class="ruby-keyword">class</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;big&quot;</span> }
+=<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;&lt;div class=\&quot;big\&quot;&gt;love&lt;/div&gt;&quot;</span>
</pre>
-<h2>REQUIREMENTS</h2>
-<p>
-The gem depends on rake and treetop, although this is just for using the
-command-line tool, so deployed applications won&#8217;t need these. The
+
+<h2 id="label-REQUIREMENTS">REQUIREMENTS</h2>
+
+<p>The gem depends on rake and treetop, although this is just for using the
+command-line tool, so deployed applications won’t need these. The
Rails-dependent code is now separated so you can use Erector cleanly in a
-non-Rails app.
-</p>
-<h2>INSTALL</h2>
-<p>
-To install as a gem:
-</p>
-<ul>
-<li><p>
-sudo gem install erector
-</p>
-</li>
-</ul>
-<p>
-Then add &#8220;require &#8216;erector&#8217;&#8221; to any files which
-need erector.
-</p>
-<p>
-To install as a Rails plugin:
-</p>
-<ul>
-<li><p>
-Copy the erector source to vendor/plugins/erector in your Rails directory.
-</p>
-</li>
-</ul>
-<p>
-When installing this way, erector is automatically available to your Rails
-code (no require directive is needed).
-</p>
-<h2>TESTS</h2>
-<p>
-Three spec rake tasks are provided: spec:core (core functionality),
+non-Rails app.</p>
+
+<h2 id="label-INSTALL">INSTALL</h2>
+
+<p>To install as a gem:</p>
+<ul><li>
+<p>sudo gem install erector</p>
+</li></ul>
+
+<p>Then add “require ‘erector’” to any files which need erector.</p>
+
+<p>To install as a Rails plugin:</p>
+<ul><li>
+<p>Copy the erector source to vendor/plugins/erector in your Rails directory.</p>
+</li></ul>
+
+<p>When installing this way, erector is automatically available to your Rails
+code (no require directive is needed).</p>
+
+<h2 id="label-TESTS">TESTS</h2>
+
+<p>Three spec rake tasks are provided: spec:core (core functionality),
spec:erect (the erector command line tool), and spec:rails (rails
-integration).
-</p>
-<p>
-&#8216;rake spec&#8217; will run the complete set of specs.
-</p>
-<h2>CREDITS:</h2>
-<p>
-Core Team:
-</p>
-<ul>
-<li><p>
-Alex Chaffee
-</p>
-</li>
-<li><p>
-Brian Takita
-</p>
-</li>
-</ul>
-<p>
-Special Thanks To:
-</p>
-<ul>
-<li><p>
-Abby (Chaffee&#8217;s muse &amp; Best friend)
-</p>
-</li>
-<li><p>
-Jim Kingdon
-</p>
-</li>
-<li><p>
-Jeff Dean
-</p>
-</li>
-<li><p>
-John Firebaugh
-</p>
-</li>
-<li><p>
-Nathan Sobo
-</p>
-</li>
-<li><p>
-Nick Kallen
-</p>
-</li>
-<li><p>
-Alon Salant
-</p>
-</li>
-<li><p>
-Andy Peterson
-</p>
-</li>
-</ul>
-<h2>LICENSE:</h2>
-<p>
-(The MIT License)
-</p>
-<p>
-Copyright &#169; 2007-2010 Pivotal Labs and the Erector Project
-</p>
-<p>
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-&#8220;Software&#8221;), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to the
-following conditions:
-</p>
-<p>
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-</p>
-<p>
-THE SOFTWARE IS PROVIDED &#8220;AS IS&#8221;, WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-USE OR OTHER DEALINGS IN THE SOFTWARE.
-</p>
+integration).</p>
+
+<p>‘rake spec’ will run the complete set of specs.</p>
+
+<h2 id="label-CREDITS%3A">CREDITS:</h2>
+
+<p>Core Team:</p>
+<ul><li>
+<p>Alex Chaffee</p>
+</li><li>
+<p>Brian Takita</p>
+</li></ul>
+
+<p>Special Thanks To:</p>
+<ul><li>
+<p>Abby (Chaffee’s muse &amp; Best friend)</p>
+</li><li>
+<p>Jim Kingdon</p>
+</li><li>
+<p>Jeff Dean</p>
+</li><li>
+<p>John Firebaugh</p>
+</li><li>
+<p>Nathan Sobo</p>
+</li><li>
+<p>Nick Kallen</p>
+</li><li>
+<p>Alon Salant</p>
+</li><li>
+<p>Andy Peterson</p>
+</li></ul>
+
+<h2 id="label-LICENSE%3A">LICENSE:</h2>
+
+<p>(The MIT License)</p>
+
+<p>Copyright © 2007-2010 Pivotal Labs and the Erector Project</p>
+
+<p>Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the “Software”),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:</p>
+
+<p>The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.</p>
+
+<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.</p>
<hr />
<p>Don't forget to read the <a href="userguide.html">User Guide</a> and <a href="faq.html">FAQ</a> and <a href="rdoc">API</a></p>
</div>
View
1,314 web/release_notes.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
@@ -227,838 +227,500 @@
</div>
<div class="promo_wrapper"> <div class="promo"><img src="images/erector-the-worlds-greatest-toy.jpg" /></div>
</div>
- <div class="main"> <div class="body"><h2>0.9.0</h2>
-<ul>
-<li><p>
-Finally merged bigfix/rails3 branch - Erector now works with either Rails 2
-or Rails 3 (or neither)
-</p>
-</li>
-<li><p>
-&#8216;scss&#8217; external type [needs tests]
-</p>
-</li>
-<li><p>
-dot-class and dot-id-bang syntax
-</p>
-</li>
-<li><p>
-expanded widget hierarchy; now XMLWidget can be used as the base for a
+ <div class="main"> <div class="body">
+<h2 id="label-0.9.0">0.9.0</h2>
+<ul><li>
+<p>Finally merged bigfix/rails3 branch - Erector now works with either Rails 2
+or Rails 3 (or neither)</p>
+</li><li>
+<p>‘scss’ external type [needs tests]</p>
+</li><li>
+<p>dot-class and dot-id-bang syntax</p>
+</li><li>
+<p>expanded widget hierarchy; now XMLWidget can be used as the base for a
non-HTML widget (for XML formats that may not want the HTML tags and
-methods)
-</p>
-</li>
-<li><p>
-&#8216;emit&#8217; method as preferred synonym for to_html (since we now
-support non-HTML widgets)
-</p>
-</li>
-<li><p>
-&#8216;tag&#8217; macro to add your own tag types (esp. to XML widgets)
-</p>
-</li>
-<li><p>
-:snake_case option to tag (if you want the method name to be nice for a
-CamelCase tag name)
-</p>
-</li>
-<li><p>
-remove dependency on rake gem
-</p>
-</li>
-<li><p>
-rename &#8216;render&#8217; method to &#8216;emit&#8217; (to reduce
-confusion with Rails&#8217; &#8220;render&#8221; methods)
-</p>
-</li>
-</ul>
-<p>
-Deprecated or Removed:
-</p>
-<ul>
-<li><p>
-text(widget) &#8212; passing a widget to the text method is now an error
-</p>
-</li>
-<li><p>
-element! &#8212; removed
-</p>
-</li>
-<li><p>
-empty_element &#8212; removed
-</p>
-</li>
-<li><p>
-all_tags &#8212; removed (perhaps to be replaced)
-</p>
-</li>
-<li><p>
-to_s &#8212; use emit or to_html instead
-</p>
-</li>
-<li><p>
-join &#8212; use the :join option instead
-</p>
-</li>
-</ul>
-<h2>0.8.3</h2>
-<ul>
-<li><p>
-Finally merged bigfix/rails3 branch - Erector now works with either Rails 2
-or Rails 3 (or neither)
-</p>
-</li>
-</ul>
-<h2>0.8.2 - 2011-02-16</h2>
-<ul>
-<li><p>
-Close tags on exception or return
-</p>
-</li>
-<li><p>
-Gem dependency cleanup
-</p>
-</li>
-<li><p>
-Bug: Dependency did not correctly work with uniq (reported by Daniel
-Barlow)
-</p>
-</li>
-</ul>
-<h2>0.8.1 - 2010-07-17</h2>
-<p>
-Bugfix release to improve Ruby 1.9 compatibility
-</p>
-<h2>0.8.0 - 2010-07-07</h2>
-<p>
-Core:
-</p>
-<ul>
-<li><p>
-deprecated to_s in favor of to_html
-</p>
-</li>
-<li><p>
-to_text does some formatting
-</p>
-</li>
-<li><p>
-barebones Sass support
-</p>
-</li>
-<li><p>
-&#8220;depends_on&#8221; is the new way to include JS and CSS files
-(replacing &#8220;external&#8221;). More flexible calling structure.
-</p>
-</li>
-<li><p>
-line wrapping via the :max_length parameter to to_html
-</p>
-</li>
-<li><p>
-line wrapping preserves leading and trailing spaces
-</p>
-</li>
-<li><p>
-jquery method takes optional first parameter (:load or :ready)
-</p>
-</li>
-<li><p>
-delegate method_missing to parent widget
-</p>
-</li>
-<li><p>
-&#8216;embed&#8217; and &#8216;param&#8217; are now self-closing tags (as
-per browser warnings)
-</p>
-</li>
-<li><p>
-Converted Widget#context to take a params hash.
-</p>
-</li>
-<li><p>
-Exposed an Output object, with rather useful #placeholder method
-</p>
-</li>
-<li><p>
-Defined Widget#output to delegate to #parent if @parent is not already set.
-</p>
-</li>
-<li><p>
-Removed :parent param for Output#initialize in favor of a block.
-</p>
-</li>
-<li><p>
-Page#extra_widgets
-</p>
-</li>
-<li><p>
-Page only emits externals from widgets that have been rendered on it
-</p>
-</li>
-<li><p>
-in-memory widget caching (still experimental)
-</p>
-</li>
-</ul>
-<p>
-Rails:
-</p>
-<ul>
-<li><p>
-Compatibility with Rails 2.3.5 HTML safety
-</p>
-</li>
-<li><p>
-Rails 2.3.8 compatibility
-</p>
-</li>
-<li><p>
-To render from a Rails context, you must now go through
-Erector::Rails.render; do not call to_s(:parent => @view) directly
-</p>
-</li>
-<li><p>
-rails_xss plugin support
-</p>
-</li>
-<li><p>
-additional render :widget options passed to to_s. This means that you can
-do:
-</p>
-<pre>
- render :widget =&gt; MyWidget, :content_method_name =&gt; :my_content
-</pre>
-</li>
-<li><p>
-Widget#h is now idempotent
-</p>
-</li>
-</ul>
-<p>
-Bugs:
-</p>
-<ul>
-<li><dl>
-<dt>bug</dt><dd><p>
-<a
-href="http://github.com/pivotal/erector/issues/#issue/5">github.com/pivotal/erector/issues/#issue/5</a>
-</p>
-</dd>
-</dl>
-</li>
-<li><dl>
-<dt>bug</dt><dd><p>
-<a
-href="http://github.com/pivotal/erector/issues/closed#issue/3">github.com/pivotal/erector/issues/closed#issue/3</a>
-</p>
-</dd>
-</dl>
-</li>
-<li><dl>
-<dt>bug</dt><dd><p>
-double-rendering
-</p>
-</dd>
-</dl>
-</li>
-</ul>
-<h2>0.7.3 - 2009-12-01</h2>
-<ul>
-<li><p>
-fix bug in pass-block-to-new inline page rendering
-</p>
-</li>
-<li><p>
-externals can accept a File (or any IO, actually)
-</p>
-</li>
-</ul>
-<p>
-Rails:
-</p>
-<pre>
- * Add Widget.controller_assigns_propagate_to_partials: lets you keep controller instance variables from propagating to partials, so that you don't have this giant &quot;global&quot; namespace that partials can pull from. Enforces encapsulation much better.
- * Add Widget.ignore_extra_controller_assigns, which allows widgets to use #needs but silently ignore excess controller variables, rather than raising an exception instead. This can be very useful for transitioning large codebases to Erector.
- * Factor out directly-delegated methods into an array; add url_for and image_path.
- * Make Erector work with the Cells plugin for Rails (http://cells.rubyforge.org/).
-</pre>
-<p>
-Erector tool:
-</p>
-<pre>
- * Make 'erector' ignore ERb trim markers (&quot;-%&gt;&quot;).
- * Make 'erector' process ERb escapes in HTML attributes correctly.
- * Make sure 'erector' adds parentheses to function calls when necessary.
- * Don't add empty strings to the end of converted attributes.
- * Don't omit empty attribute strings.
- * Allow setting an alternate superclass for the new widget coming from the 'erector' tool.
- * Add --method switch to 'erector', in case you don't want the base 'content' method overridden, but something it calls in your superclass, instead.
+methods)</p>
+</li><li>
+<p>‘emit’ method as preferred synonym for to_html (since we now support
+non-HTML widgets)</p>
+</li><li>
+<p>‘tag’ macro to add your own tag types (esp. to XML widgets)</p>
+</li><li>
+<p>:snake_case option to tag (if you want the method name to be nice for a
+CamelCase tag name)</p>
+</li><li>
+<p>remove dependency on rake gem</p>
+</li><li>
+<p>rename ‘render’ method to ‘emit’ (to reduce confusion with Rails’ “render”
+methods)</p>
+</li><li>
+<p>Add missing favicon_link_tag and crsf_meta_tags helper methods</p>
+</li><li>
+<p>Add #capture_content as an alias for #capture, so we can call it in a Rails
+3.1 app</p>
+</li></ul>
+
+<p>Deprecated or Removed:</p>
+<ul><li>
+<p>text(widget) – passing a widget to the text method is now an error</p>
+</li><li>
+<p>element! – removed</p>
+</li><li>
+<p>empty_element – removed</p>
+</li><li>
+<p>all_tags – removed (perhaps to be replaced)</p>
+</li><li>
+<p>to_s – use emit or to_html instead</p>
+</li><li>
+<p>join – use the :join option instead</p>
+</li></ul>
+
+<h2 id="label-0.8.3">0.8.3</h2>
+<ul><li>
+<p>Finally merged bigfix/rails3 branch - Erector now works with either Rails 2
+or Rails 3 (or neither)</p>
+</li></ul>
+
+<h2 id="label-0.8.2+-+2011-02-16">0.8.2 - 2011-02-16</h2>
+<ul><li>
+<p>Close tags on exception or return</p>
+</li><li>
+<p>Gem dependency cleanup</p>
+</li><li>
+<p>Bug: Dependency did not correctly work with uniq (reported by Daniel
+Barlow)</p>
+</li></ul>
+
+<h2 id="label-0.8.1+-+2010-07-17">0.8.1 - 2010-07-17</h2>
+
+<p>Bugfix release to improve Ruby 1.9 compatibility</p>
+
+<h2 id="label-0.8.0+-+2010-07-07">0.8.0 - 2010-07-07</h2>
+
+<p>Core:</p>
+<ul><li>
+<p>deprecated to_s in favor of to_html</p>
+</li><li>
+<p>to_text does some formatting</p>
+</li><li>
+<p>barebones Sass support</p>
+</li><li>
+<p>“depends_on” is the new way to include JS and CSS files (replacing
+“external”). More flexible calling structure.</p>
+</li><li>
+<p>line wrapping via the :max_length parameter to to_html</p>
+</li><li>
+<p>line wrapping preserves leading and trailing spaces</p>
+</li><li>
+<p>jquery method takes optional first parameter (:load or :ready)</p>
+</li><li>
+<p>delegate method_missing to parent widget</p>
+</li><li>
+<p>‘embed’ and ‘param’ are now self-closing tags (as per browser warnings)</p>
+</li><li>
+<p>Converted Widget#context to take a params hash.</p>
+</li><li>
+<p>Exposed an Output object, with rather useful #placeholder method</p>
+</li><li>
+<p>Defined Widget#output to delegate to #parent if @parent is not already set.</p>
+</li><li>
+<p>Removed :parent param for Output#initialize in favor of a block.</p>
+</li><li>
+<p>Page#extra_widgets</p>
+</li><li>
+<p>Page only emits externals from widgets that have been rendered on it</p>
+</li><li>
+<p>in-memory widget caching (still experimental)</p>
+</li></ul>
+
+<p>Rails:</p>
+<ul><li>
+<p>Compatibility with Rails 2.3.5 HTML safety</p>
+</li><li>
+<p>Rails 2.3.8 compatibility</p>
+</li><li>
+<p>To render from a Rails context, you must now go through
+Erector::Rails.render; do not call to_s(:parent =&gt; @view) directly</p>
+</li><li>
+<p>rails_xss plugin support</p>
+</li><li>
+<p>additional render :widget options passed to to_s. This means that you can
+do:</p>
+
+<pre class="ruby"><span class="ruby-identifier">render</span> :<span class="ruby-identifier">widget</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">MyWidget</span>, :<span class="ruby-identifier">content_method_name</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">my_content</span>
</pre>
-<h2>0.7.2 - 2009-11-16</h2>
-<ul>
-<li><p>
-Widget#url and #css accept optional extra attributes (e.g.
-&#8216;media&#8217;)
-</p>
-</li>
-<li><p>
-Externals accept optional extra attributes (e.g. &#8216;media&#8217;)
-</p>
-</li>
-<li><p>
-Page:
-</p>
-<ul>
-<li><p>
-body_attributes and html_attributes
-</p>
-</li>
-</ul>
-<ul>
-<li><p>
-allow suppressing of basic styles (right/left/clear)
-</p>
-</li>
-</ul>
-<ul>
-<li><p>
-now an InlineWidget
-</p>
-</li>
-</ul>
-</li>
-<li><p>
-erector method passes in parameters to both to_s and the widget&#8217;s
-constructor
-</p>
-</li>
-<li><p>
-Widget#dom_id method to generate a unique id
-</p>
-</li>
-<li><p>
-Widget#to_text method to strip tags
-</p>
-</li>
-<li><p>
-supports HTML5 element names
-</p>
-</li>
-<li><p>
-Widget#text! and #element! which don&#8217;t escape their parameters
-</p>
-</li>
-<li><p>
-Better Rails initialization
-</p>
-</li>
-<li><p>
-Don&#8217;t emit an attribute with an empty array of values
-</p>
-</li>
-<li><p>
-Enhanced support for comments, including IE conditional comments
-</p>
-</li>
-<li><p>
-jQuery method now compatible with jQuery.noConflict()
-</p>
-</li>
-</ul>
-<h2>0.7.1</h2>
-<ul>
-<li><p>
-externals mechanism
-</p>
-</li>
-<li><p>
-Page widget
-</p>
-</li>
-<li><p>
-FieldTable widget
-</p>
-</li>
-<li><p>
-EnvironmentBadge widget - inspired by <a
-href="http://blog.labnotes.org/2009/10/08/using-a-badge-to-distinguish-development-and-production-environments">blog.labnotes.org/2009/10/08/using-a-badge-to-distinguish-development-and-production-environments</a>
-</p>
-</li>
-<li><p>
-added &#8216;jquery&#8217; method to perform a script on $(document).ready
-</p>
-</li>
-<li><p>
-removed the &#8220;alias_method :inspect, :to_s&#8221; since it made
-debugging inside widget constructors hard, and what was it for anyway?
-</p>
-</li>
-<li><p>
-Instance variables may begin with a &#8217;@&#8217;
-</p>
-</li>
-<li><p>
-Fixed Rails integration regressions
-</p>
-</li>
-<li><p>
-Added *.ert templates (Erector Template, similar to Markaby)
-</p>
-</li>
-<li><p>
-#comment method to emit HTML comments (naturally)
-</p>
-</li>
-</ul>
-<h2>0.7.0 / 2009-09-27</h2>
-<ul>
-<li><p>
-Changed behavior of inline blocks. See Widget#new documentation.
-</p>
-</li>
-<li><p>
-Introduced &#8220;Erector::Inline&#8221; and &#8220;Erector.inline&#8221;
-so people using the old inline semantics can upgrade more easily.
-</p>
-</li>
-<li><p>
-Likewise for &#8220;Erector::InlineRailsWidget&#8221; and
-&#8220;Erector::RailsWidget.inline&#8221;.
-</p>
-</li>
-<li><p>
-Due to popular demand, parameters no longer automatically create accessor
-methods, even if you declare them with &#8216;needs&#8217;. You&#8217;ll
-have to type out &#8220;attr_accessor :underpants&#8221; yourself.
-</p>
-</li>
-</ul>
-<h2>0.6.8 / 2009-09</h2>
-<ul>
-<li><p>
-Added missing tag &#8216;embed&#8217;
-</p>
-</li>
-</ul>
-<h2>0.6.7 / 2009-06-17</h2>
-<ul>
-<li><p>
-Fixed bug where needs did not get propagated when including modules.
-</p>
-</li>
-</ul>
-<h2>0.6.6 / 2009-05-25</h2>
-<ul>
-<li><p>
-fix to_a bug that slipped in yesterday when I wasn&#8217;t looking
-</p>
-</li>
-<li><p>
-attempting to assign a local variable that overlaps with an internal one
-raises error
-</p>
-</li>
-<li><p>
-attempting to &#8216;needs&#8217; a variable that overlaps with an existing
-method raises error
-</p>
-</li>
-</ul>
-<h2>0.6.4 / 2009-05-24</h2>
-<ul>
-<li><p>
-mixin: do &#8220;include Erector::Mixin&#8221; and now &#8220;erector {
-}&#8221; will instantiate and to_html a widget for you
-</p>
-</li>
-<li><p>
-&#8220;erector&#8221; command-line tool improved:
-</p>
-<ul>
-<li><p>
-if converting an HTML/ERB file under a &#8220;views&#8221; directory, uses
-&#8220;Erector::RailsWidget&#8221; as parent class
-</p>
-</li>
-</ul>
-<ul>
-<li><p>
-no longer chokes on &#8220;if IE&#8221; directives
-</p>
-</li>
-</ul>
-<ul>
-<li><p>
-changes &#8216;yield&#8217; in a scriptlet to use a missing
-&#8220;@content_for_layout&#8220;
-</p>
-</li>
-</ul>
-<ul>
-<li><p>
-escapes single quotes inside text strings
-</p>
-</li>
-</ul>
-</li>
-<li><p>
-requires treetop 1.2.5
-</p>
-</li>
-<li><p>
-documentation overhaul, web site arguably prettier
-</p>
-</li>
-</ul>
-<h2>0.6.3 / 2009-05-06</h2>
-<ul>
-<li><p>
-Major update to API. You <b>will</b> have to change your code. There are
-deprecation warnings/errors
-</p>
-</li>
-</ul>
-<p>
-and there should be an upgrade guide up on the website soon.
-</p>
-<ul>
-<li><p>
-&#8216;render&#8217; renamed to &#8216;content&#8217;
-</p>
-</li>
-<li><p>
-widget constructor only takes one parameter, an &#8216;assigns&#8217; hash
-(plus the optional default block)
-</p>
-</li>
-<li><p>
-to render one widget from inside another, use the &#8216;widget&#8217;
-method (not &#8216;render_to&#8217;). This method
-</p>
-</li>
-</ul>
-<p>
-accepts either a widget instance, or a widget class and an assigns hash.
-</p>
-<ul>
-<li><p>
-&#8216;needs&#8217; macro to declare the variables your widget accepts via
-the &#8216;assigns&#8217; constructor parameter
-</p>
-</li>
-<li><p>
-Removed Widget#to_html caching, which fixed indentation issues.
-</p>
-</li>
-<li><p>
-BUGFIX: Indentation level is now correctly propagated to nested widgets.
-</p>
-</li>
-<li><p>
-Erector&#8217;s Rails support strategy has changed. The released version of
-Erector only supports the latest stable
-</p>
-</li>
-</ul>
-<p>
-Rails version (currently 2.3.2). If you need support for earlier versions
+</li><li>
+<p>Widget#h is now idempotent</p>
+</li></ul>
+
+<p>Bugs:</p>
+<ul><li><dl class="rdoc-list label-list"><dt>bug
+<dd>
+<p><a
+href="http://github.com/pivotal/erector/issues/#issue/5">github.com/pivotal/erector/issues/#issue/5</a></p>
+</dd></dl>
+</li><li><dl class="rdoc-list label-list"><dt>bug
+<dd>
+<p><a
+href="http://github.com/pivotal/erector/issues/closed#issue/3">github.com/pivotal/erector/issues/closed#issue/3</a></p>
+</dd></dl>
+</li><li><dl class="rdoc-list label-list"><dt>bug
+<dd>
+<p>double-rendering</p>
+</dd></dl>
+</li></ul>
+
+<h2 id="label-0.7.3+-+2009-12-01">0.7.3 - 2009-12-01</h2>
+<ul><li>
+<p>fix bug in pass-block-to-new inline page rendering</p>
+</li><li>
+<p>externals can accept a File (or any IO, actually)</p>
+</li></ul>
+
+<p>Rails:</p>
+
+<pre>* Add Widget.controller_assigns_propagate_to_partials: lets you keep controller instance variables from propagating to partials, so that you don't have this giant &quot;global&quot; namespace that partials can pull from. Enforces encapsulation much better.
+* Add Widget.ignore_extra_controller_assigns, which allows widgets to use #needs but silently ignore excess controller variables, rather than raising an exception instead. This can be very useful for transitioning large codebases to Erector.
+* Factor out directly-delegated methods into an array; add url_for and image_path.
+* Make Erector work with the Cells plugin for Rails (http://cells.rubyforge.org/).</pre>
+
+<p>Erector tool:</p>
+
+<pre>* Make 'erector' ignore ERb trim markers (&quot;-%&gt;&quot;).
+* Make 'erector' process ERb escapes in HTML attributes correctly.
+* Make sure 'erector' adds parentheses to function calls when necessary.
+* Don't add empty strings to the end of converted attributes.
+* Don't omit empty attribute strings.
+* Allow setting an alternate superclass for the new widget coming from the 'erector' tool.
+* Add --method switch to 'erector', in case you don't want the base 'content' method overridden, but something it calls in your superclass, instead.</pre>
+
+<h2 id="label-0.7.2+-+2009-11-16">0.7.2 - 2009-11-16</h2>
+<ul><li>
+<p>Widget#url and #css accept optional extra attributes (e.g. ‘media’)</p>
+</li><li>
+<p>Externals accept optional extra attributes (e.g. ‘media’)</p>
+</li><li>
+<p>Page:</p>
+<ul><li>
+<p>body_attributes and html_attributes</p>
+</li><li>
+<p>allow suppressing of basic styles (right/left/clear)</p>
+</li><li>
+<p>now an InlineWidget</p>
+</li></ul>
+</li><li>
+<p>erector method passes in parameters to both to_s and the widget’s
+constructor</p>
+</li><li>
+<p>Widget#dom_id method to generate a unique id</p>
+</li><li>
+<p>Widget#to_text method to strip tags</p>
+</li><li>
+<p>supports HTML5 element names</p>
+</li><li>
+<p>Widget#text! and #element! which don’t escape their parameters</p>
+</li><li>
+<p>Better Rails initialization</p>
+</li><li>
+<p>Don’t emit an attribute with an empty array of values</p>
+</li><li>
+<p>Enhanced support for comments, including IE conditional comments</p>
+</li><li>
+<p>jQuery method now compatible with jQuery.noConflict()</p>
+</li></ul>
+
+<h2 id="label-0.7.1">0.7.1</h2>
+<ul><li>
+<p>externals mechanism</p>
+</li><li>
+<p>Page widget</p>
+</li><li>
+<p>FieldTable widget</p>
+</li><li>
+<p>EnvironmentBadge widget - inspired by <a
+href="http://blog.labnotes.org/2009/10/08/using-a-badge-to-distinguish-development-and-production-environments">blog.labnotes.org/2009/10/08/using-a-badge-to-distinguish-development-and-production-environments</a></p>
+</li><li>
+<p>added ‘jquery’ method to perform a script on $(document).ready</p>
+</li><li>
+<p>removed the “alias_method :inspect, :to_s” since it made debugging inside
+widget constructors hard, and what was it for anyway?</p>
+</li><li>
+<p>Instance variables may begin with a ‘@’</p>
+</li><li>
+<p>Fixed Rails integration regressions</p>
+</li><li>
+<p>Added *.ert templates (Erector Template, similar to Markaby)</p>
+</li><li>
+<p>#comment method to emit HTML comments (naturally)</p>
+</li></ul>
+
+<h2 id="label-0.7.0+%2F+2009-09-27">0.7.0 / 2009-09-27</h2>
+<ul><li>
+<p>Changed behavior of inline blocks. See Widget#new documentation.</p>
+</li><li>
+<p>Introduced “Erector::Inline” and “Erector.inline” so people using the old
+inline semantics can upgrade more easily.</p>
+</li><li>
+<p>Likewise for “Erector::InlineRailsWidget” and
+“Erector::RailsWidget.inline”.</p>
+</li><li>
+<p>Due to popular demand, parameters no longer automatically create accessor
+methods, even if you declare them with ‘needs’. You’ll have to type out
+“attr_accessor :underpants” yourself.</p>
+</li></ul>
+
+<h2 id="label-0.6.8+%2F+2009-09">0.6.8 / 2009-09</h2>
+<ul><li>
+<p>Added missing tag ‘embed’</p>
+</li></ul>
+
+<h2 id="label-0.6.7+%2F+2009-06-17">0.6.7 / 2009-06-17</h2>
+<ul><li>
+<p>Fixed bug where needs did not get propagated when including modules.</p>
+</li></ul>
+
+<h2 id="label-0.6.6+%2F+2009-05-25">0.6.6 / 2009-05-25</h2>
+<ul><li>
+<p>fix to_a bug that slipped in yesterday when I wasn’t looking</p>
+</li><li>
+<p>attempting to assign a local variable that overlaps with an internal one
+raises error</p>
+</li><li>
+<p>attempting to ‘needs’ a variable that overlaps with an existing method
+raises error</p>
+</li></ul>
+
+<h2 id="label-0.6.4+%2F+2009-05-24">0.6.4 / 2009-05-24</h2>
+<ul><li>
+<p>mixin: do “include Erector::Mixin” and now “erector { }” will instantiate
+and to_html a widget for you</p>
+</li><li>
+<p>“erector” command-line tool improved:</p>
+<ul><li>
+<p>if converting an HTML/ERB file under a “views” directory, uses
+“Erector::RailsWidget” as parent class</p>
+</li><li>
+<p>no longer chokes on “if IE” directives</p>
+</li><li>
+<p>changes ‘yield’ in a scriptlet to use a missing “@content_for_layout”</p>
+</li><li>
+<p>escapes single quotes inside text strings</p>
+</li></ul>
+</li><li>
+<p>requires treetop 1.2.5</p>
+</li><li>
+<p>documentation overhaul, web site arguably prettier</p>
+</li></ul>
+
+<h2 id="label-0.6.3+%2F+2009-05-06">0.6.3 / 2009-05-06</h2>
+<ul><li>
+<p>Major update to API. You <strong>will</strong> have to change your code.
+There are deprecation warnings/errors</p>
+</li></ul>
+
+<p>and there should be an upgrade guide up on the website soon.</p>
+<ul><li>
+<p>‘render’ renamed to ‘content’</p>
+</li><li>
+<p>widget constructor only takes one parameter, an ‘assigns’ hash (plus the
+optional default block)</p>
+</li><li>
+<p>to render one widget from inside another, use the ‘widget’ method (not
+‘render_to’). This method</p>
+</li></ul>
+
+<p>accepts either a widget instance, or a widget class and an assigns hash.</p>
+<ul><li>
+<p>‘needs’ macro to declare the variables your widget accepts via the
+‘assigns’ constructor parameter</p>
+</li><li>
+<p>Removed Widget#to_html caching, which fixed indentation issues.</p>
+</li><li>
+<p>BUGFIX: Indentation level is now correctly propagated to nested widgets.</p>
+</li><li>
+<p>Erector’s Rails support strategy has changed. The released version of
+Erector only supports the latest stable</p>
+</li></ul>
+
+<p>Rails version (currently 2.3.2). If you need support for earlier versions
of Rails, there are separate Git branches for each one, but we will not be
in the habit of keeping these up to date with the latest features and
-patches.
-</p>
-<ul>
-<li><p>
-Renamed the command line tool to &#8216;erector&#8217;
-</p>
-</li>
-</ul>
-<h2>0.5.1</h2>
-<ul>
-<li><p>
-Added methods to easily render additional HTML elements (col, object, and
+patches.</p>
+<ul><li>
+<p>Renamed the command line tool to ‘erector’</p>
+</li></ul>
+
+<h2 id="label-0.5.1">0.5.1</h2>
+<ul><li>
+<p>Added methods to easily render additional HTML elements (col, object, and
about a dozen others). There are now methods for all non-deprecated
-elements from the HTML 4.0.1 spec. As before, if erector doesn&#8217;t
-have a method built-in, you can still call the element or empty_element
-method to output any tag.
-</p>
-</li>
-<li><p>
-The method instruct!, which was a deprecated synonym for instruct, has been
-removed.
-</p>
-</li>
-<li><p>
-Fixed bug in resolving view files for pluralized controllers
-</p>
-</li>
-</ul>
-<h3>0.5.0 / 2008-12-13</h3>
-<ul>
-<li><p>
-install_dependencies refreshes the rails_versions directory
-</p>
-</li>
-<li><p>
-Widget takes a string instead of an IO object to be more compatible with
-Rails.
-</p>
-</li>
-<li><p>
-Removed Doc
-</p>
-</li>
-<li><p>
-Widget writes directly to output string instead of to #doc
-</p>
-</li>
-</ul>
-<h3>0.4.200 / 2008-10-11</h3>
-<ul>
-<li><p>
-Erector can now pretty-print the generated HTML to make it easier to read.
-</p>
-</li>
-<li><p>
-Add join method to Erector::Widget.
-</p>
-</li>
-</ul>
-<h3>0.4.191 / 2008-07-29</h3>
-<ul>
-<li><p>
-Renamed HtmlParts to Doc
-</p>
-</li>
-<li><p>
-Widget#doc is now a HtmlParts which proxies to the passed in IO stream
-</p>
-</li>
-<li><p>
-Better compatibility with standard Rails rendering because
+elements from the HTML 4.0.1 spec. As before, if erector doesn’t have a
+method built-in, you can still call the element or empty_element method to
+output any tag.</p>
+</li><li>
+<p>The method instruct!, which was a deprecated synonym for instruct, has been
+removed.</p>
+</li><li>
+<p>Fixed bug in resolving view files for pluralized controllers</p>
+</li></ul>
+
+<h3 id="label-0.5.0+%2F+2008-12-13">0.5.0 / 2008-12-13</h3>
+<ul><li>
+<p>install_dependencies refreshes the rails_versions directory</p>
+</li><li>
+<p>Widget takes a string instead of an IO object to be more compatible with
+Rails.</p>
+</li><li>
+<p>Removed Doc</p>
+</li><li>
+<p>Widget writes directly to output string instead of to #doc</p>
+</li></ul>
+
+<h3 id="label-0.4.200+%2F+2008-10-11">0.4.200 / 2008-10-11</h3>
+<ul><li>
+<p>Erector can now pretty-print the generated HTML to make it easier to read.</p>
+</li><li>
+<p>Add join method to Erector::Widget.</p>
+</li></ul>
+
+<h3 id="label-0.4.191+%2F+2008-07-29">0.4.191 / 2008-07-29</h3>
+<ul><li>
+<p>Renamed HtmlParts to Doc</p>
+</li><li>
+<p>Widget#doc is now a HtmlParts which proxies to the passed in IO stream</p>
+</li><li>
+<p>Better compatibility with standard Rails rendering because
ActionController::Base#render and #render_widget now have the Widget write
-directly to _erbout.
-</p>
-</li>
-<li><p>
-ActionView::Base objects run with Erector now receive all of the instance
-variables
-</p>
-</li>
-<li><p>
-Erector works with erb layouts
-</p>
-</li>
-<li><p>
-Deprecate fake_erbout
-</p>
-</li>
-<li><p>
-Better handling for file with .html.rb extension.
-</p>
-</li>
-<li><p>
-Fix overwriting issue when using Rails helpers
-</p>
-</li>
-<li><p>
-New method Widget#character
-</p>
-</li>
-<li><p>
-Widget#nbsp without arguments now outputs a single non-breaking space.
-</p>
-</li>
-</ul>
-<h3>0.3.110 / 2008-05-29</h3>
-<ul>
-<li><p>
-support capture from rails helpers, allowing form_for/form_tag to work
-right
-</p>
-</li>
-<li><p>
-fix bug in view_paths support (finding views was hosed)
-</p>
-</li>
-</ul>
-<h3>0.3.105 / 2008-05-29</h3>
-<ul>
-<li><p>
-Lots of changes to support Rails integration better.
-</p>
-</li>
-<li><p>
-Add partial support for render :partial.
-</p>
-</li>
-<li><p>
-More Rails helpers proxies added to helpers.rb.
-</p>
-</li>
-<li><p>
-Fake erbouts can now nest, allowing better support for Rails helpers like
-form_for (though they&#8217;re currently capped at 10 deep to head off
-infinite regress).
-</p>
-</li>
-<li><p>
-Rails finds both .rb and .html.rb files inside the app/views directories.
-</p>
-</li>
-<li><p>
-Use Rails view_paths instead of hardcoded RAILS_ROOT/app/views (patch by
-Rami Grossman)
-</p>
-</li>
-<li><p>
-add &#8216;url&#8217; and &#8216;css&#8217; convenience methods to Widget
-</p>
-</li>
-</ul>
-<h3>0.2.83 / 2008-04-23</h3>
-<ul>
-<li><p>
-&#8220;erect&#8221; supports command-line options
-</p>
-</li>
-<li><p>
-&#8220;erect&#8221; now works backwards &#8212; you can output static html
-from a widget.rb file
-</p>
-</li>
-<li><p>
-The web site is generated from erector classes (still pretty minimal
-though)
-</p>
-</li>
-</ul>
-<h3>0.2.61 / 2008-04-18</h3>
-<ul>
-<li><p>
-Improvements to &#8220;erect&#8220;
-</p>
-<ul>
-<li><p>
-works on HTML attributes (including namespaced attributes and hyphenated
-attributes)
-</p>
-</li>
-</ul>
-<ul>
-<li><p>
-works on directories (recursively looking for .html and .html.erb and
-.rhtml files)
-</p>
-</li>
-</ul>
-<ul>
-<li><p>
-converts DOCTYPE nodes
-</p>
-</li>
-</ul>
-<ul>
-<li><p>
-deals with HTML entities inside text and attributes
-</p>
-</li>
-</ul>
-</li>
-</ul>
-<h3>0.2.54 / 2008-04-15</h3>
-<ul>
-<li><p>
-New script &#8220;erect&#8221; to convert (some) .html.erb files into
-erector classes.
-</p>
-</li>
-</ul>
-<h3>0.2.42 / 2008-04-11</h3>
-<ul>
-<li><p>
-Rails Controller now can render Erector widgets using #render
-</p>
-</li>
-<li><p>
-Erector views can live inside Rails &#8220;app/views&#8221; directory, just
-like other views
-</p>
-</li>
-</ul>
-<h3>0.1.25 / 2008-02-26</h3>
-<ul>
-<li><p>
-nbsp method
-</p>
-</li>
-<li><p>
-:class => [&#8216;one&#8217;, &#8216;two&#8217;] (that is, passing an
-array rather than a string)
-</p>
-</li>
-</ul>
-<p>
-&#8230; perhaps one or two I forgot.
-</p>
-<ul>
-<li><p>
-rename tag to element
-</p>
-</li>
-<li><p>
-add empty_element feature
-</p>
-</li>
-<li><p>
-for the built-in HTML tags, knows which ones should be empty and which
-shouldn&#8217;t be. For example, generates `<input />` rather than
-`<input></input>`
-</p>
-</li>
-<li><p>
-text and attributes are quoted by default; call raw to avoid this
-</p>
-</li>
-<li><p>
-h is rarely necessary now, but it returns a string rather than appending to
-the buffer
-</p>
-</li>
-<li><p>
-nbsp method turns spaces into non-breaking spaces
-</p>
-</li>
-<li><p>
-sending in an array for attribute values (typically CSS classes)
-concatenates them separated by spaces
-</p>
-</li>
-<li><p>
-The column definition name can be a Proc that gets executed.
-</p>
-</li>
-<li><p>
-Renamed instruct! to instruct (old one remains as a deprecated method for
+directly to _erbout.</p>
+</li><li>
+<p>ActionView::Base objects run with Erector now receive all of the instance
+variables</p>
+</li><li>
+<p>Erector works with erb layouts</p>
+</li><li>
+<p>Deprecate fake_erbout</p>
+</li><li>
+<p>Better handling for file with .html.rb extension.</p>
+</li><li>
+<p>Fix overwriting issue when using Rails helpers</p>
+</li><li>
+<p>New method Widget#character</p>
+</li><li>
+<p>Widget#nbsp without arguments now outputs a single non-breaking space.</p>
+</li></ul>
+
+<h3 id="label-0.3.110+%2F+2008-05-29">0.3.110 / 2008-05-29</h3>
+<ul><li>
+<p>support capture from rails helpers, allowing form_for/form_tag to work
+right</p>
+</li><li>
+<p>fix bug in view_paths support (finding views was hosed)</p>
+</li></ul>
+
+<h3 id="label-0.3.105+%2F+2008-05-29">0.3.105 / 2008-05-29</h3>
+<ul><li>
+<p>Lots of changes to support Rails integration better.</p>
+</li><li>
+<p>Add partial support for render :partial.</p>
+</li><li>
+<p>More Rails helpers proxies added to helpers.rb.</p>
+</li><li>
+<p>Fake erbouts can now nest, allowing better support for Rails helpers like
+form_for (though they’re currently capped at 10 deep to head off infinite
+regress).</p>
+</li><li>
+<p>Rails finds both .rb and .html.rb files inside the app/views directories.</p>
+</li><li>
+<p>Use Rails view_paths instead of hardcoded RAILS_ROOT/app/views (patch by
+Rami Grossman)</p>
+</li><li>
+<p>add ‘url’ and ‘css’ convenience methods to Widget</p>
+</li></ul>
+
+<h3 id="label-0.2.83+%2F+2008-04-23">0.2.83 / 2008-04-23</h3>
+<ul><li>
+<p>“erect” supports command-line options</p>
+</li><li>
+<p>“erect” now works backwards – you can output static html from a widget.rb
+file</p>
+</li><li>
+<p>The web site is generated from erector classes (still pretty minimal
+though)</p>
+</li></ul>
+
+<h3 id="label-0.2.61+%2F+2008-04-18">0.2.61 / 2008-04-18</h3>
+<ul><li>
+<p>Improvements to “erect”</p>
+<ul><li>
+<p>works on HTML attributes (including namespaced attributes and hyphenated
+attributes)</p>
+</li><li>
+<p>works on directories (recursively looking for .html and .html.erb and
+.rhtml files)</p>
+</li><li>
+<p>converts DOCTYPE nodes</p>
+</li><li>
+<p>deals with HTML entities inside text and attributes</p>
+</li></ul>
+</li></ul>
+
+<h3 id="label-0.2.54+%2F+2008-04-15">0.2.54 / 2008-04-15</h3>
+<ul><li>
+<p>New script “erect” to convert (some) .html.erb files into erector classes.</p>
+</li></ul>
+
+<h3 id="label-0.2.42+%2F+2008-04-11">0.2.42 / 2008-04-11</h3>
+<ul><li>
+<p>Rails Controller now can render Erector widgets using #render</p>
+</li><li>
+<p>Erector views can live inside Rails “app/views” directory, just like other
+views</p>
+</li></ul>
+
+<h3 id="label-0.1.25+%2F+2008-02-26">0.1.25 / 2008-02-26</h3>
+<ul><li>
+<p>nbsp method</p>
+</li><li>
+<p>:class =&gt; [‘one’, ‘two’] (that is, passing an array rather than a
+string)</p>
+</li></ul>
+
+<p>… perhaps one or two I forgot.</p>
+<ul><li>
+<p>rename tag to element</p>
+</li><li>
+<p>add empty_element feature</p>
+</li><li>
+<p>for the built-in HTML tags, knows which ones should be empty and which
+shouldn’t be. For example, generates `&lt;input /&gt;` rather than
+`&lt;input&gt;&lt;/input&gt;`</p>
+</li><li>
+<p>text and attributes are quoted by default; call raw to avoid this</p>
+</li><li>
+<p>h is rarely necessary now, but it returns a string rather than appending to
+the buffer</p>
+</li><li>
+<p>nbsp method turns spaces into non-breaking spaces</p>
+</li><li>
+<p>sending in an array for attribute values (typically CSS classes)
+concatenates them separated by spaces</p>
+</li><li>
+<p>The column definition name can be a Proc that gets executed.</p>
+</li><li>
+<p>Renamed instruct! to instruct (old one remains as a deprecated method for
now), as it is no more side-effecting (or dangerous or whatever) than any
-other method in Widget.
-</p>
-</li>
-</ul>
-<h3>0.1.0 / 2008-02-13</h3>
-<ul>
-<li><p>
-First public release
-</p>
-</li>
-</ul>
-<h3>0.0.1</h3>
-<ul>
-<li><p>
-Was on pivotalrb.rubyforge.org
-</p>
-</li>
-</ul>
+other method in Widget.</p>
+</li></ul>
+
+<h3 id="label-0.1.0+%2F+2008-02-13">0.1.0 / 2008-02-13</h3>
+<ul><li>
+<p>First public release</p>
+</li></ul>
+
+<h3 id="label-0.0.1">0.0.1</h3>
+<ul><li>
+<p>Was on pivotalrb.rubyforge.org</p>
+</li></ul>
</div>
<div class="footer"><a href="http://www.pivotallabs.com"><img alt="Pivotal Labs" height="57" src="pivotal.gif" style="float:right; padding: 8px;" width="158" /></a>
<center>Erector is an open source project released under the MIT license.<br />
View
2  web/userguide.html
@@ -47,7 +47,7 @@
border: 1px solid gray;
padding: .5em 1em;
overflow: auto;
- font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
+ font-family: Inconsolata, Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; }
pre.sh_html {
background-color: #FFFADE; }
Please sign in to comment.
Something went wrong with that request. Please try again.