]> git.wincent.com - wikitext.git/commitdiff
Future-proof version-number detection
authorWincent Colaiuta <win@wincent.com>
Sun, 15 May 2011 09:58:33 +0000 (02:58 -0700)
committerWincent Colaiuta <win@wincent.com>
Sun, 15 May 2011 09:58:33 +0000 (02:58 -0700)
With this we'll be good to go until Rails 10...

Signed-off-by: Wincent Colaiuta <win@wincent.com>
spec/rails_spec.rb

index 9616acdc9db0874030103b21bd2d410547730218..3f7e9a531a42ec2dae505e6f11b6858d78e85913 100644 (file)
@@ -59,7 +59,7 @@ module RailsSpecs
 
   def app_path version
     version = 'edge' if version.nil?
-    version = "v#{version}" if version =~ /\A3\./
+    version = "v#{version}" if version =~ /\A\d\./
     TRASH_PATH + "#{version}-app"
   end