module Sambot::Runtime

Public Class Methods

ensure_latest() click to toggle source
# File lib/sambot/runtime.rb, line 13
def self.ensure_latest
  latest_version = Gems.new.versions('sambot')[0]['number']
  UI.debug("Current version is #{Sambot::VERSION}")
  UI.debug("Latest version is #{latest_version}")
  UI.info('A newer version of this gem exists - please update the gem before continuing') if obsolete?
end
obsolete?() click to toggle source
# File lib/sambot/runtime.rb, line 8
def self.obsolete?
  latest_version = Gems.new.versions('sambot')[0]['number']
  Gem::Version.new(Sambot::VERSION) < Gem::Version.new(latest_version)
end