]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
fix def vagrant_version for vagrant >= v1.3
authorvarac <varacanero@zeromail.org>
Wed, 9 Oct 2013 13:57:12 +0000 (15:57 +0200)
committervarac <varacanero@zeromail.org>
Wed, 9 Oct 2013 13:57:12 +0000 (15:57 +0200)
vagrant reports it's version differently >= v1.3

before: Vagrant version 1.2.2
now:    Vagrant 1.3.4

lib/leap_cli/commands/vagrant.rb

index e674c755a3b8c2b08d938ab6fa8c88e1000c03b9..5248bfd5dc2cd3e2eb3069b39851de88eae20f1d 100644 (file)
@@ -130,7 +130,7 @@ module LeapCli; module Commands
   end
 
   def vagrant_version
-    minor_version = `vagrant --version|cut -d' ' -f 3 | cut -d'.' -f 2`.to_i
+    minor_version = `vagrant --version | rev | cut -d'.' -f 2`.to_i
     version = case minor_version
       when 1..9 then 2
       when 0    then 1