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

  <title><![CDATA[Redline Software Inc. - Winnipeg's Leader in Ruby on Rails Development]]></title>
  <link href="http://redlinesoftware.com/atom.xml" rel="self"/>
  <link href="http://redlinesoftware.com/"/>
  <updated>2012-03-14T22:10:20-05:00</updated>
  <id>http://redlinesoftware.com/</id>
  <author>
    <name><![CDATA[Redline Software Inc.]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Snap Chop adds a new member to the family]]></title>
    <link href="http://redlinesoftware.com/blog/2012/03/14/snap-chop-adds-a-new-member-to-the-family/"/>
    <updated>2012-03-14T22:01:00-05:00</updated>
    <id>http://redlinesoftware.com/blog/2012/03/14/snap-chop-adds-a-new-member-to-the-family</id>
    <content type="html"><![CDATA[<p>We&#8217;d like to announce a new member to the Snap Chop family&#8230; <strong>Snap Chop: Baby Edition!</strong></p>

<p>For all those precious bundles of joy in your life, capture their growing years Snap Chop style!</p>

<p>Now available in the <a href="http://itunes.apple.com/us/app/snap-chop-baby-edition/id508465817?ls=1&amp;mt=8">App Store</a> for your iPhone.</p>

<p>For more information check out <a href="http://snapchop.me">snapchop.me</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ASP.Net MVC vs Ruby on Rails Smackdown Results]]></title>
    <link href="http://redlinesoftware.com/blog/2012/01/26/asp-dot-net-mvc-vs-ruby-on-rails-smackdown-results/"/>
    <updated>2012-01-26T10:02:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2012/01/26/asp-dot-net-mvc-vs-ruby-on-rails-smackdown-results</id>
    <content type="html"><![CDATA[<p>Last night I attended the <a href="http://www.winnipegdotnet.org/Home.aspx">Winnipeg .NET user group</a> to take part in a &#8220;Smackdown&#8221; between ASP.Net MVC and my beloved <a href="http://rubyonrails.org">Ruby on Rails</a>.
As instructed, I brought a helmet and a bulletproof vest, but it turns out the .NET group was way more friendly than advertised! It was a lot of fun and I hope people enjoyed it.</p>

<p><a href="http://jameschambers.com/">James Chambers</a> was a great co-presenter and I had a lot of fun comparing the frameworks with him!</p>

<p>So who won?</p>

<!-- more -->


<p>The original plan was to have both of us coding at the same time, but unfortunately that couldn&#8217;t work because we only had one projector. Instead, we both pre-coded a small application
and then took turns demoing the various parts of the frameworks. We broke down the presentation into several &#8220;iterations&#8221; and <a href="http://twitter.com/#!/abarylko">Amir Barylko</a> orchestrated the event.</p>

<h2>Iterations</h2>

<h3>Round 1 - Bootstrapping</h3>

<ul>
<li>How do I generate a new application?</li>
<li>What about dependencies?</li>
<li>Code generation?</li>
<li>Scripts for automation?</li>
</ul>


<p>For this round, I mostly showed the rails command line, how to create a new application and a quick demo of the rake tasks.
I also generated a scaffold, even though I never use scaffolding anymore.</p>

<h3>Round 2 - ORM and Database changes</h3>

<ul>
<li>How do I map entities to the db?</li>
<li>Is that a default ?</li>
<li>Any particular pattern?</li>
<li>What about associations?</li>
</ul>


<p>In this round I showed a very brief tour of Rails&#8217; ActiveRecord. I showed how to associate two models together and I demoed migrations.</p>

<h3>Round 3 - MVC - Routing</h3>

<ul>
<li>Where are the Models, Views and Controllers</li>
<li>Can I generate them?</li>
<li>How&#8217;s the routing implemented</li>
<li>What about REST?</li>
<li>What about JS requests?</li>
<li>JSON Support?</li>
</ul>


<p>We dug into a lot of the &#8220;convention over configuration&#8221; ideas in Rails here, with a demo of the MVC portions of Rails.</p>

<h3>Round 4 - Testing</h3>

<ul>
<li>What do you get out of the box?</li>
<li>Is it easy to setup?</li>
<li>What about TDD?</li>
<li>What about BDD?</li>
</ul>


<p>I explained here that Ruby has a deep love for testing. It&#8217;s baked into the language and comes with Rails too.
I also showed RSpec as my preferred alternative for testing, but really both are great.
I also showed some Cucumber scenarios.</p>

<h3>Round 5 - Deployment</h3>

<ul>
<li>What do you need to setup to deploy?</li>
<li>Is it automated?</li>
<li>What are the most common options?</li>
</ul>


<p>I demoed this by deploying to Heroku but in retrospect I should have done a Capistrano demonstration. Either way, it&#8217;s very easy to deploy your Rails application with 1 command.</p>

<h2>So who won? Audience voting</h2>

<p>Screenshot below from Amir&#8217;s count so that you don&#8217;t say I fudged the numbers :)</p>

<p><img src="http://redlinesoftware.com/assets/2012/01/26/smackdown_results.jpg" alt="results" /></p>

<h2>Conclusion</h2>

<p>You can build great stuff on any platform now a days. It&#8217;s cool to see what &#8220;the other frameworks&#8221; are doing to see what we can learn from them. If you&#8217;re a .NET dev, play with
Rails and check it out!</p>

<h3>Some links from the presentation:</h3>

<ul>
<li>Rails Demo app: <a href="http://pomodoroz.herokuapp.com/">http://pomodoroz.herokuapp.com/</a></li>
<li>Rails App source code: <a href="https://github.com/marcjeanson/Pomodoroz">https://github.com/marcjeanson/Pomodoroz</a></li>
<li>.NET Demo app: <a href="http://winnipegtomatoes.apphb.com/">http://winnipegtomatoes.apphb.com/</a></li>
<li>.NET App source code: <a href="http://winnipegtomatoes.codeplex.com/">http://winnipegtomatoes.codeplex.com/</a></li>
</ul>


<p>If you were there and have feedback, please leave some comments.</p>

<p>Thanks to the .NET UG for having me!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ASP.NET MVC vs Ruby on Rails Smackdown]]></title>
    <link href="http://redlinesoftware.com/blog/2012/01/17/asp-dot-net-mvc-vs-ruby-on-rails-smackdown/"/>
    <updated>2012-01-17T10:44:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2012/01/17/asp-dot-net-mvc-vs-ruby-on-rails-smackdown</id>
    <content type="html"><![CDATA[<p>At this month&#8217;s <a href="http://www.winnipegdotnet.org/Home.aspx">Winnipeg .Net User Group</a> meetup, I&#8217;ll be participating in a &#8220;smackdown&#8221; between Ruby on Rails and ASP.net MVC.</p>

<!-- more -->


<p>I&#8217;ll be in the Ruby on Rails corner obviously, and <a href="http://jameschambers.com/blog/asp.net-mvc-ruby-on-rails-smackdown">James Chambers</a> will be showing off the ASP.net MVC. The idea is to compare the frameworks and hopefully learn the benefits that each framework as to offer.
The referee will be <a href="http://twitter.com/#!/abarylko">Amir Barylko</a> and he&#8217;ll try to keep this thing under control.</p>

<p>I have a feeling it will sorta end up like the end of Rocky IV. Rocky (Ruby on Rails) goes into Russia (.net UG), is hated at first, but then after beating down Drago (ASP.net) the fans switch sides. (hopefully nobody gets brain damage in the sequel)</p>

<p>If you would like to attend, you can register <a href="http://mvc-ruby-smackdown.eventbrite.com/">here</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Snap Chop in the top 300 entertainment iPhone apps]]></title>
    <link href="http://redlinesoftware.com/blog/2012/01/16/snap-chop-in-the-top-300-entertainment-iphone-apps/"/>
    <updated>2012-01-16T22:21:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2012/01/16/snap-chop-in-the-top-300-entertainment-iphone-apps</id>
    <content type="html"><![CDATA[<p>Over the last week or so, <a href="http://snapchop.me">Snap Chop</a> has been selling like hot cakes! We are currently in the top 300 paid entertainment iPhone apps according to <a href="http://www.iosnoops.com/apps-charts/iphone/entertainment/paid/sort-by-rank">www.iosnoops.com</a>.</p>

<p>If you bought <a href="http://snapchop.me">Snap Chop</a>, thanks for your support! If you haven&#8217;t yet, what are you waiting for? Don&#8217;t you like funny stuff?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Intro to BDD presentation]]></title>
    <link href="http://redlinesoftware.com/blog/2012/01/15/intro-to-bdd-presentation/"/>
    <updated>2012-01-15T18:02:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2012/01/15/intro-to-bdd-presentation</id>
    <content type="html"><![CDATA[<p>Last week I did a presentation at the <a href="http://agilewinnipeg.com/">Winnipeg Agile User Group</a> on Behaviour Driven Development.
There will be a video of the presentation posted soon, but for now here are the <a href="http://redlinesoftware.com/assets/2012/01/15/intro_bdd_agile_wpg.pdf">slides</a>.</p>

<!-- more -->


<p>If you are interested in getting started with BDD here are some resources:</p>

<ul>
<li>The RSpec Book: Behaviour Driven Development with Rspec, Cucumber, and Friends (David Chelimsky)</li>
<li>The Cucumber Book: Behaviour-Driven Development for Testers and Developers (Matt Wynne and Aslak Hellesoy)</li>
</ul>


<p>Other good stuff:</p>

<ul>
<li>Test Driven Development: By Example (Kent Beck)</li>
<li>Clean Code: A Handbook of Agile Software Craftsmanship (Robert Martin)</li>
<li>Working Effectively with Legacy Code (Michael Feathers)</li>
</ul>


<p>Screencasts:</p>

<ul>
<li><a href="http://www.cleancoders.com/">http://www.cleancoders.com</a></li>
<li><a href="http://www.destroyallsoftware.com">http://www.destroyallsoftware.com</a></li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Snap Chop Lite for Android]]></title>
    <link href="http://redlinesoftware.com/blog/2011/07/08/snap-chop-lite-for-android/"/>
    <updated>2011-07-08T02:23:00-05:00</updated>
    <id>http://redlinesoftware.com/blog/2011/07/08/snap-chop-lite-for-android</id>
    <content type="html"><![CDATA[<p>We&#8217;ve released a free, ad-supported and fully functional version of Snap Chop for Android called <strong>Snap Chop Lite</strong>.  Check it out in the <a href="https://market.android.com/details?id=com.redlinesoftware.snapchop.free">Android Marketplace</a>.</p>
<p>Also check out a free demo at <a href="http://snapchop.me">snapchop.me</a></p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New Release: Snap Chop mobile app]]></title>
    <link href="http://redlinesoftware.com/blog/2011/05/24/new-release-snap-chop-mobile-app/"/>
    <updated>2011-05-24T10:10:00-05:00</updated>
    <id>http://redlinesoftware.com/blog/2011/05/24/new-release-snap-chop-mobile-app</id>
    <content type="html"><![CDATA[<p>Redline Software has released its premier mobile app for iPhone &amp; Android. It&#8217;s stupid, smart, awesome, immature, and hilarious all in one.</p>
<p>We develop a lot of business related software, so we found it time to do something a bit less serious with the release of Snap Chop.  Check it out at <a href="http://www.snapchop.me">http://www.snapchop.me</a>.</p>
<p>Snap Chop is available for your iPhone/iPad or Android device.</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Ruby Syntax Tip]]></title>
    <link href="http://redlinesoftware.com/blog/2011/03/06/ruby-syntax-tip/"/>
    <updated>2011-03-06T21:19:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2011/03/06/ruby-syntax-tip</id>
    <content type="html"><![CDATA[<p>I&#8217;ve had quite a few moments while using Ruby when I decide to try to write something that I think should be valid Ruby without knowing if it actually is and it ends up working.</p>
<p>Here&#8217;s one of my latest finds using <strong>for</strong> loops&#8230;</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'>  <span class="k">for</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span> <span class="k">in</span> <span class="o">[[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="o">]</span><span class="p">,</span> <span class="o">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="o">]</span><span class="p">,</span> <span class="o">[</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">9</span><span class="o">]]</span>
</span><span class='line'>    <span class="nb">puts</span> <span class="s2">&quot;</span><span class="si">#{</span><span class="n">a</span><span class="si">}</span><span class="s2">, </span><span class="si">#{</span><span class="n">b</span><span class="si">}</span><span class="s2">, </span><span class="si">#{</span><span class="n">c</span><span class="si">}</span><span class="s2">&quot;</span>
</span><span class='line'>  <span class="k">end</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>Results in&#8230;</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'>  <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span>
</span><span class='line'>  <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span>
</span><span class='line'>  <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>The for loop lets you can assign multiple values at the same time which is exactly what you can do with arrays with basic assignment elsewhere in Ruby code.</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'>  <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span> <span class="o">=</span> <span class="o">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="o">]</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>I knew I could assign multiple values from an array like this, but had never tried it in a for loop before.  Ruby ftw!</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Url menu items]]></title>
    <link href="http://redlinesoftware.com/blog/2011/02/13/url-menu-items/"/>
    <updated>2011-02-13T18:21:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2011/02/13/url-menu-items</id>
    <content type="html"><![CDATA[<p>We&#8217;ve added a small new feature to Redzone.  You can now create menu items that link to external pages just by specifying a url for the menu item.</p>
<p>Enjoy.</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New email function]]></title>
    <link href="http://redlinesoftware.com/blog/2010/11/09/new-email-function/"/>
    <updated>2010-11-09T00:12:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2010/11/09/new-email-function</id>
    <content type="html"><![CDATA[<p>We&#8217;ve added a new email function to Redzone.  You can now email all players for a given season.  The link is accessible from the users and divisions pages.</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Redzone forum issues]]></title>
    <link href="http://redlinesoftware.com/blog/2010/09/27/redzone-forum-issues/"/>
    <updated>2010-09-27T22:29:00-05:00</updated>
    <id>http://redlinesoftware.com/blog/2010/09/27/redzone-forum-issues</id>
    <content type="html"><![CDATA[<p>Apologies if anybody has had issues posting to our <a href="http://forum.redzoneleagues.com">Redzone Forum</a>, but I think we&#8217;ve resolved any outstanding issues with it.</p>
<p>Thanks</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Redzone Leagues Migration and Updates]]></title>
    <link href="http://redlinesoftware.com/blog/2010/06/24/redzone-leagues-migration-and-updates/"/>
    <updated>2010-06-24T12:50:00-05:00</updated>
    <id>http://redlinesoftware.com/blog/2010/06/24/redzone-leagues-migration-and-updates</id>
    <content type="html"><![CDATA[<h2>Redzone gets a new home</h2>
<p>We&#8217;ve recently migrated Redzone to a new data center to improve reliability and performance. To keep up to date on the service status please follow us on twitter <a href="http://twitter.com/redzoneleagues">@redzoneleagues</a>. Leagues with custom domain names have been contacted with the <span class="caps">DNS</span> changes you will need to make, but if you are having problems please contact us support@redzoneleagues.com.</p>
<h2>User Configurable Statistics</h2>
<p>We&#8217;ve added support for user configurable statistics. This only applies to stats for certain sports, so you may not see this in use for your league at the moment.  Some statistic calculations vary depending on league, so now a league should be able to configure one of the configurable stats to their needs.  An example of this is goals against average in hockey; this calculation uses the game length in minutes which could vary between leagues. To see the available statistics options for your league, click on &#8220;Statistics Management&#8221; under your admin dashboard.</p>
<h2>Multiple Active Seasons</h2>
<p>Redzone previously had a limitation of one active season at anytime. Many of our leagues were trying to host tournaments during their season or had multiple seasons going on at the same time, so we&#8217;ve added support for this. You can setup your seasons under the admin dashboard.</p>
<h2>Upcoming Updates</h2>
<p>We have additional features in the works, so stay tuned for more frequent updates. If you&#8217;d like to comment or make requests for upcoming features, please either leave a comment in the blog or post a message in our <a href="http://redzoneleagues.com/forum">forums</a></p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[CSS Asset Tagger Rails Plugin]]></title>
    <link href="http://redlinesoftware.com/blog/2009/12/03/css-asset-tagger-rails-plugin/"/>
    <updated>2009-12-03T02:31:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2009/12/03/css-asset-tagger-rails-plugin</id>
    <content type="html"><![CDATA[<p>We&#8217;ve released a new plugin for Rails that adds asset timestamps to assets found in an apps stylesheets.</p>
<p>The plugin is available at <a href="http://github.com/redlinesoftware/css_asset_tagger">http://github.com/redlinesoftware/css_asset_tagger</a></p>
<p>Simply install the plugin and it will tag any assets in your css files with asset timestamps.  More information on asset timestamps can be found at <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html">http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html</a></p>
<p>We wrote a previous <a href="http://weblog.redlinesoftware.com/2009/1/25/nginx-expiry-for-ruby-on-rails">article</a> on using asset timestamps with nginx, but similar usage applies to Apache as well for example.</p>
<p>The main purpose for writing this plugin is that stylesheets that use images for various things don&#8217;t get tagged with the asset timestamps when they&#8217;re written as plain old css files.  These images can&#8217;t make use of expiration techniques very easily without the timestamps.  So to make things work as they do with images in rails views, this plugin will add the same timestamps to assets in css files as they are in rails views.</p>
<p>Before&#8230;<br />
<div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='css'><span class='line'><span class="nf">#navigation_bar</span> <span class="p">{</span>
</span><span class='line'>  <span class="k">background-image</span><span class="o">:</span> <span class="sx">url(/images/background-nav.png)</span><span class="p">;</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>After&#8230;<br />
<div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='css'><span class='line'><span class="nf">#navigation_bar</span> <span class="p">{</span>
</span><span class='line'>  <span class="k">background-image</span><span class="o">:</span> <span class="sx">url(/images/background-nav.png?1234567890)</span><span class="p">;</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>If you&#8217;re using <a href="http://developer.yahoo.com/yslow/">yslow</a> and some decent expiration on the server and you don&#8217;t like seeing images from your css files being shown in your report card, this plugin should make those all go away and hopefully give you a better grade. :)</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Lacrosse Support in Redzone]]></title>
    <link href="http://redlinesoftware.com/blog/2009/11/12/lacrosse-support-in-redzone/"/>
    <updated>2009-11-12T11:25:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2009/11/12/lacrosse-support-in-redzone</id>
    <content type="html"><![CDATA[<p>We&#8217;ve added support for Lacrosse to Redzone.  If you or somebody you know has a Lacrosse league, sign up and check it out.</p>
<p>Quick update to hockey; we&#8217;ve added support for +/- stats as well.</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Redzone Updates: Multiple positions and Team statistics]]></title>
    <link href="http://redlinesoftware.com/blog/2009/11/06/statistic-updates-multiple-positions-and-team-statistics/"/>
    <updated>2009-11-06T00:09:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2009/11/06/statistic-updates-multiple-positions-and-team-statistics</id>
    <content type="html"><![CDATA[<p>We&#8217;ve just deployed some major updates to Redzone&#8217;s statistics.  These include support for multiple positions as well as team related statistics in addition to the player statistics that were only supported before.</p>
<p>We&#8217;ve added new statistics to some of the sports, so you check for those in the &#8220;Statistics Management&#8221; section of the admin dashboard.  If there are statistics that you don&#8217;t see, but would like to see added then just send us an email at <a href="mailto://support@redzoneleagues.com">support@redzoneleagues.com</a> and let us know what additional stats you would like to see.</p>
<p>The game cards haven&#8217;t been updated to support the addition of multiple positions yet, but this will be supported in an upcoming release.  If your league doesn&#8217;t track stats for more than one position then you&#8217;ll be fine with the current game cards.</p>
<p>We&#8217;ve made some changes to the standings calculations. Points can now be awarded to teams for Overtime losses. This is a common theme in hockey where shootouts occur.</p>
<p>The forums display a users profile picture (avatar) along with their post count.</p>
<p>Other minor changes and fixes have been made as well and we have a few more quick updates coming in the next few weeks; mainly the addition of some new statistics.</p>
<p>Since this is fairly large update, there may be some minor issues that may appear, so if you notice any inconsistencies or issues with any of the statistic values, please let us know and we&#8217;ll correct the issues as soon as we can.  You can do so by posting a message in our <a href="http://forum.redzoneleagues.com">forums</a> or by sending us an email.</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Silencing DB messages during tests]]></title>
    <link href="http://redlinesoftware.com/blog/2009/06/21/silencing-db-messages-during-tests/"/>
    <updated>2009-06-21T17:35:00-05:00</updated>
    <id>http://redlinesoftware.com/blog/2009/06/21/silencing-db-messages-during-tests</id>
    <content type="html"><![CDATA[<p>When running tests in Rails, sometimes you need to perform various tasks in the database directly which can lead to a lot of unwanted messages in your test output.</p>
<p>If you&#8217;re using Postgresql, simply add the following line to your <code>tests/tests_helper.rb</code> file.</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="no">ActiveRecord</span><span class="o">::</span><span class="no">Base</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">execute</span> <span class="s2">&quot;set client_min_messages to ERROR&quot;</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>Now you&#8217;ll only see messages of <span class="caps">ERROR</span> and above in your test output.</p>
<h1>Update</h1>
<p>Found a better way to do this.  In your database.yml file, simply add the following line to your :test section.</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'>  <span class="l-Scalar-Plain">min_messages</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">ERROR</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Plugins moved to Github]]></title>
    <link href="http://redlinesoftware.com/blog/2009/06/21/plugins-moved-to-github/"/>
    <updated>2009-06-21T15:35:00-05:00</updated>
    <id>http://redlinesoftware.com/blog/2009/06/21/plugins-moved-to-github</id>
    <content type="html"><![CDATA[<p>We finally got around to moving our plugins from our old <span class="caps">SVN</span> machine into Github. Although we&#8217;ve been using Git for a long time, we were slow on moving our plugins for some reason.</p>
<p><a href="http://github.com/redlinesoftware">github.com/redlinesoftware</a></p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Team Registration Changes]]></title>
    <link href="http://redlinesoftware.com/blog/2009/04/04/team-registration-changes/"/>
    <updated>2009-04-04T10:03:00-05:00</updated>
    <id>http://redlinesoftware.com/blog/2009/04/04/team-registration-changes</id>
    <content type="html"><![CDATA[<p>A minor change has been made to Redzone Leagues with regards to the team signup process. When a user registers a team, they will now receive an confirmation email with an activation link that they will need to load in order to complete the registration process.</p>
<p>The reason for this change was to ensure that team representatives have current email addresses entered into the system. League administrators often need to contact team representatives, so we want to make sure those emails are as current as possible. As always, users can update their email address by clicking &#8220;My Profile&#8221; at the top of the site. If they need to resend a team activation email, they can do so from their &#8220;My Teams&#8221; page, which is linked at the top of the site after they create a team.</p>
<p>If you are a league administrator adding a new team, you will not need to complete the activation process. This is done to make the team creation by administrators as quick as possible.</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Extending Named Scopes]]></title>
    <link href="http://redlinesoftware.com/blog/2009/02/14/extending-named-scopes/"/>
    <updated>2009-02-14T00:28:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2009/02/14/extending-named-scopes</id>
    <content type="html"><![CDATA[<p>Quick code tip&#8230;</p>
<p>I&#8217;m using <code>named_scope</code> with a lambda as the 2nd paramater, but I also want to extend the <code>named_scope</code> with some custom methods.</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">named_scope</span> <span class="ss">:for_league</span><span class="p">,</span> <span class="nb">lambda</span><span class="p">{</span><span class="o">|</span><span class="n">league_id</span><span class="o">|</span> <span class="p">{</span><span class="n">league</span> <span class="n">conditions</span><span class="p">}</span> <span class="p">}</span> <span class="k">do</span>
</span><span class='line'>  <span class="k">def</span> <span class="nf">default</span>
</span><span class='line'>  <span class="k">end</span>
</span><span class='line'>  <span class="k">def</span> <span class="nf">do_something_custom</span>
</span><span class='line'>  <span class="k">end</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>I use the same extended methods in more than one place, so I figured I&#8217;d use something similar to the <code>:extend</code> option used with association methods like <code>has_many</code>, but I can&#8217;t pass an <code>:extend</code> option if I&#8217;m also using a lambda.</p>
<p>The way around this is to just include the methods directly in the block.</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="k">module</span> <span class="nn">Associations</span>
</span><span class='line'>  <span class="k">def</span> <span class="nf">default</span>
</span><span class='line'>  <span class="k">end</span>
</span><span class='line'>  <span class="k">def</span> <span class="nf">do_something_custom</span>
</span><span class='line'>  <span class="k">end</span>
</span><span class='line'><span class="k">end</span>
</span><span class='line'>
</span><span class='line'><span class="n">named_scope</span> <span class="ss">:for_league</span><span class="p">,</span> <span class="nb">lambda</span><span class="p">{</span><span class="o">|</span><span class="n">league_id</span><span class="o">|</span> <span class="p">{</span><span class="n">league</span> <span class="n">conditions</span><span class="p">}</span> <span class="p">}</span> <span class="k">do</span>
</span><span class='line'>  <span class="kp">include</span> <span class="no">Associations</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>Works like a charm.  Now I can just reuse the <code>Associations</code> module where I need it.</p>]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Nginx expiry for Ruby on Rails]]></title>
    <link href="http://redlinesoftware.com/blog/2009/01/25/nginx-expiry-for-ruby-on-rails/"/>
    <updated>2009-01-25T02:48:00-06:00</updated>
    <id>http://redlinesoftware.com/blog/2009/01/25/nginx-expiry-for-ruby-on-rails</id>
    <content type="html"><![CDATA[<p>Many examples I see for setting the expiry header with Nginx look something like this&#8230;</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>location ~* (stylesheets|javascripts|images) {
</span><span class='line'>  if (-f $request_filename) {
</span><span class='line'>    expires max;
</span><span class='line'>    break;
</span><span class='line'>  }
</span><span class='line'>}</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>This example runs a regex against the location of the incoming query for a path that contains one of the rails asset types.  If the requested file exists then the expiry header is set.  <strong>max</strong> here just tells the server to set the expiry date to the maximum value possible.  You can set it to 10 years or any number of days if you prefer.</p>
<p>The issue with this is approach is that it is a &#8220;catch all&#8221; and ignores the query string on an asset if one exists.  Both <code>/stylesheets/styles.css?1234567890</code> and <code>/stylesheets/styles.css</code> are treated the same using this method of expiry.</p>
<p>If an asset is retrieved from the server (query string or not) and the expires header is set, the next time the file is referenced in the browser, the file will be loaded from the browser cache instead of the server.  Now if the asset is modified on the server, rails will update the query string and the browser will recognize the difference and re-fetch it from the server.  For the assets that don&#8217;t have an associated query string (like <code>/stylesheets/styles.css</code>), the browser will have no idea anything has changed and still load the file from it&#8217;s cache.  This can cause styles or scripts to go out of sync between the server and the browser causing some nasty issues for the user.</p>
<p>So essentially, we only want to set the expires header on the assets that have a query string and <em>not</em> set the expires header on assets that don&#8217;t have one.  This way the browser will always retrieve the most up to date version of a file.</p>
<p>What we&#8217;re looking for are <strong>2 conditions</strong> that need to be satisfied before we set the expires header:</p>
<ol>
	<li>The file is one of the asset types</li>
	<li>The query string contains the 10 digit timestamp</li>
</ol>
<p>So let&#8217;s update the config to only set the expires header on asset files that have the 10 digit query string.</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>location ~* (stylesheets|javascripts|images) {
</span><span class='line'>  if (!-f $request_filename) {
</span><span class='line'>    break;
</span><span class='line'>  }
</span><span class='line'>  if ($query_string ~* "^[0-9]{10}$") {
</span><span class='line'>    expires max;
</span><span class='line'>    break;
</span><span class='line'>  }
</span><span class='line'>}</span></code></pre></td></tr></table></div></figure></div></notextile></p>
<p>Here we use the same regex as before to find one of the asset types, but now instead of checking if the file exists, we check if it doesn&#8217;t exist.  If the file doesn&#8217;t exist, we break out and don&#8217;t set the expires header which is fine.  If the file does exist, then we don&#8217;t break, but continue evaluating our conditions because we&#8217;ve now satisfied <strong>condition 1</strong> as we are looking at one of our asset files.  The next thing we do is check the query string for a 10 digit pattern.  If the check is successful then we&#8217;ve also satisfied <strong>condition 2</strong> and can set the expires header for the file.</p>
<p>Now when we update an asset file on the server and Rails updates the query string, the server will re-fetch the file and set a new expires value&#8230; perfect.</p>
<p>If you want to check the file extension instead of their directories, you can use the following configuration instead.  Note the location regex change.</p>
<p><div class='bogus-wrapper'><notextile><figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>location ~* \.(js|css|jpg|jpeg|gif|png)$ {
</span><span class='line'>  if (!-f $request_filename) {
</span><span class='line'>    break;
</span><span class='line'>  }
</span><span class='line'>  if ($query_string ~* "^[0-9]{10}$") {
</span><span class='line'>    expires      max;
</span><span class='line'>    break;
</span><span class='line'>  }
</span><span class='line'>}</span></code></pre></td></tr></table></div></figure></div></notextile></p>]]></content>
  </entry>
  
</feed>

