<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>Project Sprouts</title>
  <link href="http://projectsprouts.org/atom.xml" rel="self"/>
  <link href="http://projectsprouts.org/"/>
  <updated>2011-01-22T13:39:14-08:00</updated>
  <id>http://projectsprouts.org/</id>
  <author>
    <name>Project Sprouts</name>
    <email>projectsprouts@googlegroups.com</email>
  </author>

  
  <entry>
    <title>Ruby for ActionScripters</title>
    <link href="http://projectsprouts.org/2011/01/20/ruby-for-actionscripters.html"/>
    <updated>2011-01-20T00:00:00-08:00</updated>
    <id>http://projectsprouts.org/2011/01/20/ruby-for-actionscripters</id>
    <content type="html">&lt;h1&gt;Ruby for ActionScripters&lt;/h1&gt;
&lt;p&gt;20 Jan 2011 &amp;#8211; Luke Bayes&lt;/p&gt;
&lt;div id=&quot;quotes&quot;&gt;
  &lt;blockquote&gt;Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.&lt;/blockquote&gt;
  &lt;div class=&quot;attribution&quot;&gt; &lt;a href=&quot;http://ruby-lang.org&quot;&gt;Ruby Website&lt;/a&gt; &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This means that Ruby has opinions, and many of Ruby&amp;#8217;s opinions are exactly inverted from what you may have grown to love in ActionScript. There was a time when this made me uncomfortable, and I&amp;#8217;m sure it will make some of you uncomfortable too. Well, not &lt;em&gt;you&lt;/em&gt; of course, but maybe someone you know&amp;#8230;&lt;/p&gt;
&lt;p&gt;The intention of this article, is to provide a brief introduction to Ruby for developers that are already familiar with ActionScript 3.0. It is not my intention to provide comprehensive coverage of the Ruby language here. For a much more well-written and far more comprehensive explanation of Ruby, please take the time to read &lt;a target=&quot;_blank&quot; href=&quot;http://mislav.uniqpath.com/poignant-guide/&quot;&gt;Why&amp;#8217;s Poignant Guide to Ruby&lt;/a&gt;, quite possibly the most entertaining and well-written computer book in history.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;attribution&quot;&gt;&lt;br /&gt;
&lt;image class=&quot;bordered&quot; src=&quot;/images/2895452690_911065b1f3_z.jpg&quot; title=&quot;Ruby Pomegranate Seeds&quot; /&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.flickr.com/photos/greencolander/2895452690&quot;&gt;Ruby Pomegranate Seeds&lt;/a&gt; courtesy of &lt;a href=&quot;http://www.flickr.com/photos/greencolander/&quot;&gt;Greencolander&lt;/a&gt; and the &lt;a href=&quot;http://creativecommons.org/licenses/by/2.0/&quot;&gt;Creative Commons&lt;/a&gt; license.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;Quack like a what?&lt;/h1&gt;
&lt;p&gt;Ruby is a dynamic language, which means that a variable can be any concrete data type. The important thing is that an object define the methods and attributes that its clients attempt to access. This paradigm is often referred to as &lt;a target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Duck_typing&quot;&gt;Duck Typing&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Trying Ruby&lt;/h2&gt;
&lt;p&gt;If you have &lt;a target=&quot;_blank&quot; href=&quot;http://www.ruby-lang.org/en/downloads/&quot;&gt;installed Ruby&lt;/a&gt; (Preferably with &lt;a target=&quot;_blank&quot; href=&quot;http://rvm.beginrescueend.com/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;RVM&lt;/span&gt;&lt;/a&gt; or &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/vertiginous/pik&quot;&gt;something similar&lt;/a&gt;), you can kick off a &lt;a target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Read-eval-print_loop&quot;&gt;Read Eval Print Loop (&lt;span class=&quot;caps&quot;&gt;REPL&lt;/span&gt;)&lt;/a&gt; by typing:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;irb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;&lt;em&gt;(Type &amp;#8216;quit&amp;#8217; and hit enter to leave the &lt;span class=&quot;caps&quot;&gt;REPL&lt;/span&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;puts&lt;/code&gt; method will send a String value to stdout and you can think of this like ActionScript&amp;#8217;s &lt;code&gt;trace&lt;/code&gt; method.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Hello World&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Try running irb and then &lt;code&gt;puts&lt;/code&gt; some messages now.&lt;/p&gt;
&lt;p&gt;When using irb, you can do the following to try out Sprout features.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;rubygems&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;sprout&amp;#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Output the methods on Sprout (minus the detritus from Object):&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Sprout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;methods&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;methods&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Output Sprout.home&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Sprout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;home&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Sprout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cache&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h2&gt;Strings&lt;/h2&gt;
&lt;p&gt;There are a handful of different ways to declare Strings in Ruby, but the main thing I&amp;#8217;d like to highlight here is the difference between single quotes and double quotes.&lt;/p&gt;
&lt;p&gt;A String that is defined within single quotes will contain literally whatever is defined within the quotes. This means that backslashes will not be rendered as escape sequences, they will just be backslash characters. There is no way to insert expressions in between single quotes, so if you want to assemble a string with single quotes, this is done by concatenating different strings together.&lt;/p&gt;
&lt;p&gt;Single quoted strings are usually preferred as they cost less in terms of work. I usually use single quotes wherever I don&amp;#8217;t need an evaluated expression or escape sequence, but for the benefit of people that don&amp;#8217;t know about these differences, I do try to use double quotes in generated Rake files wherever someone might try an expression (like in task names).&lt;/p&gt;
&lt;p&gt;A String that is defined within double quotes will be interpreted for embedded Ruby expressions and escape sequences will be resolved so that they are replaced with the character literal that they represent.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;suffix&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;World!&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Hello &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;suffix&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;If you&amp;#8217;re thinking in ActionScript, you&amp;#8217;ll probably be tempted to concatenate Strings with expressions like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;aaa&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;bbb&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;a: &amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39; b: &amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;While this will usually work, it will explode if the expression values are nil. The preferred way to assemble Strings and expression values (especially for debugging), is to use double quotes and Ruby expression syntax like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;aaa&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;bbb&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;a: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; b: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This will call &lt;code&gt;to_s&lt;/code&gt; on provided expressions and insert an empty String for values that are nil.&lt;/p&gt;
&lt;h2&gt;Symbols&lt;/h2&gt;
&lt;p&gt;Ruby has an interesting primitive called a &lt;code&gt;Symbol&lt;/code&gt;. Symbols are not Strings, but are often used in places where a String might also suffice. There are some differences between Symbols and Strings and the first one is that Symbols are more memory efficient than Strings.&lt;/p&gt;
&lt;p&gt;A Symbol is defined (or referenced) in Ruby with a leading colon as follows:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:beaker&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;A good rule of thumb that Jim Weirich shared and that I agree with, is as follows:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;If the contents (i.e. the sequence of characters) of the object is important, use a String.&lt;/li&gt;
	&lt;li&gt;If the identity of the object is important, use a Symbol.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The idea here, is that if you&amp;#8217;re just trying to give a meaningful name to a pointer (as in Hash keys, or referring to methods by name), then Symbols are probably appropriate. If the value is what&amp;#8217;s important, Strings might make more sense.&lt;/p&gt;
