From 142468636189f36ee542245856ef4ca84bda0509 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 4 May 2015 16:34:44 -0700 Subject: gemspec clean up: remove gems 'tee' and 'versionomy', and tighten dependency version requirements. --- lib/leap/platform.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/leap/platform.rb b/lib/leap/platform.rb index 3e1d138..0fdb312 100644 --- a/lib/leap/platform.rb +++ b/lib/leap/platform.rb @@ -1,5 +1,3 @@ -require 'versionomy' - module Leap class Platform @@ -34,24 +32,24 @@ module Leap self.instance_eval(&block) - @version ||= Versionomy.parse("0.0") + @version ||= Gem::Version.new("0.0") end def version=(version) - @version = Versionomy.parse(version) + @version = Gem::Version.new(version) end def compatible_cli=(range) @compatible_cli = range - @minimum_cli_version = Versionomy.parse(range.first) - @maximum_cli_version = Versionomy.parse(range.last) + @minimum_cli_version = Gem::Version.new(range.first) + @maximum_cli_version = Gem::Version.new(range.last) end # # return true if the cli_version is compatible with this platform. # def compatible_with_cli?(cli_version) - cli_version = Versionomy.parse(cli_version) + cli_version = Gem::Version.new(cli_version) cli_version >= @minimum_cli_version && cli_version <= @maximum_cli_version end @@ -62,8 +60,8 @@ module Leap if range.is_a? String range = range.split('..') end - minimum_platform_version = Versionomy.parse(range.first) - maximum_platform_version = Versionomy.parse(range.last) + minimum_platform_version = Gem::Version.new(range.first) + maximum_platform_version = Gem::Version.new(range.last) @version >= minimum_platform_version && @version <= maximum_platform_version end -- cgit v1.2.3