<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,9 +5,14 @@ module StaticActions
     end
     
     def static_action(controller, action)
-      path = (action.to_s == 'index' ? controller.to_s : &quot;#{controller}/#{action}&quot;)
-      send(&quot;#{controller}_#{action}&quot;, path, :controller =&gt; controller.to_s, :action =&gt; action.to_s)
-      send(&quot;#{controller}_#{action}_with_format&quot;, &quot;#{path}.:format&quot;, :controller =&gt; controller.to_s, :action =&gt; action.to_s) unless VERSION &gt;= '2.3'
+      if Rails::VERSION::STRING &lt; '2.3'
+        path = (action.to_s == 'index' ? controller.to_s : &quot;#{controller}/#{action}&quot;)
+        send(&quot;#{controller}_#{action}&quot;, path, :controller =&gt; controller.to_s, :action =&gt; action.to_s)
+        send(&quot;#{controller}_#{action}_with_format&quot;, &quot;#{path}.:format&quot;, :controller =&gt; controller.to_s, :action =&gt; action.to_s)
+      else
+        path = (action.to_s == 'index' ? controller.to_s : &quot;#{controller}/#{action}&quot;)
+        send(&quot;#{controller}_#{action}&quot;, &quot;#{path}.:format&quot;, :controller =&gt; controller.to_s, :action =&gt; action.to_s)
+      end
     end
     
     def root_static_actions(controller, actions)
@@ -18,8 +23,12 @@ module StaticActions
       if action.to_s == 'index'
         root :controller =&gt; controller.to_s
       else
-        send(&quot;#{action}&quot;, action.to_s, :controller =&gt; controller.to_s, :action =&gt; action.to_s)
-        send(&quot;#{action}_with_format&quot;, &quot;#{action.to_s}.:format&quot;, :controller =&gt; controller.to_s, :action =&gt; action.to_s) unless VERSION &gt;= '2.3'
+        if Rails::VERSION::STRING &lt; '2.3'
+          send(&quot;#{action}&quot;, action.to_s, :controller =&gt; controller.to_s, :action =&gt; action.to_s)
+          send(&quot;#{action}_with_format&quot;, &quot;#{action.to_s}.:format&quot;, :controller =&gt; controller.to_s, :action =&gt; action.to_s)
+        else
+          send(&quot;#{action}&quot;, &quot;#{action.to_s}.:format&quot;, :controller =&gt; controller.to_s, :action =&gt; action.to_s)
+        end
       end
     end
   end</diff>
      <filename>lib/static_actions/map_additions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,7 @@ require 'active_support'
 require 'active_record'
 require 'action_controller'
 require 'action_view'
+require 'rails/version'
 require File.dirname(__FILE__) + '/../lib/static_actions.rb'
 
 Spec::Runner.configure do |config|</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,23 +10,36 @@ describe StaticActions::MapAdditions do
   end
   
   it &quot;should call foo_bar on @map when passing foo as controller and bar as action&quot; do
-    @map.expects(:foo_bar).with('foo/bar', :controller =&gt; 'foo', :action =&gt; 'bar')
+    if Rails::VERSION::STRING &lt; '2.3'
+      @map.expects(:foo_bar).with('foo/bar', :controller =&gt; 'foo', :action =&gt; 'bar')
+    else
+      @map.expects(:foo_bar).with('foo/bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar')
+    end
     @map.static_actions :foo, [:bar]
   end
   
   it &quot;should be able to pass multiple actions&quot; do
-    @map.expects(:foo_bar).with('foo/bar', :controller =&gt; 'foo', :action =&gt; 'bar')
-    @map.expects(:foo_blah).with('foo/blah', :controller =&gt; 'foo', :action =&gt; 'blah')
+    if Rails::VERSION::STRING &lt; '2.3'
+      @map.expects(:foo_bar).with('foo/bar', :controller =&gt; 'foo', :action =&gt; 'bar')
+      @map.expects(:foo_blah).with('foo/blah', :controller =&gt; 'foo', :action =&gt; 'blah')
+    else
+      @map.expects(:foo_bar).with('foo/bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar')
+      @map.expects(:foo_blah).with('foo/blah.:format', :controller =&gt; 'foo', :action =&gt; 'blah')
+    end
     @map.static_actions :foo, [:bar, :blah]
   end
   
   it &quot;should not display index action in path&quot; do
-    @map.expects(:foo_index).with('foo', :controller =&gt; 'foo', :action =&gt; 'index')
+    if Rails::VERSION::STRING &lt; '2.3'
+      @map.expects(:foo_index).with('foo', :controller =&gt; 'foo', :action =&gt; 'index')
+    else
+      @map.expects(:foo_index).with('foo.:format', :controller =&gt; 'foo', :action =&gt; 'index')
+    end
     @map.static_actions :foo, [:index]
   end
   
   it &quot;should include format path for each action for Rails &lt; 2.3&quot; do
-    if VERSION &lt; '2.3'
+    if Rails::VERSION::STRING &lt; '2.3'
       @map.expects(:foo_index_with_format).with('foo.:format', :controller =&gt; 'foo', :action =&gt; 'index')
       @map.expects(:foo_bar_with_format).with('foo/bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar')
       @map.static_actions :foo, [:index, :bar]
@@ -38,13 +51,21 @@ describe StaticActions::MapAdditions do
   end
   
   it &quot;should have a single static_action method which doesn't require an array&quot; do
-    @map.expects(:foo_bar).with('foo/bar', :controller =&gt; 'foo', :action =&gt; 'bar')
+    if Rails::VERSION::STRING &lt; '2.3'
+      @map.expects(:foo_bar).with('foo/bar', :controller =&gt; 'foo', :action =&gt; 'bar')
+    else
+      @map.expects(:foo_bar).with('foo/bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar')
+    end
     @map.static_action :foo, :bar
   end
   
   it &quot;should be able to make a root action which doesn't include controller name&quot; do
-    @map.expects(:bar).with('bar', :controller =&gt; 'foo', :action =&gt; 'bar')
-    @map.expects(:bar_with_format).with('bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar') if VERSION &lt; '2.3'
+    if Rails::VERSION::STRING &lt; '2.3'
+      @map.expects(:bar).with('bar', :controller =&gt; 'foo', :action =&gt; 'bar')
+      @map.expects(:bar_with_format).with('bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar')
+    else
+      @map.expects(:bar).with('bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar')
+    end
     @map.root_static_action :foo, :bar
   end
   
@@ -55,8 +76,12 @@ describe StaticActions::MapAdditions do
   
   it &quot;should be able to specify multiple root actions&quot; do
     @map.expects(:root).with(:controller =&gt; 'foo')
-    @map.expects(:bar).with('bar', :controller =&gt; 'foo', :action =&gt; 'bar')
-    @map.expects(:bar_with_format).with('bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar') if VERSION &lt; '2.3'
+    if Rails::VERSION::STRING &lt; '2.3'
+      @map.expects(:bar).with('bar', :controller =&gt; 'foo', :action =&gt; 'bar')
+      @map.expects(:bar_with_format).with('bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar')
+    else
+      @map.expects(:bar).with('bar.:format', :controller =&gt; 'foo', :action =&gt; 'bar')
+    end
     @map.root_static_actions :foo, [:index, :bar]
   end
 end</diff>
      <filename>spec/static_actions/map_additions_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7486df590ac767a3d0c9b30252f668e3059fa612</id>
    </parent>
  </parents>
  <author>
    <name>Tim Gossett</name>
    <email>tim@mrgossett.com</email>
  </author>
  <url>http://github.com/MrGossett/static_actions/commit/ece097a7e2c3aa7235a478a0992856226cd03fbe</url>
  <id>ece097a7e2c3aa7235a478a0992856226cd03fbe</id>
  <committed-date>2009-06-05T07:31:13-07:00</committed-date>
  <authored-date>2009-06-05T07:31:13-07:00</authored-date>
  <message>using Rails::VERSION::STRING to check for Rails &gt;= 2.3</message>
  <tree>6579897737154f9c27e5e5a304d835e98914cc76</tree>
  <committer>
    <name>Tim Gossett</name>
    <email>tim@mrgossett.com</email>
  </committer>
</commit>