&lt;p&gt;You can transform a String to a Symbol with the &lt;code&gt;to_sym&lt;/code&gt; method, and you can transform a Symbol to a String with the &lt;code&gt;to_s&lt;/code&gt; method. Outside of a Rails application Strings are not considered equal to Symbols that look similar.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;ss&quot;&gt;:beaker&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;beaker&amp;#39;&lt;/span&gt;        &lt;span class=&quot;c1&quot;&gt;# false&lt;/span&gt;
&lt;span class=&quot;ss&quot;&gt;:beaker&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;beaker&amp;#39;&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# true&lt;/span&gt;
&lt;span class=&quot;ss&quot;&gt;:beaker&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;beaker&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sym&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Symbols are a tricky part of Ruby and it&amp;#8217;s important when working with Rake files to understand when a Symbol is appropriate and when it is not.&lt;/p&gt;
&lt;p&gt;In Rake, a Symbol is often used for a Rake task name, &lt;em&gt;unless&lt;/em&gt; that task refers to a file, then a String must be used. This is because Symbols cannot include slashes, dots or other important components of a File name.&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; target=&quot;http://glu.ttono.us/articles/2005/08/19/understanding-ruby-symbols&quot;&gt;More information on Symbols&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Parentheses&lt;/h2&gt;
&lt;p&gt;The parentheses that surround parameters in a Ruby method declaration (and method calls) are &lt;em&gt;optional&lt;/em&gt;, and by convention, are only used when critical for proper execution, or to improve legibility for nested expressions. As with most things &lt;em&gt;stylish&lt;/em&gt; there is &lt;a target=&quot;_blank&quot; href=&quot;http://stackoverflow.com/questions/340624/do-you-leave-parentheses-in-or-out-in-ruby&quot;&gt;little consensus&lt;/a&gt; on when to use or omit parentheses in Ruby.&lt;/p&gt;
&lt;p&gt;Making parentheses optional does take some time to get used to, but eventually it leads to improved readability, especially in environments like Rake files.&lt;/p&gt;
&lt;p&gt;Following are some examples to help you understand this issue.&lt;/p&gt;
&lt;p&gt;This method in ActionScript:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kr&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;foo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;trace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;a: &amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot; b: &amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Could be defined like this in Ruby:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;a &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;, b &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;But may also be written like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;foo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;a &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;, b &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Additionally, to call that method in ActionScript you might:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;foo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;bar&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;baz&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;But in Ruby:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;bar&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;baz&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Of course, the following is also valid Ruby:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;foo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;bar&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;baz&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You may be wondering, &amp;#8220;When &lt;em&gt;should&lt;/em&gt; I add the parens?&amp;#8221; at this point. Here is a reasonable example of an expression that probably should get parentheses:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;foo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;bar&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;baz&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This expression is calling the imaginary &lt;code&gt;foo&lt;/code&gt; method, sending it two arguments, &lt;code&gt;bar&lt;/code&gt; and &lt;code&gt;baz&lt;/code&gt;, then it&amp;#8217;s sending the return value of that method call to the &lt;code&gt;assert&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Even though the interpreter can figure out what&amp;#8217;s going on without them, it&amp;#8217;s arguably more readable to parenthesize nested expressions.&lt;/p&gt;
&lt;h2&gt;Return values&lt;/h2&gt;
&lt;p&gt;You should also know that Ruby methods always return a value, whether you use the &lt;code&gt;return&lt;/code&gt; keyword or not. The last expression that is evaluated within a Ruby method is what is returned. This can of course, be nil.&lt;/p&gt;
&lt;h2&gt;Hash Rockets&lt;/h2&gt;
&lt;p&gt;Ruby Hashes are historically delimited by a &amp;#8220;Hash Rocket&amp;#8221;, this is an equal sign, followed by a greater than sign, like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;To show what I mean, the following ActionScript Hash:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;hash&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Object&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;c&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Could be written in Ruby like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;hash&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;c&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Even though the Hash Rocket is &lt;a target=&quot;_blank&quot; href=&quot;http://blog.peepcode.com/tutorials/2011/rip-ruby-hash-rocket-syntax&quot;&gt;no longer required&lt;/a&gt; in Ruby 1.9.x, Sprouts is still using it for the time being. We&amp;#8217;ll likely update to the new (more &lt;span class=&quot;caps&quot;&gt;ECMA&lt;/span&gt;-like) syntax at some point in the future, but while we generally work in legacy versions of Ruby, there&amp;#8217;s no good reason to actively break backwards compatibility.&lt;/p&gt;
&lt;h2&gt;Hash Brackets&lt;/h2&gt;
&lt;p&gt;You should also note that, like parentheses on methods, curly brackets around Hashes are optional, so the previous Hash may also be declared like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;hash&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:b&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;c&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Notice how the Ruby Hash prefixes the Hash keys with a colon. This indicates that we&amp;#8217;re using Symbols as keys.&lt;/p&gt;
&lt;h2&gt;Rake&lt;/h2&gt;
&lt;p&gt;I believe that Rake (and how Sprouts uses) it is a large enough topic for it&amp;#8217;s own post, but while we&amp;#8217;re talking about duck typing, Strings, Symbols and Hashes, I really want to highlight how these syntactic concepts are exploited in Rake.&lt;/p&gt;
&lt;p&gt;A simple, named Rake task:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Note the Symbol name:&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:my_task&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# Do some work here.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;A simple, &lt;em&gt;file&lt;/em&gt; Rake task:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Note the single quotes:&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;SomeProject&amp;#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Note the double-quotes and expression:&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;bin/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Runner.swf&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# Create the file here.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;A simple, named Rake task that depends on another:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Note the hash with a single Symbol key&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# and Symbol value:&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:my_task&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:other_task&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# Do some work here.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;A simple, named Rake task that depends on multiple other tasks:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Not the hash with a single Symbol key,&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# and Array of Symbol values:&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:my_task&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:other_task_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:other_task_two&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# Do some work here.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;When referring to Rake tasks by name, it&amp;#8217;s generally a good idea to use Symbols for tasks that were defined with Symbols and Strings for tasks that were defined as such.&lt;/p&gt;
&lt;p&gt;For more detailed (and well-written) information, be sure to read Martin Fowler&amp;#8217;s &lt;a target=&quot;_blank&quot; href=&quot;http://martinfowler.com/articles/rake.html&quot;&gt;seminal post&lt;/a&gt; on Rake.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;That&amp;#8217;s probably enough Ruby to get you through reading and editing a Rake file. I sincerely hope you find yourself intrigued by this language and, like me, get drawn into a new way of considering programming problems.&lt;/p&gt;
&lt;p&gt;If you find anything here in error, &lt;a target=&quot;_blank&quot; href=&quot;http://groups.google.com/group/projectsprouts&quot;&gt;please let us know&lt;/a&gt;, or better yet &amp;#8211; &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/project-sprouts/blob/gh-pages/_source/_posts&quot;&gt;fork&lt;/a&gt;, fix and send a pull request.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <title>Using the Flex DeBugger (FDB)</title>
    <link href="http://projectsprouts.org/2011/01/19/using-fdb.html"/>
    <updated>2011-01-19T00:00:00-08:00</updated>
    <id>http://projectsprouts.org/2011/01/19/using-fdb</id>
    <content type="html">&lt;h1&gt;Using the Flex DeBugger (&lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt;)&lt;/h1&gt;
&lt;p&gt;19 Jan 2011 &amp;#8211; Luke Bayes&lt;/p&gt;
&lt;h2&gt;Debug what?&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt; is a command line debugger. It provides us with the ability to capture, introspect and control the execution flow of a running &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; file by connecting to the Debug Flash Player and exposing a variety of actions to its user. In order to use &lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt;, we need to first build a &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; file with the &lt;code&gt;debug&lt;/code&gt; flag set to &lt;code&gt;true&lt;/code&gt;, and secondly, we need to run that &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; within a debug Flash Player.&lt;/p&gt;
&lt;p&gt;It just so happens that Sprouts downloads, installs and executes a debug Flash Player for whatever operating system you&amp;#8217;re on.&lt;/p&gt;
&lt;p&gt;As you&amp;#8217;ll soon see, we also make it incredibly simple to drop into a debug session with any &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; file that you build with Sprouts.&lt;/p&gt;
&lt;p&gt;To complete this tutorial, you&amp;#8217;ll need the following RubyGems installed:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;flashsdk&lt;/code&gt; &amp;gt;= 1.0.20.pre&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;sprout&lt;/code&gt; &amp;gt;= 1.1.10.pre&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can get both of these with:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;gem update flashsdk --pre
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;&lt;span class=&quot;attribution&quot;&gt;&lt;br /&gt;
&lt;image class=&quot;bordered&quot; src=&quot;/images/3263240819_52c1b7e59b_z.jpg&quot; title=&quot;layDeBugger&quot; /&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.flickr.com/photos/ocean_of_stars/3263240819/&quot;&gt;layDeBugger&lt;/a&gt; courtesy of &lt;a href=&quot;http://www.flickr.com/photos/ocean_of_stars/&quot;&gt;oceandesetoiles&lt;/a&gt; and the &lt;a href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.0/&quot;&gt;Creative Commons&lt;/a&gt; license.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;How do I do what?&lt;/h2&gt;
&lt;p&gt;You can coerce any &lt;code&gt;flashplayer&lt;/code&gt; task to drop into &lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt; by simply calling the &lt;code&gt;fdb&lt;/code&gt; task first.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;rake fdb &lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This should produce something that approximates the following output:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;in /Users/lbayes/Projects/Sandbox/OtherProject&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
mxmlc -debug 
      -library-path+&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;lib/asunit4/AsUnit-4.2.2.pre.swc 
      -output&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;bin/OtherProject-test.swf 
      -source-path+&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt; 
      -static-link-runtime-shared-libraries src/OtherProjectRunner.as

