require 'retriable' module XamarinTestCloud # A class to bridge the gap between retriable 1.x and 2.0. class RetriableOptions def self.retriable_version parts = Retriable::VERSION.split('.') { :major => parts[0] ? parts[0].to_i : nil, :minor => parts[1] ? parts[1].to_i : nil, :patch => parts[2] ? parts[2].to_i : nil } end def self.tries_and_interval(tries, interval) version = self.retriable_version[:major] if version >= 2 {:intervals => Array.new(tries, interval)} else {:tries => tries, :interval => interval} end end end end