<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>Developmentastic</title>
 <link href="http://lmarburger.github.com/atom.xml" rel="self" />
 <link href="http://lmarburger.github.com/" />
 <updated>2009-11-21T14:06:58-08:00</updated>
 <id>http://lmarburger.github.com/</id>
 <author>
  <name>Larry Marburger</name>
  <email>larry@marburger.cc</email>
 </author>
 
 
 <entry>
  <title>Cucumber Features In Subdirectories</title>
  <link href="http://lmarburger.github.com/2009/09/cucumber-features-in-subdirectories.html" />
  <updated>2009-09-19T00:00:00-07:00</updated>
  <id>http://lmarburger.github.com/2009/09/cucumber-features-in-subdirectories</id>
  <content type="html">&lt;p&gt;I&amp;#8217;m working on a project where we&amp;#8217;ve amassed a decent amount of Cucumber features. Dumping them in the root directory makes it difficult to find the feature you&amp;#8217;re looking for and running related features is impossible.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve fooled with organizing my cucumber features in the past, but didn&amp;#8217;t have much luck. Grouping related features into subdirectories was fine when running the entire suite, but running an individual feature failed because Cucumber doesn&amp;#8217;t know to load step definitions from the parent directory. As I was looking through &lt;code&gt;cucumber --help&lt;/code&gt; the other day, I happened to notice the &lt;code&gt;--require&lt;/code&gt; flag.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;-r, --require LIBRARY|DIR
    Require files before executing the features.&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Running the following command was exactly what I needed.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cucumber --require features features/users/sign_in.feature&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This tells Cucumber to load all &lt;code&gt;.rb&lt;/code&gt; files under &lt;code&gt;features/&lt;/code&gt; which will find the step definitions and support files. To save some typing, I created an alias in &lt;code&gt;~/.bashrc&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alias cuc=&amp;#39;cucumber -r features&amp;#39;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Where I&amp;#8217;ve really enjoyed this setup is when running all related features. After touching a step definition, I&amp;#8217;d like to run the features that depend on it quickly without running the &lt;em&gt;entire&lt;/em&gt; suite. Now that&amp;#8217;s as simple as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cuc features/users/*&lt;/code&gt;&lt;/pre&gt;</content>
 </entry>
 
 <entry>
  <title>MongoMapper Looks Promising</title>
  <link href="http://lmarburger.github.com/2009/06/mongomapper.html" />
  <updated>2009-06-30T00:00:00-07:00</updated>
  <id>http://lmarburger.github.com/2009/06/mongomapper</id>
  <content type="html">&lt;p&gt;I&amp;#8217;ve been intrigued by schema-free &lt;a href='http://en.wikipedia.org/wiki/Document-oriented_database'&gt;document-oriented databases&lt;/a&gt; after tinkering with &lt;a href='http://couchdb.apache.org'&gt;CouchDB&lt;/a&gt;, but haven&amp;#8217;t found a way to integrate it into my current projects. I&amp;#8217;ve heard &lt;a href='http://railstips.org'&gt;John Nunemaker&lt;/a&gt; &lt;a href='http://railstips.org/2009/6/3/what-if-a-key-value-store-mated-with-a-relational-database-system'&gt;sing the praises of MongoDB&lt;/a&gt; in the past and today &lt;a href='http://railstips.org/2009/6/27/mongomapper-the-rad-mongo-wrapper'&gt;he has officially released&lt;/a&gt; his ActiveRecored inspired database adapter &lt;a href='http://github.com/jnunemaker/mongomapper/tree/master'&gt;MongoMapper&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s got validations, callbacks, a robust find API, support for easily embedding models, and much more. The code looks almost too good to be true.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;span class='k'&gt;class&lt;/span&gt; &lt;span class='nc'&gt;Person&lt;/span&gt;
  &lt;span class='kp'&gt;include&lt;/span&gt; &lt;span class='no'&gt;MongoMapper&lt;/span&gt;&lt;span class='o'&gt;::&lt;/span&gt;&lt;span class='no'&gt;Document&lt;/span&gt;

  &lt;span class='n'&gt;key&lt;/span&gt; &lt;span class='ss'&gt;:first_name&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nb'&gt;String&lt;/span&gt;
  &lt;span class='n'&gt;key&lt;/span&gt; &lt;span class='ss'&gt;:last_name&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nb'&gt;String&lt;/span&gt;
  &lt;span class='n'&gt;key&lt;/span&gt; &lt;span class='ss'&gt;:age&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nb'&gt;Integer&lt;/span&gt;
  &lt;span class='n'&gt;key&lt;/span&gt; &lt;span class='ss'&gt;:born_at&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='no'&gt;Time&lt;/span&gt;
  &lt;span class='n'&gt;key&lt;/span&gt; &lt;span class='ss'&gt;:active&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='no'&gt;Boolean&lt;/span&gt;
  &lt;span class='n'&gt;key&lt;/span&gt; &lt;span class='ss'&gt;:fav_colors&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='nb'&gt;Array&lt;/span&gt;
&lt;span class='k'&gt;end&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;I hope this project becomes a huge success in the Rails community.&lt;/p&gt;</content>
 </entry>
 
 <entry>
  <title>my_blog.refresh</title>
  <link href="http://lmarburger.github.com/2009/06/my-blog-refresh.html" />
  <updated>2009-06-28T00:00:00-07:00</updated>
  <id>http://lmarburger.github.com/2009/06/my-blog-refresh</id>
  <content type="html">&lt;p&gt;Not a visual refresh&amp;#8211;although the design was rebuilt using &lt;a href='http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html'&gt;Sass&lt;/a&gt; and the &lt;a href='http://www.blueprintcss.org'&gt;Blueprint CSS framework&lt;/a&gt; with the help of the &lt;strong&gt;amazing&lt;/strong&gt; &lt;a href='http://github.com/chriseppstein/compass'&gt;Compass&lt;/a&gt; project (&lt;a href='http://twitter.com/chriseppstein'&gt;Chris Eppstein&lt;/a&gt;, you rock. Seriously.)&amp;#8211;but more of a purpose refresh. It&amp;#8217;s apparent I&amp;#8217;m not able to write long-winded blog posts with any level of consistency, but I have no trouble &lt;a href='http://followcost.com/lmarburger'&gt;tweeting 0.62 times daily&lt;/a&gt;. I&amp;#8217;ll attempt to strike a balance somewhere between and hope for the best.&lt;/p&gt;

&lt;p&gt;Part of the problem can be attributed to coding my own blog. It was my first deployed Rails project and I thoroughly enjoyed the experience, but I soon realized I have no desire whatsoever in maintaining the code base. I&amp;#8217;ve been keeping my eye on &lt;a href='http://github.com/mojombo/jekyll'&gt;Jekyll&lt;/a&gt; for a while and with the release of &lt;a href='http://pages.github.com'&gt;GitHub Pages&lt;/a&gt; I think it&amp;#8217;s about time I make the switch. I&amp;#8217;m still undecided how I feel about the dynamic content on the site having to be loaded ajaxily, but with any luck I&amp;#8217;ll manage to get over it.&lt;/p&gt;</content>
 </entry>
 
 
</feed>