Loading configuration file flex-config.xml
bin/OtherProject-test.swf &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;49771 bytes&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;MXMLC&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; Compilation &lt;span class=&quot;nb&quot;&gt;complete &lt;/span&gt;in 3.305054 seconds.
Adobe fdb &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;Flash Player Debugger&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;build 16076&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
Copyright &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 2004-2007 Adobe, Inc. All rights reserved.
Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;Player to connect
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;fdb&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; run

Player connected; session starting.
Set breakpoints and &lt;span class=&quot;k&quot;&gt;then &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;continue&amp;#39;&lt;/span&gt; to resume the session.
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;SWF&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; bin:OtherProject-test.swf - 110,886 bytes after decompression
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;fdb&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should notice that the Flash Player has been initiated, but doesn&amp;#8217;t have focus and is basically unresponsive. At this time, you can interact with &lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt; in preparation for the execution of your &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; file. This is usually the point in time when one might set some breakpoints.&lt;/p&gt;
&lt;p&gt;Before we dig into break points, let&amp;#8217;s ask &lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt; what else we can do here by typing &amp;#8216;help&amp;#8217; and hitting enter.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;fdb&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Typing help, should produce something like the following:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;New to fdb? Do &lt;span class=&quot;s1&quot;&gt;&amp;#39;tutorial&amp;#39;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;basic info.
List of fdb commands:
bt &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;bt&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;             Print backtrace of all stack frames
&lt;span class=&quot;nb&quot;&gt;break&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;b&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;           Set breakpoint at specified line or &lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;
catch &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;ca&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;          Halt when an exception is thrown
cf &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;cf&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;             Display the name and number of the current file
clear &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;          Clear breakpoint at specified line or &lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;
condition &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;cond&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;    Apply/remove conditional expression to a breakpoint
&lt;span class=&quot;k&quot;&gt;continue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;        Continue execution after stopping at breakpoint
commands &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;com&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;      Sets commands to execute when breakpoint hit
delete &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;          Delete breakpoints or auto-display expressions
directory &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;dir&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;     Add a directory to the search path &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source &lt;/span&gt;files
disable &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;disab&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;     Disable breakpoints or auto-display expressions
disassemble &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;disas&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; Disassemble &lt;span class=&quot;nb&quot;&gt;source &lt;/span&gt;lines or functions
display &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;disp&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;      Add an auto-display expressions
&lt;span class=&quot;nb&quot;&gt;enable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;e&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;          Enable breakpoints or auto-display expressions
file &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;fil&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;          Specify application to be debugged.
finish &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;f&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;          Execute &lt;span class=&quot;k&quot;&gt;until &lt;/span&gt;current &lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;returns
handle &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;han&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;        Specify how to handle a fault
&lt;span class=&quot;nb&quot;&gt;help&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;h&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            Display &lt;span class=&quot;nb&quot;&gt;help &lt;/span&gt;on fdb commands
home &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;ho&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;           Set listing location to where execution is halted
info &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            Display information about the program being debugged
&lt;span class=&quot;nb&quot;&gt;kill&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;k&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            Kill execution of program being debugged
list &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;l&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            List specified &lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;or line
next &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;n&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            Step program
print &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;           Print value of variable EXP
&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;pw&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            Print working directory
quit &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;q&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            Exit fdb
run &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;r&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;             Start debugged program
&lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;se&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            Set the value of a variable
&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;so&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;         Read fdb commands from a file
step &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;            Step program &lt;span class=&quot;k&quot;&gt;until &lt;/span&gt;it reaches a different &lt;span class=&quot;nb&quot;&gt;source &lt;/span&gt;line
tutorial &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;t&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;        Display a tutorial on how to use fdb
undisplay &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;u&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;       Remove an auto-display expression
viewswf &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;v&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;         Set or clear filter &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;file listing based on swf
watch &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;wa&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;          Add a watchpoint on a given variable
what &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;wh&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;           Displays the context of a variable
where &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;w&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;           Same as bt
Type &lt;span class=&quot;s1&quot;&gt;&amp;#39;help&amp;#39;&lt;/span&gt; followed by &lt;span class=&quot;nb&quot;&gt;command &lt;/span&gt;name &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;full documentation.
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This is a list of commands (and shortcuts) for interacting with &lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt;. If you look closely at the history in your terminal, you should see that Sprouts has already called the &lt;code&gt;run&lt;/code&gt; command and then opened your &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; file. You should also note that you can run the &lt;code&gt;tutorial&lt;/code&gt; command any time to get another, slightly more terse introduction to command line debugging.&lt;/p&gt;
&lt;p&gt;You can get more specific help on a given command by typing &lt;code&gt;help&lt;/code&gt; followed by the command you&amp;#8217;re interested in. Try this now, with the &lt;code&gt;break&lt;/code&gt; command:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;fdb&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;help break&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This should produce something like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Set breakpoint at specified line or &lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;.
Examples:
  &lt;span class=&quot;nb&quot;&gt;break &lt;/span&gt;87
    Sets a breakpoint at line 87 of the current file.
  &lt;span class=&quot;nb&quot;&gt;break &lt;/span&gt;myapp.mxml:56
    Sets a breakpoint at line 56 of myapp.mxml.
  &lt;span class=&quot;nb&quot;&gt;break&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#3:29&lt;/span&gt;
    Sets a breakpoint at line 29 of file &lt;span class=&quot;c&quot;&gt;#3.&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;break &lt;/span&gt;doThis
    Sets a breakpoint at &lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;doThis&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; in the current file.
  &lt;span class=&quot;nb&quot;&gt;break &lt;/span&gt;myapp.mxml:doThat
    Sets a breakpoint at &lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;doThat&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; in file myapp.mxml.
  &lt;span class=&quot;nb&quot;&gt;break&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#3:doOther&lt;/span&gt;
    Sets a breakpoint at &lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;doOther&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; in file &lt;span class=&quot;c&quot;&gt;#3.&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;break&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;   &lt;/span&gt;Sets a breakpoint at the current execution address in the
   current stack frame. This is useful &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;breaking on &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;   &lt;/span&gt;to a stack frame.
