<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Wood for the Trees: Syspec: System Specifications &amp; Tests using a Rake-like batch file</title>
    <link>http://www.mathewabonyi.com/articles/2007/02/10/syspec-system-specifications-tests-using-a-rake-like-batch-file</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>struggling to dig life</description>
    <item>
      <title>Syspec: System Specifications &amp;amp; Tests using a Rake-like batch file</title>
      <description>&lt;p&gt;Syspec lets you write a batch file a lot like a Rake file, but in common &lt;span class="caps"&gt;HTTP&lt;/span&gt;-style language, to test the existence and proper functioning of all the domains, subdomains, their pages and responses. This project is still very much in its infancy, but I decided to get it out there to get some feedback while I use it to track production servers. This is a sample Syspecfile:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;check&lt;/span&gt; &lt;span class="symbol"&gt;:&amp;quot;&lt;/span&gt;&lt;span class="symbol"&gt;www.rubyonrails.org&lt;/span&gt;&lt;span class="symbol"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;accept&lt;/span&gt; &lt;span class="number"&gt;200&lt;/span&gt;
  &lt;span class="ident"&gt;get&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
  &lt;span class="ident"&gt;accept&lt;/span&gt; &lt;span class="number"&gt;404&lt;/span&gt;
  &lt;span class="ident"&gt;get&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/syspec&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
  &lt;span class="ident"&gt;get&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/lacrima&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;The above will check that http://www.rubyonrails.org/ responds with 200 and http://www.rubyonrails.org/syspec and http://www.rubyonrails.org/lacrima respond with 404. You can have multiple checks with the same domain and it does not have to be a symbol, though I prefer it that way.&lt;/p&gt;


Currently, Syspec features the following:
	&lt;ul&gt;
	&lt;li&gt;accept(*codes) &amp;#8211; response code should be among these codes&lt;/li&gt;
		&lt;li&gt;get, post, delete, put (uses fetch(:request_method, url))&lt;/li&gt;
	&lt;/ul&gt;


Upcoming features:
	&lt;ul&gt;
	&lt;li&gt;login &amp;#8220;username&amp;#8221;, &amp;#8220;password&amp;#8221; &lt;/li&gt;
		&lt;li&gt;body matching&lt;/li&gt;
		&lt;li&gt;forms&lt;/li&gt;
	&lt;/ul&gt;


You can grab a copy of it directly from my &lt;span class="caps"&gt;SVN&lt;/span&gt; repository here:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;  svn co http://mabs29.googlecode.com/svn/trunk/gems/syspec .&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

Or download the gem from within the &lt;span class="caps"&gt;SVN&lt;/span&gt; repository (later will be moved to rubyforge):
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_shell "&gt;  svn export http://mabs29.googlecode.com/svn/trunk/gems/syspec/versions/syspec-0.2.1.gem .&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Enjoy!&lt;/p&gt;</description>
      <pubDate>Sat, 10 Feb 2007 15:45:43 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:849362c7-daa9-461c-a463-b88f0e405482</guid>
      <author>Mathew Abonyi</author>
      <link>http://www.mathewabonyi.com/articles/2007/02/10/syspec-system-specifications-tests-using-a-rake-like-batch-file</link>
      <category>Ruby</category>
      <category>Gems</category>
      <trackback:ping>http://www.mathewabonyi.com/articles/trackback/47</trackback:ping>
    </item>
  </channel>
</rss>
