]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
version bump to 1.6, added platform.major_version
authorelijah <elijah@riseup.net>
Tue, 21 Oct 2014 22:09:27 +0000 (15:09 -0700)
committerelijah <elijah@riseup.net>
Tue, 21 Oct 2014 22:09:27 +0000 (15:09 -0700)
lib/leap/platform.rb
lib/leap_cli.rb
lib/leap_cli/version.rb

index c1103d45d855ec703c3720db306519f158f21a9d..6938fb33f7a726d713a235f52bb00d4603650f3c 100644 (file)
@@ -33,6 +33,8 @@ module Leap
         @default_puppet_tags = []
 
         self.instance_eval(&block)
+
+        @version ||= Versionomy.parse("0.0")
       end
 
       def version=(version)
@@ -65,6 +67,14 @@ module Leap
         @version >= minimum_platform_version && @version <= maximum_platform_version
       end
 
+      def major_version
+        if @version.major == 0
+          "#{@version.major}.#{@version.minor}"
+        else
+          @version.major
+        end
+      end
+
     end
 
   end
index be16cf4ec06748582b58d03f3f01080f45b872ef..6cd625e77b8931c09beb3b64a84bad5889633a68 100644 (file)
@@ -8,7 +8,6 @@ $ruby_version = RUBY_VERSION.split('.').collect{ |i| i.to_i }.extend(Comparable)
 require 'leap/platform'
 
 require 'leap_cli/version'
-require 'leap_cli/constants'
 require 'leap_cli/exceptions'
 
 require 'leap_cli/leapfile'
index 019e267eaee7b97969d482ff9ffd1ea6c5145aa7..80c9d3fdd82dbf7158c55d86729aa3ce5f4680d5 100644 (file)
@@ -1,6 +1,6 @@
 module LeapCli
   unless defined?(LeapCli::VERSION)
-    VERSION = '1.5.9'
+    VERSION = '1.6.0'
     COMPATIBLE_PLATFORM_VERSION = '0.5.3'..'1.99'
     SUMMARY = 'Command line interface to the LEAP platform'
     DESCRIPTION = 'The command "leap" can be used to manage a bevy of servers running the LEAP platform from the comfort of your own home.'