To see file names and numbers, &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;info sources&amp;#39;&lt;/span&gt; or &lt;span class=&quot;s1&quot;&gt;&amp;#39;info files&amp;#39;&lt;/span&gt;.
To see &lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;names, &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;info functions&amp;#39;&lt;/span&gt;.
Abbreviated file names and &lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;names are accepted &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;unambiguous.
If line number is specified, &lt;span class=&quot;nb&quot;&gt;break &lt;/span&gt;at start of code &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;that line.
If &lt;span class=&quot;k&quot;&gt;function &lt;/span&gt;is specified, &lt;span class=&quot;nb&quot;&gt;break &lt;/span&gt;at start of code &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;that &lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;.
See &lt;span class=&quot;s1&quot;&gt;&amp;#39;commands&amp;#39;&lt;/span&gt; and &lt;span class=&quot;s1&quot;&gt;&amp;#39;condition&amp;#39;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;further breakpoint control.
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;We can see from this help content, that there are a variety of ways that we might set a breakpoint. My project was created with the &lt;code&gt;sprout-as3&lt;/code&gt; command and was called &lt;code&gt;OtherProject&lt;/code&gt;, which means that I have a test runner called &lt;code&gt;OtherProjectRunner&lt;/code&gt;. I&amp;#8217;m going to set a break point in that file now with:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;fdb&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;break &lt;/span&gt;OtherProjectRunner:15
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;And then I&amp;#8217;m going to &lt;code&gt;continue&lt;/code&gt; execution of the &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; until the breakpoint is encountered.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;fdb&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;continue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;&lt;em&gt;(If you remember the help content, this can also be done by simply typing &lt;code&gt;c&lt;/code&gt; followed by the enter key)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; will execute until it encounters the breakpoint that I set and once the breakpoint is hit, &lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt; will emit some context information like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Breakpoint 1, OtherProjectRunner&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; at OtherProjectRunner.as:15
 15                core.start&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;AllTests, null, this&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;;
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;fdb&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Following are some of the things I might do here:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Introspect the running &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; file with the &lt;code&gt;info&lt;/code&gt; commands (type &lt;code&gt;info&lt;/code&gt; to see these options)&lt;/li&gt;
	&lt;li&gt;Set variables and values directly into the environment to see what happens using the &lt;code&gt;set&lt;/code&gt; command&lt;/li&gt;
	&lt;li&gt;Step through the &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt;, one line or function at a time using the &lt;code&gt;step&lt;/code&gt; command, followed by &lt;code&gt;list&lt;/code&gt; or &lt;code&gt;i s&lt;/code&gt; (info stack).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you&amp;#8217;re done, you can type the &lt;code&gt;quit&lt;/code&gt; command, or you can &lt;code&gt;continue&lt;/code&gt; past your breakpoints and then manually close the &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt;. Or you can just hit CTRL+C to kill the process &amp;#8211; which should clean everything up for you.&lt;/p&gt;
&lt;p&gt;Upcoming releases of Sprouts will combine a special test result printer, with the &lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt; task to figure out when your test harness has finished running and then automatically kill the Flash Player process.&lt;/p&gt;
&lt;p&gt;This should be enough to get you going with the Flex DeBugger in your Sprout projects.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;This brings us to the end of the &amp;#8220;Using the Flex DeBugger (&lt;span class=&quot;caps&quot;&gt;FDB&lt;/span&gt;)&amp;#8221; post. If you find anything here in error, &lt;a target=&quot;_blank&quot; href=&quot;http://groups.google.com/group/projectsprouts&quot;&gt;please let us know&lt;/a&gt;, or better yet &amp;#8211; &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/project-sprouts/blob/gh-pages/_source/_posts&quot;&gt;fork&lt;/a&gt;, fix and send a pull request.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <title>Using the Flex Compiler SHell (FCSH)</title>
    <link href="http://projectsprouts.org/2011/01/18/using-fcsh.html"/>
    <updated>2011-01-18T00:00:00-08:00</updated>
    <id>http://projectsprouts.org/2011/01/18/using-fcsh</id>
    <content type="html">&lt;h1&gt;Using the Flex Compiler SHell (&lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt;)&lt;/h1&gt;
