diff options
author | elijah <elijah@riseup.net> | 2014-10-21 15:09:27 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-10-21 15:09:27 -0700 |
commit | 9e5572c7177ab10904aafbdcba99de0364e57db9 (patch) | |
tree | 8fa0f81cf051bb6772a202c41b54df0d17cbea4a /lib/leap | |
parent | 642586c93ba6fb85104b8c096db715b88c61ebcb (diff) |
version bump to 1.6, added platform.major_version
Diffstat (limited to 'lib/leap')
-rw-r--r-- | lib/leap/platform.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/leap/platform.rb b/lib/leap/platform.rb index c1103d4..6938fb3 100644 --- a/lib/leap/platform.rb +++ b/lib/leap/platform.rb @@ -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 |