summaryrefslogtreecommitdiff
path: root/lib/leap
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-09-25 00:54:09 -0700
committerelijah <elijah@riseup.net>2014-09-25 00:54:09 -0700
commit7f2bdfa10374af0237cc3acc8c682c2f01032f6b (patch)
tree07611ee51d1ed2c5994956cdcc99245e339471e6 /lib/leap
parent937092ff3cccfeeeb415f9bbb959c9f4591ec006 (diff)
add support for per-environment platform pinning. Support pins are platform.version, platform.branch, and platform.commit
Diffstat (limited to 'lib/leap')
-rw-r--r--lib/leap/platform.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/leap/platform.rb b/lib/leap/platform.rb
index d97650b..89b1bc1 100644
--- a/lib/leap/platform.rb
+++ b/lib/leap/platform.rb
@@ -44,6 +44,9 @@ module Leap
# return true if the platform version is within the specified range.
#
def version_in_range?(range)
+ if range.is_a? String
+ range = range.split('..')
+ end
minimum_platform_version = Versionomy.parse(range.first)
maximum_platform_version = Versionomy.parse(range.last)
@version >= minimum_platform_version && @version <= maximum_platform_version