&lt;p&gt;18 Jan 2011 &amp;#8211; Luke Bayes&lt;/p&gt;
&lt;h2&gt;What the sHell?&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;MXMLC&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;COMPC&lt;/span&gt;, when run by themselves, are slow. Not a little slow, not kind of slow &amp;#8211; but brutally, soul-crushingly, terribly &lt;span class=&quot;caps&quot;&gt;SLOW&lt;/span&gt;. At least that&amp;#8217;s how they feel to someone like me. Someone that suffers from chronic, advanced, impatience.&lt;/p&gt;
&lt;p&gt;Fortunately, there is finally relief!&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;attribution&quot;&gt;&lt;br /&gt;
&lt;image class=&quot;bordered&quot; src=&quot;/images/3438900700_755cf91138_z.jpg&quot; title=&quot;Sprouts Shell&quot; /&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.flickr.com/photos/mike-bensalem/3438900700&quot;&gt;Sprouts Shell&lt;/a&gt; courtesy of &lt;a href=&quot;http://www.flickr.com/photos/mike-bensalem/&quot;&gt;Mike Epp&lt;/a&gt; and the &lt;a href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/&quot;&gt;Creative Commons&lt;/a&gt; license.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;What is that at the end of this long, dark tunnel?&lt;/h2&gt;
&lt;p&gt;More than a few years ago, someone at Macrodobe realized how slow their compilers are, and released the inappropriately-named, yet awesomely helpful, &amp;#8220;Flex Compiler SHell&amp;#8221; (or &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; for short). &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; doesn&amp;#8217;t necesarily have anything to do with the Flex framework, but provides a long-lived process that we can start up once, leave running, and ask to execute our compilation tasks. This process will retain lots of expensive information in memory and only recompile files that have changed since the last request. Using &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; by hand is really not practical, and with previous versions of Sprouts, it was also not as easy as it should be.&lt;/p&gt;
&lt;h2&gt;I do believe that is a light!&lt;/h2&gt;
&lt;p&gt;After many, countless hours of deliberation and coding and testing and coding again, &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; is finally exposed to Sprout projects in a very simple way:&lt;/p&gt;
&lt;p&gt;1) In a new terminal, start the fcsh service.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# cd into your project:&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/SomeProject
&lt;span class=&quot;c&quot;&gt;# Start the fcsh session:&lt;/span&gt;
rake fcsh:start
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;&lt;em&gt;(Hit CTRL+C any time to terminate this &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; process)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;2) In another new terminal (I use &lt;a target=&quot;_blank&quot; href=&quot;http://www.gnu.org/software/screen/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;GNU&lt;/span&gt; Screen&lt;/a&gt; thanks to a &lt;a target=&quot;_blank&quot; href=&quot;http://bhanoo.com/~hemant/&quot;&gt;smart guy&lt;/a&gt; I work with), execute the &lt;em&gt;fcsh&lt;/em&gt; task before any &lt;em&gt;mxmlc&lt;/em&gt; or &lt;em&gt;compc&lt;/em&gt; tasks that you would normally call.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# cd into your project:&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/SomeProject
&lt;span class=&quot;c&quot;&gt;# Compile and run tests:&lt;/span&gt;
rake fcsh &lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# or the &amp;#39;default&amp;#39; task:&lt;/span&gt;
rake fcsh default
&lt;span class=&quot;c&quot;&gt;# or clean first:&lt;/span&gt;
rake clean fcsh &lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;That&amp;#8217;s it!&lt;/p&gt;
&lt;p&gt;Just run the &lt;code&gt;fcsh&lt;/code&gt; task before any other tasks, no editing of source files necessary!&lt;/p&gt;
&lt;h2&gt;But how does it really work?&lt;/h2&gt;
&lt;p&gt;I&amp;#8217;m so glad you asked!&lt;/p&gt;
&lt;p&gt;Under the covers, in the latest release of the flashsdk, the &lt;code&gt;mxmlc&lt;/code&gt; and &lt;code&gt;compc&lt;/code&gt; tasks check for a couple of environment variables before actually calling out to the underlying process.&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;USE_FCSH&lt;/code&gt; environment variable value is &amp;#8216;true&amp;#8217;, then the compiler will attempt to connect to an FCSHSocket on &lt;code&gt;FCSH_PORT&lt;/code&gt; (12321 by default). The fcsh task simply sets this value to &amp;#8216;true&amp;#8217;, but you can also set this value on the command line, like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;rake &lt;span class=&quot;nb&quot;&gt;test &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;USE_FCSH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;In your .bashrc or .bash_profile (will impact all Sprout v1.x projects on your system):&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;USE_FCSH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Or in your Rakefile to always use &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; for this project:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Yes, it&amp;#39;s a smelly string, but that&amp;#39;s what Ruby wants for some reason...&lt;/span&gt;
ENV&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;USE_FCSH&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;true&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Regardless of which method you choose to trigger a build with &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt;, you must have an instance of the &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; server running from the same project directory before calling the build task, or else you&amp;#8217;ll get a failure. Once again, you can start the &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; server with:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;rake fcsh:start
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;If you forget this mysterious incantation, you can always list out the available rake tasks with the -T option:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;rake -T
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h2&gt;The Railroad&lt;/h2&gt;
&lt;p&gt;If you want to run builds with &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; from multiple directories, you&amp;#8217;ll need to give each client and server a unique port to connect on. You can do this in any of the ways indicated above for the &lt;code&gt;USE_FCSH&lt;/code&gt; parameter, except you&amp;#8217;ll specify the &lt;code&gt;FCSH_PORT&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;On the command line:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;rake fcsh &lt;span class=&quot;nb&quot;&gt;test &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;FCSH_PORT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;12567
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;In each shell instance:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;FCSH_PORT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;12567
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;&lt;em&gt;(Note: To always use a custom port, the &lt;code&gt;export&lt;/code&gt; could be placed into your .bashrc or .bash_profile)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Anywhere in your Rakefile:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;ENV&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;FCSH_PORT&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; 12567
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;You should now be able to easily integrate &lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt; into your Sprouts v1.x build process at whatever scope you prefer and customize it appropriately too.&lt;/p&gt;
&lt;p&gt;This brings us to the end of the &amp;#8220;Using the Flex Compiler SHell (&lt;span class=&quot;caps&quot;&gt;FCSH&lt;/span&gt;)&amp;#8221; post. If you find anything here in error, &lt;a target=&quot;_blank&quot; href=&quot;http://groups.google.com/group/projectsprouts&quot;&gt;please let us know&lt;/a&gt;, or better yet &amp;#8211; &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/project-sprouts/blob/gh-pages/_source/_posts&quot;&gt;fork&lt;/a&gt;, fix and send a pull request.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <title>Using Sprout Generators</title>
    <link href="http://projectsprouts.org/2010/12/31/using-generators.html"/>
    <updated>2010-12-31T00:00:00-08:00</updated>
    <id>http://projectsprouts.org/2010/12/31/using-generators</id>
    <content type="html">&lt;h1&gt;Using Sprout Generators&lt;/h1&gt;
&lt;p&gt;31 Dec 2010 &amp;#8211; Luke Bayes&lt;/p&gt;
&lt;p&gt;Generators have been rewritten from scratch for Project Sprouts v1. The new generators are much easier to test, distribute, and modify. This post is going to cover usage (or consumption) of existing generators, we&amp;#8217;ll put together a second post where we go into more detail about creating generators.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;attribution&quot;&gt;&lt;br /&gt;
&lt;image src=&quot;/images/KGrHqYOKigEzS.jpg&quot; title=&quot;Sprout Germinator&quot; /&gt;&lt;br /&gt;
&lt;a href=&quot;&quot;&gt;Sprout Germinator&lt;/a&gt; image courtesy of &lt;a href=&quot;https://www.easygreen.com/&quot;&gt;Easy Green&lt;/a&gt;.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There are two kinds of generator, an &lt;em&gt;Application&lt;/em&gt; generator and a &lt;em&gt;Feature&lt;/em&gt; generator. The primary difference between them, is that a &lt;em&gt;Feature&lt;/em&gt; generator expects to be run from a folder that contains a &lt;em&gt;Gemfile&lt;/em&gt;. This is because feature generators can be easily overridden by gems that are loaded from the Gemfile.&lt;/p&gt;
&lt;p&gt;For example, the default &lt;code&gt;sprout-class&lt;/code&gt; generator &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/sprout-flashsdk/blob/master/lib/flashsdk/generators/class_generator.rb#L63-65&quot;&gt;calls&lt;/a&gt; a &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/sprout-flashsdk/blob/master/lib/flashsdk/generators/class_generator.rb#L71-81&quot;&gt;null TestClassGenerator&lt;/a&gt; that does nothing. But the &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/patternpark/asunit/blob/master/asunit-4.0/sprout/lib/asunit4/test_class_generator.rb&quot;&gt;AsUnit 4&lt;/a&gt; Rubygem overrides the TestClassGenerator with one that generates an AsUnit 4 test case, and then calls the &lt;em&gt;SuiteClassGenerator&lt;/em&gt; &amp;#8211; which it &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/patternpark/asunit/blob/master/asunit-4.0/sprout/lib/asunit4/suite_class_generator.rb&quot;&gt;also provides&lt;/a&gt;. Someone that is so inclined, could easily build a &lt;em&gt;flexunit&lt;/em&gt; Rubygem that overrides the TestClassGenerator code so that it gets called instead of AsUnit &lt;em&gt;(hint, hint)&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;The Application Generator&lt;/h2&gt;
&lt;p&gt;Let&amp;#8217;s start out by demonstrating a few generators and talking about what they do. If you haven&amp;#8217;t already, get the Flash &lt;span class=&quot;caps&quot;&gt;SDK&lt;/span&gt; (&amp;gt;= 1.0.18) installed on your system:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# Install the ActionScript 3 / Flash / Flex bundle:&lt;/span&gt;
gem install flashsdk --pre
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You can figure out what version you have installed with:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;gem list flashsdk
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Now, let&amp;#8217;s see what generators we have available to us by running the following and then hitting the &lt;span class=&quot;caps&quot;&gt;TAB&lt;/span&gt; key.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should see a collection of executables &amp;#8211; something like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-as3        sprout-class      sprout-flex       sprout-generator  &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;etc&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;We&amp;#8217;re going to go ahead and create an ActionScript 3 project named, &amp;#8216;SomeProject&amp;#8217; with the following:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-as3 SomeProject
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should see something like the following in your terminal:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Created directory: ./SomeProject
Created file:      ./SomeProject/rakefile.rb
Created file:      ./SomeProject/Gemfile
Created directory: ./SomeProject/src
Created file:      ./SomeProject/src/SomeProject.as
Created file:      ./SomeProject/src/SomeProjectRunner.as
Created directory: ./SomeProject/assets
Created directory: ./SomeProject/assets/skins
Created file:      ./SomeProject/assets/skins/DefaultProjectImage.png
Created directory: ./SomeProject/lib
Created directory: ./SomeProject/bin
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Let&amp;#8217;s pretend we don&amp;#8217;t like what just happened. Maybe we meant to call this &lt;em&gt;OtherProject&lt;/em&gt; instead. All generator actions can easily be &amp;#8220;un-executed&amp;#8221; by appending the same command with the argument &lt;code&gt;--destroy&lt;/code&gt;. Let&amp;#8217;s try this now, by pressing the up-arrow in the terminal, to get the most recently executed command, and then add &lt;code&gt;--destroy&lt;/code&gt; to the end.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-as3 SomeProject --destroy
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should see something like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Removed directory: ./SomeProject/bin
Removed directory: ./SomeProject/lib
Removed file:      ./SomeProject/assets/skins/DefaultProjectImage.png
Removed directory: ./SomeProject/assets/skins
Removed directory: ./SomeProject/assets
Removed file:      ./SomeProject/src/SomeProjectRunner.as
Removed file:      ./SomeProject/src/SomeProject.as
Removed directory: ./SomeProject/src
Removed file:      ./SomeProject/Gemfile
Removed file:      ./SomeProject/rakefile.rb
Removed directory: ./SomeProject
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This removal is safe, in that it should only delete directories that the generator created, and it should only delete them if they&amp;#8217;re empty. It should also only delete files if they&amp;#8217;re identical to what would be generated.&lt;/p&gt;
&lt;p&gt;Now, let&amp;#8217;s run the generator again with &lt;em&gt;&amp;#8216;other_project&amp;#8217;&lt;/em&gt; for the input: &lt;em&gt;(Note the snake case)&lt;/em&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-as3 other_project
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should see something like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Created directory: ./other_project
Created file:      ./other_project/rakefile.rb
Created file:      ./other_project/Gemfile
Created directory: ./other_project/src
Created file:      ./other_project/src/OtherProject.as
Created file:      ./other_project/src/OtherProjectRunner.as
Created directory: ./other_project/assets
Created directory: ./other_project/assets/skins
Created file:      ./other_project/assets/skins/DefaultProjectImage.png
Created directory: ./other_project/lib
Created directory: ./other_project/bin
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Notice how the snake case was respected for the project directory, but it was converted to camel case for the classes and files. This is one of the great features of the new generators. You can see how easy it is to do this by checking out the &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/sprout-flashsdk/blob/master/lib/flashsdk/generators/project_generator.rb#L14&quot;&gt;source file for the class generator&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;The Feature Generator&lt;/h2&gt;
&lt;p&gt;Now, let&amp;#8217;s go into the new project and make sure our gems are up to date:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;other_project
bundle install
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Create a new class using the fully-qualified name:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-class utils.MathUtil
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should see output like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Created directory: ./src/utils
Created file:      ./src/utils/MathUtil.as
Created directory: ./test/utils
Created file:      ./test/utils/MathUtilTest.as
Skipped existing:  ./test
Created file:      ./test/AllTests.as
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Notice how a test case and test suite were created. These were only created because the project Gemfile loads the asunit4 gem.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s what&amp;#8217;s in that Gemfile:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;http://rubygems.org&amp;quot;&lt;/span&gt;

gem &lt;span class=&quot;s2&quot;&gt;&amp;quot;flashsdk&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;gt;= 1.0.0.pre&amp;quot;&lt;/span&gt;
gem &lt;span class=&quot;s2&quot;&gt;&amp;quot;asunit4&amp;quot;&lt;/span&gt;, &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;gt;= 4.2.2.pre&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This Gemfile is how the ClassGenerator, TestClassGenerator and SuiteClassGenerator knew what to build. If you&amp;#8217;re interested in learning more about Gemfiles in general, you should check out the &lt;a target=&quot;_blank&quot; href=&quot;http://gembundler.com&quot;&gt;GemBundler&lt;/a&gt; site.&lt;/p&gt;
&lt;p&gt;Even though I&amp;#8217;m sure no one would &lt;em&gt;ever&lt;/em&gt; want to generate a class without an associated test case, let&amp;#8217;s pretend we want to do just that. Since I can never remember exactly what parameters to use, let&amp;#8217;s go ahead and run the generator with no arguments in order to see its help content:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-class
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should see something like the following:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt;[ERROR - Sprout::Errors::MissingArgumentError] input is required and must not be nil

Usage: sprout-class [options]
        --help                       Display this help message
        --path=[STRING]              Default Description
    -d, --destroy                    Default Description
    -f, --force                      Default Description
    -q, --quiet                      Default Description
        --templates+=[a,b,c]         Default Description
    -i, --input=STRING               Default Description
    -p, --package=[STRING]           Default Description
    -a, --assets=[STRING]            Default Description
        --skins=[STRING]             Default Description
        --test=[STRING]              Default Description
    -l, --lib=[STRING]               Default Description
    -b, --bin=[STRING]               Default Description
    -s, --src=[STRING]               Default Description
    -t, --[no-]test-class            Default Description
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Of course, now that we see the help output, we see that we could have run the generator with the &lt;code&gt;--help&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;Notice how all of these say, &amp;#8220;Default Description&amp;#8221;, this is because I&amp;#8217;d like to extract the rdoc comment directly from the &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/sprout-flashsdk/blob/master/lib/flashsdk/generators/class_generator.rb#L25&quot;&gt;source file&lt;/a&gt; in order to avoid duplication. I haven&amp;#8217;t gotten around to this task, so if you&amp;#8217;re interested in contributing, please &lt;a target=&quot;_blank&quot; target=&quot;https://github.com/lukebayes/project-sprouts/blob/master/lib/sprout/executable/base.rb#L57-58&quot;&gt;fork&lt;/a&gt; and send a pull request.&lt;/p&gt;
&lt;p&gt;Even though these directives don&amp;#8217;t have descriptions, and we can experiment with some confidence thanks to the &lt;code&gt;--destroy&lt;/code&gt; argument, I would still check my work into a Git repository before running any generators in an existing project.&lt;/p&gt;
&lt;p&gt;In any case, let&amp;#8217;s go ahead and try to run this class generator with the &lt;code&gt;--no-test-class&lt;/code&gt; argument for a new class.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-class utils.OtherUtil --no-test-class
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should see that the test case and test suite were not created:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;Skipped directory: ./src/utils
Created file:      ./src/utils/OtherUtil.as
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h2&gt;Working with Templates&lt;/h2&gt;
&lt;p&gt;The ability to easily customize and control generator templates is one of the main driving forces behind the generator rewrite. You can override a particular template for a single generator execution, a specific project, or globally for your system. Generator templates are simply named erb files &amp;#8211; &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/project-sprouts/blob/master/lib/sprout/generator/base.rb#L100-110&quot;&gt;but allowances have been made for alternative template languages&lt;/a&gt;. Each template is loaded and rendered individually, so you you only need to replace those templates that you&amp;#8217;re interested in.&lt;/p&gt;
&lt;p&gt;The first thing you&amp;#8217;ll want to figure out, is the name of the template you want to override. For the time being, you can find this out by checking the source code for the project that defined the generator. Following are some template folders to peruse:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/sprout-flashsdk/tree/master/lib/flashsdk/generators/templates&quot;&gt;Flash &lt;span class=&quot;caps&quot;&gt;SDK&lt;/span&gt; Templates&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a target=&quot;_blank&quot; href=&quot;https://github.com/patternpark/asunit/tree/master/asunit-4.0/sprout/lib/asunit4/templates&quot;&gt;AsUnit Templates&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/project-sprouts/tree/master/lib/sprout/generators&quot;&gt;Sprouts Generators&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let&amp;#8217;s assume we want to replace the template for the ClassGenerator, found in the Flash &lt;span class=&quot;caps&quot;&gt;SDK&lt;/span&gt;. You &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/sprout-flashsdk/blob/master/lib/flashsdk/generators/class_generator.rb#L59&quot;&gt;can see on line 59&lt;/a&gt; that the generator is looking for a template file named, &amp;#8216;ActionScript3Class.as&amp;#8217;.&lt;/p&gt;
&lt;p&gt;This means that once we decide which scope to operate on, we need to place a file with the same name into the correct directory.&lt;/p&gt;
&lt;h3&gt;Execution Templates&lt;/h3&gt;
&lt;p&gt;Let&amp;#8217;s start by replacing the template for a single generator execution. Let&amp;#8217;s start with the contents of the &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/sprout-flashsdk/blob/master/lib/flashsdk/generators/templates/ActionScript3Class.as&quot;&gt;original template&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;actionscript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;package_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;class_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;class_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;While I&amp;#8217;m sure &lt;em&gt;you&lt;/em&gt; would &lt;em&gt;never&lt;/em&gt; want to unsnuggle your brackets, let&amp;#8217;s imagine your boss is going to &lt;em&gt;force&lt;/em&gt; you to do it &amp;#8211; just for this one file.&lt;/p&gt;
&lt;p&gt;Create a new directory in your project (from above) called, &amp;#8220;bossypoo&amp;#8221; and within that directory, create a new file named ActionScript3Class.as, and paste the following contents into it.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;actionscript&quot;&gt;&lt;span class=&quot;cm&quot;&gt;/*********************&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;Copyright: Pointyhaired Bossypoo, 2010&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;*********************/&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;package_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&amp;gt;&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;class_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

        &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;class_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Now run the class generator just like before, but provide the new, custom templates folder:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sprout-class utils.BossyUtil --templates+&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;bossypoo
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You&amp;#8217;ll have to forgive the extra carriage returns, as my &lt;span class=&quot;caps&quot;&gt;ERB&lt;/span&gt; templating appears to be a little greedy with whitespace. After running the generator, you should see everything looks normal.&lt;/p&gt;
&lt;p&gt;Now that approach is pretty neat, but we don&amp;#8217;t want to have to remember to add that &lt;code&gt;--templates&lt;/code&gt; argument every.single.time we run a generator. Which brings us to;&lt;/p&gt;
&lt;h3&gt;Project Templates&lt;/h3&gt;
&lt;p&gt;In addition to setting the &lt;code&gt;--templates&lt;/code&gt; parameter manually, there are a number of locations that generators will scan for templates. You can get the definitive list of template paths for any generator that extends Sprout::Generator::Base by running the generator with the &lt;code&gt;--show-template-paths&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;On my computer, this results in:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt;The following paths will be checked for templates:
  * --templates+=[value]
  * config/generators
  * vendor/generators
  * /Users/lbayes/Library/Sprouts/1.1/cache/generators
  * ENV[&amp;#39;SPROUT_GENERATORS&amp;#39;]
  * /Users/lbayes/.gem/ruby/1.9.2/gems/flashsdk-1.0.17.pre/lib/flashsdk/generators/templates
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;If you create either of the &lt;code&gt;config/generators&lt;/code&gt; or &lt;code&gt;vender/generators&lt;/code&gt; paths in your project directory and place that template in there, anytime you run the class generator, it will get picked up.&lt;/p&gt;
&lt;h3&gt;System Templates&lt;/h3&gt;
&lt;p&gt;If you look closely at the previous list, you&amp;#8217;ll see that one of the folders is in the global Sprout cache, and another is an environmental variable. I hope you can figure out how to create a folder in the cache location. If you place a generator template here, it will be picked up for any &lt;em&gt;Application&lt;/em&gt; generators, and any projects that don&amp;#8217;t override the template in their own scope.&lt;/p&gt;
&lt;p&gt;You can set the environmental variable in a number ways, one of which is on the command line like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt;sprout-class utils.MathUtil SPROUT_GENERATORS=relative/or/absolute/path/to/templates
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Or you can set it within your .bash_profile or .bashrc file like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt;export SPROUT_GENERATORS=/absolute/path/to/templates
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You could also set it in any Ruby source file that gets loaded from your Gemfile. In Ruby, this would look like:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;ENV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;SPROUT_GENERATORS&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/absolute/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;templates&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;This brings us to the end of the &amp;#8220;Using Generators&amp;#8221; tutorial. If you find anything here in error, &lt;a target=&quot;_blank&quot; href=&quot;http://groups.google.com/group/projectsprouts&quot;&gt;please let us know&lt;/a&gt;, or better yet &amp;#8211; &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/project-sprouts/blob/gh-pages/_source/_posts/2010-12-31-using-generators.textile&quot;&gt;fork&lt;/a&gt;, fix and send a pull request.&lt;/p&gt;
&lt;p&gt;The next article in the series will describe how to create generators.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <title>Migrating from 0.7 to 1.0 beta</title>
    <link href="http://projectsprouts.org/2010/12/29/migrating.html"/>
    <updated>2010-12-29T00:00:00-08:00</updated>
    <id>http://projectsprouts.org/2010/12/29/migrating</id>
    <content type="html">&lt;h1&gt;Migrating from 0.7 to 1.0 beta&lt;/h1&gt;
&lt;p&gt;29 Dec 2010 &amp;#8211; Luke Bayes&lt;/p&gt;
&lt;p&gt;There are some significant changes that have come with the new version of Sprouts. This guide should help you transition a legacy Sprouts project into the new hotness. Let&amp;#8217;s get sideways.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;attribution&quot;&gt;&lt;br /&gt;
&lt;img src=&quot;/images/4981869236_6578a75813_z.jpg&quot; title=&quot;Sprouted Onion&quot; alt=&quot;Sprouted Onion&quot; /&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.flickr.com/photos/bigrhys/4981869236/&quot;&gt;Image&lt;/a&gt; courtesy of &lt;a href=&quot;http://www.flickr.com/photos/bigrhys/&quot;&gt;Rhys Alton&lt;/a&gt; and the &lt;a href=&quot;http://creativecommons.org/licenses/by/2.0/&quot;&gt;Creative Commons&lt;/a&gt; license.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In order to simplify this, let&amp;#8217;s start assuming you have a default version 0.7 project called &amp;#8216;SomeProject&amp;#8217;.&lt;/p&gt;
&lt;p&gt;Assuming this is so, you&amp;#8217;ll likely have some AsUnit 3.0 tests, and a Rakefile that looks something like the following:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;sprout&amp;#39;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Optionally load gems from a server other than rubyforge:&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# set_sources &amp;#39;http://gems.projectsprouts.org&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sprout&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;as3&amp;#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;############################################&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Configure your Project Model&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;project_model&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:model&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;project_name&lt;/span&gt;            &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;SomeProject&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;language&lt;/span&gt;                &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;as3&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;background_color&lt;/span&gt;        &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;#FFFFFF&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;                   &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;970&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt;                  &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;550&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.use_fdb               = true&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.use_fcsh              = true&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.preprocessor          = &amp;#39;cpp -D__DEBUG=false -P - - | tail -c +3&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.preprocessed_path     = &amp;#39;.preprocessed&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.src_dir               = &amp;#39;src&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.lib_dir               = &amp;#39;lib&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.swc_dir               = &amp;#39;lib&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.bin_dir               = &amp;#39;bin&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.test_dir              = &amp;#39;test&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.doc_dir               = &amp;#39;doc&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.asset_dir             = &amp;#39;assets&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.compiler_gem_name     = &amp;#39;sprout-flex4sdk-tool&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.compiler_gem_version  = &amp;#39;&amp;gt;= 4.0.0&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.source_path           &amp;lt;&amp;lt; &amp;quot;#{m.lib_dir}/somelib&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# m.libraries             &amp;lt;&amp;lt; :corelib&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Compile and debug the application&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;debug&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:debug&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Compile run the test harness&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;unit&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:test&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Compile the optimized deployment&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;deploy&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:deploy&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Create documentation&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;document&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:doc&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Compile a SWC file&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;swc&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:swc&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Compile and run the test harness for CI&amp;#39;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ci&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:cruise&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# set up the default rake task&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:default&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:debug&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;One of the (many) problems with this Rakefile, is that there is too much magic.&lt;/p&gt;
&lt;p&gt;All of this magic makes it very difficult for new users to learn what&amp;#8217;s going on here. While it looks simple, there is an enormous amount of work happening. If we wanted all of the same features that are exposed in this project, but using Sprouts v 1.0, here&amp;#8217;s what should happen.&lt;/p&gt;
&lt;h2&gt;1) Add a Gemfile&lt;/h2&gt;
&lt;p&gt;Add a new file to the root of the project named &lt;em&gt;Gemfile&lt;/em&gt;, with the following contents:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;http://rubygems.org&amp;quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;flashsdk&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;gt;= 1.0.0.pre&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;asunit4&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;gt;= 4.2.2.pre&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;This Gemfile is a feature of &lt;a target=&quot;_blank&quot; href=&quot;http://gembundler.com&quot;&gt;Gem Bundler&lt;/a&gt; which is an awesome tool that does a great job of helping us decouple our applications from the mechanism that is used to distribute them &amp;#8211; generally &lt;a target=&quot;_blank&quot; href=&quot;http://rubygems.org&quot;&gt;RubyGems&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This file describes all of the Ruby Gems that our application should load in order for the &lt;em&gt;require&lt;/em&gt; statements within it to work.&lt;/p&gt;
&lt;p&gt;Of course, some Ruby Gems require others, which themselves require others. Gem Bundler does a great job of managing these dependencies for us, so we should only declare our outermost dependencies.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s important to note, that if you rely on any externally distributed library or tools (like the &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/kristoferjoseph/sprout-robotlegs&quot;&gt;Robot Legs library&lt;/a&gt; for example), you should add that dependency to this Gemfile.&lt;/p&gt;
&lt;h2&gt;2) Update the Rakefile&lt;/h2&gt;
&lt;p&gt;Project Sprouts has always been an ambitious effort that probably attempts to do a little too much. One of the things that has been difficult to manage is how much or how little &lt;em&gt;magic sauce&lt;/em&gt; to use. I believe that the 0.7 release of Sprouts uses too much magic, and the version 1.0 beta is a major attempt to remedy that.&lt;/p&gt;
&lt;p&gt;Some things that are noticably absent in the new version are the &lt;em&gt;ProjectModel&lt;/em&gt; and &lt;em&gt;Rake Task Helpers&lt;/em&gt;. There are other major features that aren&amp;#8217;t quite ready yet too, like &lt;em&gt;AsDoc&lt;/em&gt; and &lt;em&gt;Continuous Integration&lt;/em&gt; support.&lt;/p&gt;
&lt;p&gt;As of right now, there is no plan to bring back the &lt;em&gt;Project Model&lt;/em&gt; or the &lt;em&gt;Task Helpers&lt;/em&gt;, but you can expect &lt;em&gt;AsDoc&lt;/em&gt; and &lt;em&gt;CI&lt;/em&gt; support in the near future &amp;#8211; it will be even sooner if you &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/project-sprouts/tree/master&quot;&gt;fork&lt;/a&gt; and build them yourself!&lt;/p&gt;
&lt;p&gt;Getting back to this new Rakefile, the idea here, is that someone who is new to Ruby and new to Rake, should be able to read a newly generated Sprouts project, and have at least some idea as to how they might modify it. In the past, this was not possible &amp;#8211; you would need to investigate quite a lot before you could make sense of what this Rakefile did.&lt;/p&gt;
&lt;p&gt;This new Rakefile is obviously much more verbose, but it&amp;#8217;s also much more natural and readable.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;rubygems&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;bundler&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;bundler/setup&amp;#39;&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;rake/clean&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;flashsdk&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;asunit4&amp;#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Use the Flex Compiler SHell (FCSH)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# ENV[&amp;#39;USE_FCSH&amp;#39;] = true&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;##############################&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Debug&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Compile the debug swf&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;mxmlc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;bin/SomeProject-debug.swf&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;src/SomeProject.as&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;debug&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Compile and run the debug swf&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;flashplayer&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:run&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;bin/SomeProject-debug.swf&amp;quot;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;##############################&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# SWC&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;compc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;bin/SomeProject.swc&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;input_class&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;SomeProject&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;source_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;src&amp;#39;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Compile the SWC file&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:swc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;bin/SomeProject.swc&amp;#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;##############################&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Test&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:asunit4&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Compile the test swf&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;mxmlc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;bin/SomeProject-test.swf&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:asunit4&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;src/SomeProjectRunner.as&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;source_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;test&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;debug&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Compile and run the test swf&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;flashplayer&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:test&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;bin/SomeProject-test.swf&amp;quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:default&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;I&amp;#8217;m going to assume you have some slightly more sophisticated work in your Rakefile. Perhaps you were even using the &lt;em&gt;ProjectModel&lt;/em&gt; to set up your &lt;em&gt;source_path&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;With the new version, you do this by creating a &lt;em&gt;Plain Old Ruby&lt;/em&gt; method, and sending your tasks to it by reference.&lt;/p&gt;
&lt;p&gt;It goes a little like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;##&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# This task must be *above* any &lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# line that calls it.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;configure_task&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;lib/corelib.swc&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;source_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;lib/your_custom_lib_folder&amp;#39;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;mxmlc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;bin/SomeProject.swf&amp;#39;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;configure_task&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;src/SomeProject.as&amp;#39;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:asunit4&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;mxmlc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;bin/SomeProjectRunner.swf&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:asunit4&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;configure_task&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;src/SomeProjectRunner.as&amp;#39;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;If you have a more sophisticated Rakefile, and find yourself struggling with the migration, feel free to &lt;a target=&quot;_blank&quot; href=&quot;http://groups.google.com/group/projectsprouts/&quot;&gt;ask questions on the list&lt;/a&gt;.&lt;/p&gt;</content>
  </entry>
  
  <entry>
    <title>Project Sprouts Version 1.0 Beta Released!</title>
    <link href="http://projectsprouts.org/2010/12/28/version-1.0-announced.html"/>
    <updated>2010-12-28T00:00:00-08:00</updated>
    <id>http://projectsprouts.org/2010/12/28/version-1.0-announced</id>
    <content type="html">&lt;h1&gt;Project Sprouts Version 1.0 Beta Released!&lt;/h1&gt;
&lt;p&gt;28 Dec 2010 &amp;#8211; Luke Bayes&lt;/p&gt;
&lt;h2&gt;The Thinker&lt;/h2&gt;
&lt;p&gt;After &lt;a target=&quot;_blank&quot; href=&quot;http://rubyforge.org/projects/asproject/&quot;&gt;over 4 years&lt;/a&gt; of thinking, rethinking, designing, implementing and reimplementing, I&amp;#8217;m elated to announce the immediate availability of the Project Sprouts version 1.0 beta.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;bordered&quot; src=&quot;/images/3638652042_3cb4b970bd_z.jpg&quot; title=&quot;Tiny Sprout&quot; alt=&quot;Tiny Sprout&quot; /&gt;&lt;span class=&quot;attribution&quot;&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.flickr.com/photos/san_ast/3638652042/&quot;&gt;Image&lt;/a&gt; courtesy of &lt;a href=&quot;http://www.flickr.com/people/san_ast/&quot;&gt;Santhosh Nandakumar&lt;/a&gt; and the &lt;a href=&quot;http://creativecommons.org/licenses/by/2.0/&quot;&gt;Creative Commons&lt;/a&gt; license.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You can install the beta as follows:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;gem install sprout --pre
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You can test out the Flash &lt;span class=&quot;caps&quot;&gt;SDK&lt;/span&gt; with:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;gem install flashsdk --pre
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;You should receive further instructions in your terminal after installation.&lt;/p&gt;
&lt;h2&gt;Moar Plz!&lt;/h2&gt;
&lt;p&gt;This release represents a nearly complete rewrite of Sprouts internals with a focus on testability, extensibility and decoupling. This build sets out to solve &amp;#8211; in a general way &amp;#8211; many problems associated with building cross platform, distributed tools with Ruby, and along the way, it makes life much easier for those of us that work with ActionScript or Flex. As you dig around and uncover various dark corners, you&amp;#8217;re likely to notice areas that could use some improvement. You may even stumble over an error or two. If you see anything at all suspicious (especially full-blown failures), please do &lt;a target=&quot;_blank&quot; href=&quot;http://groups.google.com/group/projectsprouts/&quot;&gt;let us know&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re working with ActionScript 3.0 or Flex projects, please check out this latest release. This release does &lt;em&gt;not&lt;/em&gt; include support for ActionScript 2.0 projects, and unless someone from the community contributes that functionality, it probably isn&amp;#8217;t going to get done.&lt;/p&gt;
&lt;p&gt;While the new style of Rake tasks should be familiar to anyone using Sprouts 0.7, legacy Rakefiles will not run without modification.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re migrating a legacy Sprouts project, please check out the &lt;a href=&quot;/2010/12/29/migrating.html&quot;&gt;migration guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We are also working hard to completely revamp our &lt;a href=&quot;/docs/1.1/index.html&quot;&gt;documentation&lt;/a&gt; using the &lt;a target=&quot;_blank&quot; href=&quot;http://yardoc.org/&quot;&gt;Yard documentation engine&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We still have a handful of features that need some attention, so if you&amp;#8217;ve been meaning to contribute some time to an open-source project, this could be a great opportunity.&lt;/p&gt;
&lt;p&gt;This is also the inaugural post to the new Project Sprouts Blog!&lt;/p&gt;
&lt;p&gt;Be sure to subscribe to the &lt;a href=&quot;/atom.xml&quot;&gt;atom feed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This blog (and site) was created with &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt;, and is stored in the &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/lukebayes/project-sprouts/tree/gh-pages&quot;&gt;gh-pages branch&lt;/a&gt;. If you have an article (or correction) that you&amp;#8217;d like to contribute, please fork and send me a pull request!&lt;/p&gt;
&lt;h2&gt;Thanks for your support!&lt;/h2&gt;
&lt;p&gt;I sincerely hope you enjoy this new release of Sprouts, it is truly so much easier to test and extend and work with. I have high hopes for our growing community in the coming months and years.&lt;/p&gt;</content>
  </entry>
  

</feed>

